Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1135135 - python-swiftclient v2.1.0-2.el7ost fails to create containers when openstack is integrated with radosgw. [NEEDINFO]
python-swiftclient v2.1.0-2.el7ost fails to create containers when openstack ...
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: ceph (Show other bugs)
5.0 (RHEL 7)
x86_64 Linux
high Severity high
: ---
: 5.0 (RHEL 7)
Assigned To: Josh Durgin
Warren
: ZStream
Depends On: 1169530 1176181 1176186 1183150 1202548 1206465 1232881
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-28 18:14 EDT by JuanJose Galvez
Modified: 2016-07-22 09:24 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-22 09:24:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jefbrown: needinfo? (mbenjamin)


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1181213 None None None Never

  None (edit)
Description JuanJose Galvez 2014-08-28 18:14:04 EDT
Description of problem:


Version-Release number of selected component (if applicable):
openstack-packstack v0.36.dev1220.el7ost
python-swiftclient v2.1.0-2.el7ost
ceph v0.80.5 (38b73c67d375a2552d8ed67843c8a65c2c0feba6)

How reproducible:
Always

Steps to Reproduce:
1. Install openstack using packstack
2. Install ceph and setup radosgw as per docs (http://ceph.com/docs/master/install/install-ceph-gateway/)
3. Integrate Openstack and Ceph RBD (http://ceph.com/docs/master/rbd/rbd-openstack/)
4. Integrate Keystone and RadosGW (http://ceph.com/docs/master/radosgw/keystone/)
5. Attempt to create a container using swift or the Horizon dashboard.

Actual results:
Fails to create container.

Expected results:
Creates container.

Additional info:
Downgrading to swiftclient 2.0.X does work, as does making the requests using curl.
Comment 2 Josh Durgin 2014-09-26 18:05:51 EDT
JJ, do you have logs of the requests generated by swiftclient 2.0.x and 2.1.0?
I don't see any obvious changes that could cause this in the commit log.
Comment 3 Alexandre Marangone 2014-10-07 19:10:39 EDT
Hi Josh,

I managed to reproduce this. What kind of logs are you looking for exactly?

When creating a container with 2.1.0 i get the following in apache error log:
[Tue Oct 07 16:04:05 2014] [error] [client 10.99.118.30] Invalid Content-Length

And apache returns a 400. The request never hits the radosgw (no logs).

Output:
[root@rhel1 log]# swift -v -V 2.0 -A http://10.214.133.14:5000/v2.0 -U admin:admin -K admin post test_container_keystone_1
Container POST failed: http://burnupi03.front.sepia.ceph.com/swift/v1/test_container_keystone_1 400 Bad Request  [first 60 chars of response] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><he

Let me know if you need anything else.
Comment 4 Josh Durgin 2014-10-23 19:34:13 EDT
I'm unable to reproduce this using the upstream swift client 2.1.0 (or 2.3.1).
Comment 7 Jeff Dexter 2015-03-12 13:18:17 EDT
I also found that Horizon, was trying to add an additional "/" when it gets the containers, causing it to fail with the object store.

015-03-12 14:59:28,583 27137 ERROR swiftclient Container HEAD failed: http://192.168.9.4/swift/v1///test1 404 Not Found
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1192, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 628, in head_container
    http_response_content=body)
ClientException: Container HEAD failed: http://192.168.9.4/swift/v1///test1 404 Not Found

Modified the swift api code in horizon to:
def swift_get_container(request, container_name, with_data=True):
    if with_data:
        headers, data = swift_api(request).get_object(container_name, "")
    else:
        data = None
        headers = swift_api(request).head_container(container_name)
    timestamp = None
    is_public = False
    public_url = None
    try:
        is_public = GLOBAL_READ_ACL in headers.get('x-container-read', '')
        if is_public:
            swift_endpoint = base.url_for(request,
                                          'object-store',
                                          endpoint_type='publicURL')
-            public_url = swift_endpoint + '/' + urlparse.quote(container_name)
+            public_url = swift_endpoint + urlparse.quote(container_name)
        ts_float = float(headers.get('x-timestamp'))
        timestamp = timeutils.iso8601_from_timestamp(ts_float)
    except Exception:
        pass
    container_info = {
        'name': container_name,
        'container_object_count': headers.get('x-container-object-count'),
        'container_bytes_used': headers.get('x-container-bytes-used'),
        'timestamp': timestamp,
        'data': data,
        'is_public': is_public,
        'public_url': public_url,
    }
    return Container(container_info)
Comment 8 Jeff Brown 2016-07-13 16:24:35 EDT
Hi Matt,

We are bug scrubbing and was wondering if this is still relavent? Can we close this bug or do we need to have someone in QE look at it?

Jeff
Comment 9 Sean Cohen 2016-07-22 09:24:23 EDT
Feel free to reopen with new data...
Sean

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