glanceclient fails to update image metadata using shade

Bug #1585757 reported by Logan V
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Unassigned

Bug Description

Against a liberty cloud, ansible is using shade to upload an image and adjust its metadata. The image upload works fine, however when shade tries to apply the custom metadata attribute post-upload it fails with:

An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1464192661.68-227875331229780/os_image", line 2277, in <module>
    main()
  File "/root/.ansible/tmp/ansible-tmp-1464192661.68-227875331229780/os_image", line 171, in main
    **module.params['properties'])
  File "/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py", line 2770, in update_image_properties
    return self._update_image_properties_v2(image, img_props)
  File "/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py", line 2782, in _update_image_properties_v2
    image_id=image.id, **img_props))
  File "/usr/local/lib/python2.7/dist-packages/shade/task_manager.py", line 175, in submitTask
    return task.wait(raw)
  File "/usr/local/lib/python2.7/dist-packages/shade/task_manager.py", line 80, in wait
    self._traceback)
  File "/usr/local/lib/python2.7/dist-packages/shade/task_manager.py", line 108, in run
    self.done(self.main(client))
  File "/usr/local/lib/python2.7/dist-packages/shade/_tasks.py", line 344, in main
    client.glance_client.images.update(**self.args)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 279, in update
    self.http_client.patch(url, headers=hdrs, data=image.patch)
  File "/usr/local/lib/python2.7/dist-packages/warlock/model.py", line 72, in __getattr__
    raise AttributeError(key)
AttributeError: patch

Revision history for this message
Logan V (loganv) wrote :

# pip freeze | grep -iP '(glance|shade|warlock|ansible)'
ansible==2.1.0.0
python-glanceclient==2.0.0
shade==1.9.0
warlock==1.2.0

Revision history for this message
Ian Cordasco (icordasc) wrote :

I'm tempted to think this is a problem with shade or os-client-config and that this should be reported to storyboard.openstack.org. The glance client should never have a warlock model as an HTTP Client and this seems like it might be a problem with how shade/os-client-config has configured the glance client.

Revision history for this message
Ian Cordasco (icordasc) wrote :

There have been no updates to this. It could be an issue in warlock, shade, or os-client-config, but it's certainly not something I was ever able to reproduce in glanceclient.

Changed in python-glanceclient:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.