Last modified: 2012-11-08 14:24:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42932, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40932 - File upload using SwiftCloudFiles returns 'Could not create directory "mwstore://localSwift/public".'
File upload using SwiftCloudFiles returns 'Could not create directory "mwstor...
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
SwiftCloudFiles (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 20:26 UTC by Tom Noonan II
Modified: 2012-11-08 14:24 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Sanitized swift config block (2.66 KB, text/plain)
2012-10-10 20:26 UTC, Tom Noonan II
Details

Description Tom Noonan II 2012-10-10 20:26:28 UTC
Created attachment 11178 [details]
Sanitized swift config block

When trying to upload via swiftCloudFiles the user receives 'Could not create directory "mwstore://localSwift/public".'

This error was mentioned on this talk page: http://www.mediawiki.org/wiki/Extension_talk:SwiftCloudFiles  however I did not see a resolution.  

Following the debug request on the talk page I generated the following log using '$wgDebugLogGroups['SwiftBackend'] = "/tmp/swift.log";':
[root@wiki-node2 ~]# cat /tmp/swift.log
2012-10-10 18:16:25 198.61.220.81 wiki1: InvalidResponseException in 'SwiftFileBackend::doPrepareInternal' (given '{"dir":"mwstore:\/\/localSwift\/public"}'): Unexpected response ():

And the following message is in the Apache error logs:
[Wed Oct 10 18:16:25 2012] [error] [client ip.ip.228.100] PHP Warning:  SwiftFileBackend::doPrepareInternal: Unexpected response ():  in /var/www/html/includes/filebackend/SwiftFileBackend.php on line 1439, referer: http://ip.ip.220.81/index.php/Special:Upload

Both MediaWiki and SwiftCloudFiles are snapshots of today's git master.
MediaWiki: core-HEAD-41d3072: 1.21alpha
SwiftCloudFiles: SwiftCloudFiles-MW1.19-110689: Version 1.7.10-wmf


Swift config block from LocalSettings.php is attached.

Let me know what next steps need to be taken, thanks.
Comment 1 Andre Klapper 2012-10-11 09:06:18 UTC
[CC'ing the SwiftCloudFiles maintainer]
Comment 2 Sumana Harihareswara 2012-10-12 18:51:52 UTC
Aaron, could this affect WMF sites as well, or just 3rd party sites?
Comment 3 Aaron Schulz 2012-10-12 22:31:40 UTC
@Tom: Try the latest version of SwiftCloudFiles (so it includes https://gerrit.wikimedia.org/r/#/c/27828/, made after this report).

It could also be a local issue. You can try testing swift using curl with your bash client. Just do:
curl -i http://<the host>/auth/v1.0 -H "X-Auth-User: <the  swift user>" -H "X-Auth-Key: <the auth key>"

See what that gives.
Comment 4 Tom Noonan II 2012-10-18 17:57:01 UTC
Okay, so this turned out to be a config error with a bad error message.

I had typo'd the auth url in my private auth settings, which was causing the authentication to fail.  Uploading is now working.

Can we change this to an enhancement/feature request to either get a log or change the error message to show a 404 happened when trying to get the auth key?  The current error messages make it look like a bug.

On a semi related note, uploading is now working (I can see the files in my CDN UI)  but the URLs mediawiki is trying to use are 404ing.  I haven't had the chance to dig and see if this is another user error, though.
Comment 5 Aaron Schulz 2012-10-19 00:58:32 UTC
Did you set $wgLocalFileRepo to make the zones work? The defaults will not. You may have to map each container to it's CDN url (with the UUID). You can use the 'zones' option for $wgLocalFileRepo to do this.
Comment 6 Tom Noonan II 2012-10-26 19:04:08 UTC
My config is working, the remaining problems turned out to be config issues.

I see now the error message turned out to be from the "backend" variable which was the default of 'localSwift'  So localSwift/public actually did properly refer to my misconfigured CDN.

I'm going to close this bug as invalid.  However, I do need to see if there is documentation I missed, as all my problems thus far have been from not understanding what the variables in the LocalSettings.php arrays do.  Aaron, I may ping you about creating / improving some docs so others don't stumble where I fell.  (And clutter your bugzilla with bad bugs!)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links