Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. [psharma@dhcp193-181 ~]$ curl -v -X PUT -H 'X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e' -k http://10.65.207.210:8080/v1/AUTH_test/container * About to connect() to 10.65.207.210 port 8080 (#0) * Trying 10.65.207.210... * Connected to 10.65.207.210 (10.65.207.210) port 8080 (#0) > PUT /v1/AUTH_test/container HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 10.65.207.210:8080 > Accept: */* > X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e > < HTTP/1.1 201 Created < Content-Length: 0 < Content-Type: text/html; charset=UTF-8 < Date: Wed, 24 Jul 2013 09:02:49 GMT < * Connection #0 to host 10.65.207.210 left intact 2. [psharma@dhcp193-181 ~]$ curl -v -X PUT -T ~/dummy_files/1k-H 'X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e' -k http://10.65.207.210:8080/v1/AUTH_test/container/dir-l0/file.txt 1k_mod.txt 1k.txt [psharma@dhcp193-181 ~]$ curl -v -X PUT -T ~/dummy_files/1k.txt -H 'X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e' -k http://10.65.207.210:8080/v1/AUTH_test/container/dir-l0/file.txt * About to connect() to 10.65.207.210 port 8080 (#0) * Trying 10.65.207.210... * Connected to 10.65.207.210 (10.65.207.210) port 8080 (#0) > PUT /v1/AUTH_test/container/dir-l0/file.txt HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 10.65.207.210:8080 > Accept: */* > X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e > Content-Length: 1024 > Expect: 100-continue > < HTTP/1.1 100 Continue * We are completely uploaded and fine < HTTP/1.1 201 Created < Last-Modified: Wed, 24 Jul 2013 09:03:25 GMT < Content-Length: 0 < Etag: 568ee44fdfc5763002295ac7f732aada < Content-Type: text/html; charset=UTF-8 < Date: Wed, 24 Jul 2013 09:03:25 GMT < * Connection #0 to host 10.65.207.210 left intact 3. [psharma@dhcp193-181 ~]$ curl -v -X GET -H 'X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e' -k http://10.65.207.210:8080/v1/AUTH_test/container/dir-l0 * About to connect() to 10.65.207.210 port 8080 (#0) * Trying 10.65.207.210... * Connected to 10.65.207.210 (10.65.207.210) port 8080 (#0) > GET /v1/AUTH_test/container/dir-l0 HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 10.65.207.210:8080 > Accept: */* > X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e > Content-Length: 1024 > Expect: 100-continue > < HTTP/1.1 400 Bad Request < Content-Length: 62 < Content-Type: text/html; charset=UTF-8 < Date: Wed, 24 Jul 2013 09:03:52 GMT * HTTP error before end of send, stop sending < * Closing connection 0 Invalid path: /volume_not_in_ring/0/AUTH_test/container/dir-l0[psharma@dhcp193-181 ~]$ Actual results: #tail /var/log/messages Jul 24 14:35:36 dhcp207-210 object-server 127.0.0.1 - - [24/Jul/2013:09:05:36 +0000] "GET /test/0/AUTH_test/container/dir-l0" 200 - "-" "txce7c188872f743a08ba6c1651f0835ce" "curl/7.29.0" 0.0021 Jul 24 14:35:36 dhcp207-210 proxy-server ERROR with Object server 127.0.0.1:6010/test re: Trying to GET /v1/AUTH_test/container/dir-l0: #012Traceback (most recent call last):#012 File "/usr/lib/python2.6/site-packages/swift/proxy/controllers/base.py", line 795, in GETorHEAD_base#012 possible_source = conn.getresponse()#012 File "/usr/lib/python2.6/site-packages/swift/common/bufferedhttp.py", line 102, in getresponse#012 response = HTTPConnection.getresponse(self)#012 File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse#012 response.begin()#012 File "/usr/lib64/python2.6/httplib.py", line 391, in begin#012 version, status, reason = self._read_status()#012 File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status#012 raise BadStatusLine(line)#012BadStatusLine (txn: txce7c188872f743a08ba6c1651f0835ce) (client_ip: 10.65.193.181) Jul 24 14:35:36 dhcp207-210 proxy-server Handoff requested (1) (txn: txce7c188872f743a08ba6c1651f0835ce) (client_ip: 10.65.193.181) Jul 24 14:35:36 dhcp207-210 account-server 127.0.0.1 - - [24/Jul/2013:09:05:36 +0000] "GET /volume_not_in_ring/0/AUTH_test/container/dir-l0" 400 62 "txce7c188872f743a08ba6c1651f0835ce" "-" "curl/7.29.0" 0.0001 "" Expected results: Error Code is fine, but the messaged should be like this "object with '/' suffix are not allowed.However you may wish to use ?path=/subdir/xxx/xxx or ?delimiter=/ options. " Additional info: [root@dhcp207-210 ~]# rpm -qa|grep gluster gluster-swift-object-1.8.0-6.3.el6rhs.noarch vdsm-gluster-4.10.2-22.7.el6rhs.noarch gluster-swift-plugin-1.8.0-2.el6rhs.noarch glusterfs-geo-replication-3.4.0.12rhs.beta3-1.el6rhs.x86_64 glusterfs-3.4.0.12rhs.beta3-1.el6rhs.x86_64 gluster-swift-1.8.0-6.3.el6rhs.noarch glusterfs-server-3.4.0.12rhs.beta3-1.el6rhs.x86_64 gluster-swift-proxy-1.8.0-6.3.el6rhs.noarch gluster-swift-account-1.8.0-6.3.el6rhs.noarch glusterfs-rdma-3.4.0.12rhs.beta3-1.el6rhs.x86_64 glusterfs-fuse-3.4.0.12rhs.beta3-1.el6rhs.x86_64 gluster-swift-container-1.8.0-6.3.el6rhs.noarch
Even the directory is created with 'Content-Type: application/directory' -H 'Content-Length: 0' headers then even the problem is same. Which is not acceptable with 400 bad request. HEAD request to this type of resources are working fine. [psharma@dhcp193-181 ~]$ curl -v -X PUT -H 'X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e' -H 'Content-Type: application/directory' -H 'Content-Length: 0' -k http://10.65.207.210:8080/v1/AUTH_test/container/dir-l0 * About to connect() to 10.65.207.210 port 8080 (#0) * Trying 10.65.207.210... * Connected to 10.65.207.210 (10.65.207.210) port 8080 (#0) > PUT /v1/AUTH_test/container/dir-l0 HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 10.65.207.210:8080 > Accept: */* > X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e > Content-Type: application/directory > Content-Length: 0 > < HTTP/1.1 201 Created < Last-Modified: Wed, 24 Jul 2013 13:29:15 GMT < Content-Length: 0 < Etag: d41d8cd98f00b204e9800998ecf8427e < Content-Type: text/html; charset=UTF-8 < Date: Wed, 24 Jul 2013 13:29:16 GMT < * Connection #0 to host 10.65.207.210 left intact [psharma@dhcp193-181 ~]$ curl -v -X GET -H 'X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e' -k http://10.65.207.210:8080/v1/AUTH_test/container/dir-l0 * About to connect() to 10.65.207.210 port 8080 (#0) * Trying 10.65.207.210... * Connected to 10.65.207.210 (10.65.207.210) port 8080 (#0) > GET /v1/AUTH_test/container/dir-l0 HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 10.65.207.210:8080 > Accept: */* > X-Auth-Token: AUTH_tk44b09617995d4305a19676857a86b86e > < HTTP/1.1 400 Bad Request < Content-Length: 62 < Content-Type: text/html; charset=UTF-8 < Date: Wed, 24 Jul 2013 13:29:33 GMT < * Connection #0 to host 10.65.207.210 left intact Invalid path: /volume_not_in_ring/0/AUTH_test/container/dir-l0[psharma@dhcp193-181 ~]$
I will try to reproduce it myself tomorrow.
The GET on a sub directory or a directory object created with 'Content-Type: applicatoin/directory' && 'Content-Length: 0' currently not working with G4S. I am looking at your commit to understand how you provided the functionality to PUT such directories. So that can figure out how we can perform GET on such directories. Luis's change : Change-Id: I31038a59699a8e3eeaba902db322218c6400093e
http://review.gluster.org/#/c/5458/ Posted this patch for review.
http://review.gluster.org/#/c/5457/
Changes are merged to upstream master, via http://review.gluster.org/#/c/5511/
Retargeting for 2.1.z U2 (Corbett) release.
http://review.gluster.org/#/c/5991/ Changes are posted for review to be merged in Grizzly branch.
The above patch is reviewed but not yet merged to Grizzly. Please let me know if there are any steps to follow for merging it to grizzly ?
The bug fix patch (http://review.gluster.org/#/c/5991/) will be merged after unit test coverage patch (http://review.gluster.org/#/c/6037/)is merged to master and grizzly.
http://review.gluster.org/#/c/6037/ Has been committed upstream
http://review.gluster.org/#/c/5511/ http://review.gluster.org/#/c/6037/ Code changes related to above two patches are merged to G4S (master) and then they made it to G4S(HAVANA). Changing the state of the bug on QA.
It was decided to not put in grizzly anymore.
Correction.
It now returns 200 OK for GET on sub-directory, which is correct response, However GET on a container return 200 OK and list of all content.So OK with the fix if could do following: 1.Document in the user guide that we currently not support listing of sub- directories. 2. I personally believe this a nice feature to have, If all stakeholders agree I will raise a RFE. Steps: ################################### [root@luigi ~]# curl -v -X PUT -H -k http://10.65.207.210:8080/v1/AUTH_test/container * About to connect() to 10.65.207.210 port 8080 (#0) * Trying 10.65.207.210... No route to host * couldn't connect to host * Closing connection #0 curl: (7) couldn't connect to host [root@luigi ~]# curl -v -X PUT -H -k http://localhost:8080/v1/AUTH_test/container * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > PUT /v1/AUTH_test/container HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 201 Created < Content-Length: 0 < Content-Type: text/html; charset=UTF-8 < X-Trans-Id: txa97163f565644d5b9f582-0052bc6acb < Date: Thu, 26 Dec 2013 17:43:39 GMT < * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]# curl -v -X PUT -H 'Content-Type: application/directory' -H 'Content-Length: 0' -k http://localhost:8080/v1/AUTH_test/container/dir1 * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > PUT /v1/AUTH_test/container/dir1 HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > Content-Type: application/directory > Content-Length: 0 > < HTTP/1.1 201 Created < Last-Modified: Thu, 26 Dec 2013 17:44:11 GMT < Content-Length: 0 < Etag: d41d8cd98f00b204e9800998ecf8427e < Content-Type: text/html; charset=UTF-8 < X-Trans-Id: tx48a4022d743c4d469e354-0052bc6aeb < Date: Thu, 26 Dec 2013 17:44:11 GMT < * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]# curl -v -X PUT -H 'Content-Type: application/directory' -H 'Content-Length: 0' -k http://localhost:8080/v1/AUTH_test/container/dir2 * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > PUT /v1/AUTH_test/container/dir2 HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > Content-Type: application/directory > Content-Length: 0 > < HTTP/1.1 201 Created < Last-Modified: Thu, 26 Dec 2013 17:44:23 GMT < Content-Length: 0 < Etag: d41d8cd98f00b204e9800998ecf8427e < Content-Type: text/html; charset=UTF-8 < X-Trans-Id: txc8d0e2bc92a54618b0f92-0052bc6af7 < Date: Thu, 26 Dec 2013 17:44:23 GMT < * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]# curl -v -X PUT -T install.log -k http://localhost:8080/v1/AUTH_test/container/dir1/install1.txt * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > PUT /v1/AUTH_test/container/dir1/install1.txt HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > Content-Length: 30373 > Expect: 100-continue > < HTTP/1.1 100 Continue < HTTP/1.1 201 Created < Last-Modified: Thu, 26 Dec 2013 17:44:41 GMT < Content-Length: 0 < Etag: de52b12183a6d501e83a35ef5d70874a < Content-Type: text/html; charset=UTF-8 < X-Trans-Id: tx807edbfe0bdc4deb89a6d-0052bc6b09 < Date: Thu, 26 Dec 2013 17:44:41 GMT < * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]# curl -v -X PUT -T install.log -k http://localhost:8080/v1/AUTH_test/container/dir1/install2.txt * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > PUT /v1/AUTH_test/container/dir1/install2.txt HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > Content-Length: 30373 > Expect: 100-continue > < HTTP/1.1 100 Continue < HTTP/1.1 201 Created < Last-Modified: Thu, 26 Dec 2013 17:44:48 GMT < Content-Length: 0 < Etag: de52b12183a6d501e83a35ef5d70874a < Content-Type: text/html; charset=UTF-8 < X-Trans-Id: txaa9a2abe3e934ae3aa791-0052bc6b10 < Date: Thu, 26 Dec 2013 17:44:48 GMT < * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]# curl -v -X HEAD -k http://localhost:8080/v1/AUTH_test/container * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > HEAD /v1/AUTH_test/container HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 204 No Content < Content-Length: 0 < X-Container-Object-Count: 0 < Accept-Ranges: bytes < X-Timestamp: 1 < X-Container-Bytes-Used: 0 < Content-Type: text/plain; charset=utf-8 < X-Trans-Id: tx7274f0cab4364de5ad13a-0052bc6b2f < Date: Thu, 26 Dec 2013 17:45:19 GMT < * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]# curl -v -X GET -k http://localhost:8080/v1/AUTH_test/container * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /v1/AUTH_test/container HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 200 OK < Content-Length: 46 < X-Container-Object-Count: 0 < Accept-Ranges: bytes < X-Timestamp: 1 < X-Container-Bytes-Used: 0 < Content-Type: text/plain; charset=utf-8 < X-Trans-Id: txa4407dd4cbce4d64bff1d-0052bc6b3a < Date: Thu, 26 Dec 2013 17:45:30 GMT < dir1 dir1/install1.txt dir1/install2.txt dir2 * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]# curl -v -X GET -k http://localhost:8080/v1/AUTH_test/container/dir1 * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /v1/AUTH_test/container/dir1 HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 200 OK < Content-Length: 0 < Accept-Ranges: bytes < Last-Modified: Thu, 26 Dec 2013 17:44:11 GMT < Etag: d41d8cd98f00b204e9800998ecf8427e < X-Timestamp: 1388079851.42453 < Content-Type: application/directory < X-Trans-Id: txe93cb06e47674a2b80316-0052bc6b4e < Date: Thu, 26 Dec 2013 17:45:50 GMT < * Connection #0 to host localhost left intact * Closing connection #0 [root@luigi ~]#
Was there a upstream bug on not listing sub directories ?
If there is no upstream bug for not listing sub directories then please file one for the same. Lets decide on that bug if we want to fix that in this release or later release, document and move ahead for corbett. And can you please update/complete your verification status on this bug ?
upstream bug or RFE I meant.
Upstream RFE(Launchpad Blueprint) https://blueprints.launchpad.net/gluster-swift/+spec/sub-directory-listing Documentation BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1046888 Marking this BZ as verified as it correctly returns the response code with no errors.
Hi Chetan, Please verify the doc text for technical accuracy and sign off.
perfect as discussed. Good to go. Thanks.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-0208.html