The issue can be reproduced on devstack (kilo).
I don't believe it's a serious issue, but as long as the command fails the output could be nicer :)
ina@ubuntu:~/devstack$ swift --os-username service:glance-swift --os-password SOMEPASS upload glance worlddump-2015-01-19-143737.txt --segment-threads 4242424242
Traceback (most recent call last):
File "/usr/local/bin/swift", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/swiftclient/shell.py", line 1287, in main
globals()['st_%s' % args[0]](parser, argv[1:], output)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/shell.py", line 746, in st_upload
with SwiftService(options=_opts) as swift:
File "/usr/local/lib/python2.7/dist-packages/swiftclient/service.py", line 376, in __init__
container_threads=self._options['container_threads']
File "/usr/local/lib/python2.7/dist-packages/swiftclient/multithreading.py", line 122, in __init__
create_connection, max_workers=segment_threads)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/multithreading.py", line 155, in __init__
for p in range(0, max_workers):
MemoryError
ina@ubuntu:~/devstack$ swift --os-username service:glance-swift --os-password SOMEPASS upload glance worlddump-2015-01-19-143737.txt --segment-threads 424242424242424242424242
Traceback (most recent call last):
File "/usr/local/bin/swift", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/swiftclient/shell.py", line 1287, in main
globals()['st_%s' % args[0]](parser, argv[1:], output)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/shell.py", line 746, in st_upload
with SwiftService(options=_opts) as swift:
File "/usr/local/lib/python2.7/dist-packages/swiftclient/service.py", line 376, in __init__
container_threads=self._options['container_threads']
File "/usr/local/lib/python2.7/dist-packages/swiftclient/multithreading.py", line 122, in __init__
create_connection, max_workers=segment_threads)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/multithreading.py", line 155, in __init__
for p in range(0, max_workers):
OverflowError: range() result has too many items