Using with OpenStack Swift throws Fog::Storage::Rackspace::NotFound #811

Closed
jaybrueder opened this Issue Aug 12, 2012 · 2 comments

Comments

Projects
None yet
2 participants

Hi!

After seeing some posts on how to use CarrierWave and Fog with a private OpenStack Swift installation, I tried to implement this in my Rails 3.2.7 app.

I configured Carrierwave like this:

CarrierWave.configure do |config|
    config.storage = :fog

    config.fog_credentials = {
        :provider => 'Rackspace',
        :rackspace_username => "system:root",
        :rackspace_api_key => "password",
        :rackspace_auth_url => "https://10.10.xx.xxx:8080/auth/v1.0"
    }
    config.fog_directory = "testcontainer"
    config.fog_public = false
  end

Here is an excerpt from my Swift logs. The app clearly hits the Swift Installation und tries to upload the correct file to the correct directory:

2012-08-12T11:39:05.237576+02:00 swiftproxy1 proxy-server - 10.10.xx.xxx 12/Aug/2012/09/39/05 GET /auth/v1.0 HTTP/1.0 200 - - - - - - - - 0.0005
2012-08-12T11:39:05.257455+02:00 swiftproxy1 proxy-server 10.10.xx.xx 10.10.xx.xxx 12/Aug/2012/09/39/05 PUT /v1/AUTH_system/testcontainer/uploads/user/avatar/2/test.png HTTP/1.0 404 - - system%2CAUTH_tk1ff6dde52b6440ee95dc2ce5f186a742 - - - txc4bdfc8845004abfaf59c23954ace352 - 0.0146 -
2012-08-12T11:39:05.269286+02:00 swiftproxy1 proxy-server 10.10.xx.xx 10.10.xx.xxx 12/Aug/2012/09/39/05 PUT /v1/AUTH_system/testcontainer/uploads/user/avatar/2/test.png HTTP/1.0 404 - - system%2CAUTH_tk1ff6dde52b6440ee95dc2ce5f186a742 - - - txe800b4f102cd4ceba6b1376c35debf24 - 0.0054 -
2012-08-12T11:39:05.276647+02:00 swiftproxy1 proxy-server 10.10.xx.xx 10.10.xx.xxx 12/Aug/2012/09/39/05 PUT /v1/AUTH_system/testcontainer/uploads/user/avatar/2/test.png HTTP/1.0 404 - - system%2CAUTH_tk1ff6dde52b6440ee95dc2ce5f186a742 - - - tx9c70daa0fcd5477fbb3bcc8cdfe9b3f3 - 0.0042 -
2012-08-12T11:39:05.336533+02:00 swiftproxy1 proxy-server 10.10.xx.xx 10.10.xx.xxx 12/Aug/2012/09/39/05 PUT /v1/AUTH_system/testcontainer/uploads/user/avatar/2/test.png HTTP/1.0 404 - - system%2CAUTH_tk1ff6dde52b6440ee95dc2ce5f186a742 - - - txd8eb198f49d9444490ce81a80eee4665 - 0.0165 -

But the RailsApp throws me an:

Fog::Storage::Rackspace::NotFound

Exception everytime I upload a file. The file is also not stored or saved in the DB.

Did I config something wrong in the Carrierwave config?
Is it my Swift Installation?

Owner

bensie commented Aug 28, 2012

This sounds like an issue on the Fog end of things. Try connecting with Fog directly (without CarrierWave) and see if you get anywhere. Are you sure that private openstack installs are supported?

bensie closed this Aug 28, 2012

Yes, it was a Fog issue. Sorry, sometimes it is hard to separate the two gems.

It works with the HP Storage Provider in the Fog gem by the way.

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