← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1646829] Re: handle ImageNotAuthorized in API layer

 

Reviewed:  https://review.openstack.org/406118
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=806c48097d351f0dd3b18c850adf6dd31df3b669
Submitter: Jenkins
Branch:    master

commit 806c48097d351f0dd3b18c850adf6dd31df3b669
Author: jichenjc <jichenjc@xxxxxxxxxx>
Date:   Sun Nov 27 23:13:44 2016 +0800

    Catch ImageNotAuthorized during boot instance
    
    ImageNotAuthorized is not caught during boot instance
    this could lead to 500 error to API layer
    
    Change-Id: Iaae14d27af7b4b8647e1024a5292bd21bcec5560
    Closes-Bug: 1646829


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1646829

Title:
  handle ImageNotAuthorized in API layer

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  a image is not authoried will lead to deploy have this error:

  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 73, in wrapper
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 631, in create
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     **create_kwargs)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/hooks.py", line 154, in inner
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     rv = f(*args, **kwargs)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1527, in create
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     check_server_group_quota=check_server_group_quota)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1111, in _create_instance
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     image_id, boot_meta = self._get_image(context, image_href)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 777, in _get_image
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     image = self.image_api.get(context, image_href)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/image/api.py", line 93, in get
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     show_deleted=show_deleted)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 475, in show
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions     raise exception.ImageNotAuthorized(image_id=1)
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions ImageNotAuthorized: Not authorized for image 1.
  2016-12-02 13:20:33.422 8679 ERROR nova.api.openstack.extensions
  2016-12-02 13:20:33.423 8679 INFO nova.api.openstack.wsgi [req-d48f57c1-2be4-4c3b-8216-2e87fcae2cb3 704e9da3c19e4cefa59e900f65f3cd60 ba73b7d1ad274dafaf4d0e49d347d446 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1646829/+subscriptions


References