can not update locations

Bug #1412304 reported by Yukihiro KAWADA
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

If location-update using below cli then error occured and locations status changed to deleted.
Believe it or not, the file was also deleted.
I want to update only metadata of the location.

glance location-update (v2)
usage: glance --os-image-api-version 2 location-update --url <URL> [--metadata <STRING>] <ID>

glance --debug --os-image-api-version 2 location-update --url file:///var/lib/glance/images/7059e766-aa3f-4af9-83f4-c482177533e5 --metadata '{"foo":"bar"}' 7059e766-aa3f-4af9-83f4-c482177533e5

Error logs:
Request returned failure status 400.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/glanceclient/", line 608, in main
    args.func(client, args)
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/", line 304, in do_location_update
    image = gc.images.update_location(, args.url, metadata)
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/", line 284, in update_location
    self._send_image_update_request(image_id, patches)
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/", line 209, in _send_image_update_request
    self.http_client.patch(url, headers=hdrs, data=json.dumps(patch_body))
  File "/usr/lib/python2.7/site-packages/glanceclient/common/", line 277, in patch
    return self._request('PATCH', url, **kwargs)
  File "/usr/lib/python2.7/site-packages/glanceclient/common/", line 236, in _request
    raise exc.from_response(resp, resp.content)
HTTPBadRequest: <html>
  <title>400 Bad Request</title>
  <h1>400 Bad Request</h1>
  Invalid location<br /><br />

</html> (HTTP 400)
  <title>400 Bad Request</title>
  <h1>400 Bad Request</h1>
  Invalid location<br /><br />

</html> (HTTP 400)

Changed in glance:
assignee: nobody → Raga lahari (raga-lahari)
Changed in glance:
assignee: Raga lahari (raga-lahari) → nobody
Revision history for this message
Erno Kuvaja (jokke) wrote :

I cannot replicate the issue. Would you mind to share your configuration where you saw this behavior?

Changed in glance:
status: New → Incomplete
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.