Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[Rackspace Storage] Rackspace CloudFiles now offers multiple regions, but I am unable to interact with items in ORD (chicago) region. #1135

jakedahn opened this Issue Sep 8, 2012 · 6 comments


None yet
5 participants

jakedahn commented Sep 8, 2012

Rackspace CloudFiles now lets you specify which region to create your cloudfiles container.

Cloudfiles region picker

I am currently unable to interact with rackspace cloudfiles containers in the new ORD (chicago) cloudfiles region.


When I run connection.get_containers I should get a list of all containers tied to my account.


When I run connection.get_containers I get a list of only the containers in the DFW (dallas) region. ORD (chicago) region entries are omitted.


brianhartsock commented Sep 10, 2012

The storage provider for Rackspace doesn't seem to work too well with multi-region or auth 2.0 yet. @bradgignac are you still working on that

@jakedahn until the provider fully supports it, you can use the patch below and instantiate the storage provider as follows d = Fog::Storage.new(:provider => :rackspace, :rackspace_storage_url => '<regional storage endpoing>, :rackspace_auth_token => '<auth token>')

diff --git a/lib/fog/rackspace/storage.rb b/lib/fog/rackspace/storage.rb
index 9e5c0f7..4416e78 100644
--- a/lib/fog/rackspace/storage.rb
+++ b/lib/fog/rackspace/storage.rb
@@ -6,7 +6,7 @@ module Fog
     class Rackspace < Fog::Service

       requires :rackspace_api_key, :rackspace_username
-      recognizes :rackspace_auth_url, :rackspace_servicenet, :rackspace_cdn_ssl, :persistent
+      recognizes :rackspace_auth_url, :rackspace_servicenet, :rackspace_storage_url, :rackspace_cdn_ssl, :persistent, :rackspace_auth_token
       recognizes :rackspace_temp_url_key

       model_path 'fog/rackspace/models/storage'

brianhartsock commented Sep 10, 2012

@jakedahn also, the provider will only query a single endpoint. You will always have to specify the region you want to use when instantiating it.

@brianhartsock, thanks a lot for idea. I had to make the following to use ORD region. Not ideal, but at least it works with Auth 1.0.

Fog::Storage::Rackspace.class_eval do
  recognizes :rackspace_storage_url

Fog::Storage::Rackspace::Real.class_eval do
  def authenticate_with_chain
    if (new_host = @rackspace_storage_url).present?
      @host = @rackspace_servicenet == true ? "snet-#{new_host}" : new_host
  alias_method_chain :authenticate, :chain

For this to work I've also added the following to config.fog_credentials

rackspace_storage_url: "storage101.ord1.clouddrive.com"

Sorry for such hacks, just really hope that somebody will come out with better idea of how to use ORD and don't authenticate manually.


geemus commented Sep 12, 2012

@electronick - thanks for the feedback, I think there is some better stuff in-progress so hopefully there will be a cleaner solution available soon.


krames commented Mar 12, 2013

I have just merged in pull request #1653 into master which addresses this issue. You should now be able to create a connection to the ORD data center as follows:

service = Fog::Storage.new({ :provider => 'Rackspace', # Rackspace Fog provider :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key :rackspace_region => :ord # Defaults to :dfw :connection_options => {} # Optional })

If more information, please refer to https://github.com/fog/fog/blob/master/lib/fog/rackspace/docs/storage.md#create-service or feel free to email sdk-support@rackspace.com.

@krames krames closed this Mar 12, 2013


geemus commented Mar 12, 2013


@ekosz ekosz referenced this issue in AssetSync/asset_sync May 14, 2013


Use the fog :rackspace_region config #191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment