failed to create images

Bug #1783681 reported by Dan Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shade
New
Undecided
Unassigned

Bug Description

When I create an OpenStack image, it failed with the log
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    visibility='private')
  File "/usr/lib/python2.7/site-packages/shade/openstackcloud.py", line 3640, in create_image
    **image_kwargs)
  File "/usr/lib/python2.7/site-packages/shade/openstackcloud.py", line 3764, in _upload_image_put
    name, image_data, meta, **image_kwargs)
  File "/usr/lib/python2.7/site-packages/shade/openstackcloud.py", line 3698, in _upload_image_put_v2
    image = self._image_client.post('/images', json=image_kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 297, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/shade/_adapter.py", line 211, in request
    return self._munch_response(response, error_message=error_message)
  File "/usr/lib/python2.7/site-packages/shade/_adapter.py", line 121, in _munch_response
    exc.raise_from_response(response, error_message=error_message)
  File "/usr/lib/python2.7/site-packages/shade/exc.py", line 163, in raise_from_response
    raise OpenStackCloudHTTPError(msg, response=response)
shade.exc.OpenStackCloudHTTPError: (403) Client Error for url: https://image.az1.dc1.openfv.com:443/v2/images Forbidden (Inner Exception: Expecting value: line 1 column 1 (char 0))

The request is
curl -g -i --cacert "" -X POST https://image.az1.dc1.openfv.com:443/v2/images -H "User-Agent: os-client-config/1.28.0 shade/1.22.2 keystoneauth1/3.1.0 python-requests/2.18.2 CPython/2.7.14" -H "Content-Type: application/json" -H "X-Auth-Token: {SHA1}e8dd064c3c77e8eb078b3b168fd0f4c811317763"
-d '{"owner_specified.shade.md5": "443b7623e27ecf03dc9e01ee93f67afe", "owner_specified.shade.sha256": "a8dd75ecffd4cdd96072d60c2237b448e0c8b2bc94d57f10fdbc8c481d9005b8", "owner_specified.shade.object": "images/vping_ssh-img_a8b1473d-6b5e-44b4-8269-52f5efdd732d", "container_format": "bare", "disk_format": "qcow2", "visibility": "private", "name": "vping_ssh-img_a8b1473d-6b5e-44b4-8269-52f5efdd732d"}

It seems that the additional 'owner_specified.shade.md5', 'owner_specified.shade.sha256' and 'owner_specified.shade.object' have been forbidden by my cloud.
Are these necessary? Could it been moved to something like metadata or properties?

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.