Non-deterministic failure with certain sequence of calls to glanceclient
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Invalid
|
Undecided
|
Unassigned |
Bug Description
This is very strange. Running the following script in glanceclient 0.14.1 will often but not always result in an unexpected HttpBadRequest. The script does not fail if the upload call is comment out, or if the glance client object is re-created between the upload and get. This was run against icehouse.
import glanceclient as glance_client
import keystoneclient.
kc = keystone_
token = kc.auth_token
catalog = kc.service_catalog
endpoint = catalog.
ic = glance_
def list():
print "getting"
try:
return ic.images.
except glance_
pass
def upload():
print "uploading"
with open("/etc/hosts") as data:
return ic.images.
upload()
list()
The other strange thing about this is that when it fails, the upload actually happens but there is no visible call to GET in the glance-api server log. There is a call to GET when it succeeds. I am not 100% positive this bug is just in the client.