Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1135135

Summary: python-swiftclient v2.1.0-2.el7ost fails to create containers when openstack is integrated with radosgw.
Product: Red Hat OpenStack Reporter: JuanJose Galvez <jgalvez>
Component: cephAssignee: Josh Durgin <jdurgin>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Warren <wusui>
Severity: high Docs Contact:
Priority: high    
Version: 5.0 (RHEL 7)CC: amarango, icolle, jdurgin, jefbrown, jeff.dexter, lhh, mbenjamin, nlevine, scohen, sreber, srevivo
Target Milestone: ---Keywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-22 13:24:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1169530, 1176181, 1176186, 1183150, 1202548, 1206465, 1232881    
Bug Blocks:    

Description JuanJose Galvez 2014-08-28 22:14:04 UTC
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 22:05:51 UTC
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 23:10:39 UTC
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 23:34:13 UTC
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 17:18:17 UTC
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 20:24:35 UTC
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 13:24:23 UTC
Feel free to reopen with new data...
Sean

Comment 10 Red Hat Bugzilla 2023-09-14 02:46:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days