Running "swift list --lh" with out a bucket causes type error in python
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Running "swift list --lh" without specifying a container generates type error as seen below.
We are running ubuntu 14.04 with the python-swiftclient 1:2.0.3-0ubuntu1 form the repos. We are running Ceph's librados gateway version 0.82-524-gbf04897 as a our swift endpoint. I do not have a openstack swift endpoint store to test to see if the client behaves the same way
To reproduce just run "swift list --lh" and see below error. I had to sanitize the debug output by replacing the tokens, url, and container.name with XXXXX, YYYYY,ZZZZ.
-------
Ubuntu 14.04
ii python-swiftclient 1:2.0.3-0ubuntu1 all Client library for Openstack Swift API.
ceph version 0.82-524-gbf04897 (bf048976f50bd0
$ swift list --lh
Traceback (most recent call last):
File "/usr/bin/swift", line 1479, in <module>
globals(
File "/usr/bin/swift", line 584, in st_list
utc = gmtime(
TypeError: float() argument must be a string or a number
$ swift list --lh XXX.YYYY
0
swift --debug list --lh
DEBUG:urllib3.
DEBUG:urllib3.
DEBUG:swiftclie
DEBUG:swiftclie
DEBUG:swiftclie
Traceback (most recent call last):
File "/usr/bin/swift", line 1479, in <module>
globals(
File "/usr/bin/swift", line 584, in st_list
utc = gmtime(
TypeError: float() argument must be a string or a number
Changed in python-swiftclient: | |
status: | New → Confirmed |
Changed in python-swiftclient: | |
status: | Fix Committed → Fix Released |
The issue can be seen only when using Ceph RadosGW. With openstack swift endpoint store we get the output as expected.
ashish@ openstack- master: ~$ swift list openstack- master: ~$ swift list --lh
new_cont
ashish@
5 165K 2014-07-28 11:17:09 new_cont
5 165K
But with Ceph RadosGW we have:
ashish@ firefly- master: ~$ swift list --lh bin/swift" , line 6, in <module> compile( open(__ file__) .read() , __file__, 'exec')) python- swiftclient/ bin/swift" , line 24, in <module> exit(main( )) python- swiftclient/ swiftclient/ shell.py" , line 1600, in main )['st_% s' % args[0]](parser, argv[1:], thread_manager) python- swiftclient/ swiftclient/ shell.py" , line 602, in st_list float(meta. get('x- timestamp' )))
Traceback (most recent call last):
File "/usr/local/
exec(
File "/opt/stack/
sys.
File "/opt/stack/
globals(
File "/opt/stack/
utc = gmtime(
TypeError: float() argument must be a string or a number