Swift clients not able to create containers when using Ceph's radosgw, why?
Environment
-
Red Hat Enterprise Linux 7
-
Inktank Ceph Enterprise 1.2 {Firefly v0.80.5}
-
python-swiftclient v2.1.0-2.el7ost
Issue
-
Swift clients are not able to create containers when using Ceph's radosgw.
-
The swift command is returning
400 Bad Request
when viewed with--verbose
and--debug
options
# swift --verbose --debug --os-storage-url XXXX--os-auth-token {XXXXXXX}post {XXXXX}
---snip--
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
---snip--
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><he
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1208, in _retry
rv = func(self.url, self.token, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 736, in post_container
http_response_content=body)
ClientException: Container POST failed: XXXXXX 400 Bad Request [first 60 chars of response]
Resolution
- Downgrade the
python-swiftclient
2.0.X package:
# yum downgrade python-swiftclient
-
This bug is being tracked in BZ#1135135
-
If you need further assistance, kindly reach out to Red Hat technical support
Root Cause
-
An installation of Openstack on RHEL7 contains the
python-swiftclient
v2.1.X package. -
This package does not currently create containers correctly when the
radosgw
is integrated into the Openstack solution. -
When trying to create containers, in Horizon or with the swift client from
python-swiftclient
(in version 2.1.x), we get anHTTP 400
error message.
Diagnostic Steps
- Verify version of
python-swiftclient
installed:
# rpm -q python-swiftclient
-
Attempt to create container in horizon or the
swift
command line -
Try the same activity, using
curl
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments