Created attachment 924253 [details] Pete Zaitcev's hard work Description of problem: Cannot delete, download, or access a Swift "Pseudo-folder" after creation. Attempting any of these results in a traceback. Version-Release number of selected component (if applicable): Icehouse RDO How reproducible: Create a pseudo-folder in Horizon, then try to do *anything* with it. Steps to Reproduce: 1. Create pseudo folder in Horizon UI 2. Click on pseudo-foler link or attempt to download it using Swift CLI 3. Experience the traceback Actual results: (http://paste.openstack.org/show/90034/) # swift download test_container first-object [auth 1.588s, headers 2.390s, total 2.390s, 0.004 MB/s] test-300M.file [auth 1.310s, headers 1.356s, total 20.171s, 15.905 MB/s] test-200M.file [auth 1.402s, headers 1.447s, total 39.217s, 5.416 MB/s] test2.file [auth 1.666s, headers 2.382s, total 73.224s, 1.431 MB/s] test1.file [auth 0.801s, headers 0.848s, total 93.741s, 11.018 MB/s] test-400M.file [auth 1.663s, headers 2.379s, total 104.722s, 3.974 MB/s] test5g.file [auth 1.516s, headers 1.560s, total 244.565s, 22.089 MB/s] Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/swiftclient/multithreading.py", line 74, in run result = self.func(item, *self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/swiftclient/shell.py", line 403, in _download_object fp = open(path, 'wb') IOError: [Errno 21] Is a directory: 'first-pseudo-folder/' Expected results: Download pseudo-folder Additional info: Mr. Pete Zaitcev (of Redhat) has already produced a patch for this issue based upon some prior conversation on #openstack-swift IRC: http://people.redhat.com/zaitcev/tmp/x.diff
The practice of creating objects with a trailing slash is documented in OpenStack Object Storage API v1 Reference, section 1. "Object Storage API concepts and features", clause "Pseudo-hierarchical folders and directories". http://docs.openstack.org/api/openstack-object-storage/1.0/content/pseudo-hierarchical-folders-directories.html
The fix is merged upstream on August 17 as commit 3d56b65c898d7997819f2627a2fb722bd0c33b69. Additionally, a fix-up corrected tests as commit 309437bb5255a2205337fb951fc3c6836cfdaabf. There was no release since 2.2.0 in July. If we go cherry-pick for this, I recommend we only pick the main commit for simplicity.