Ask Your Question
1

'message': u'ImageNotAuthorized', u'code': 500, u'details': u'Not authorized for image ***

asked 2013-09-18 09:21:28 -0600

Joe-Lei gravatar image

updated 2014-03-07 14:43:56 -0600

smaffulli gravatar image

#precondition: 1. glance image-list
work fine 2. nova image-list
work fine 3. nova boot --flavor m1.tiny --image cirros
instance error, message:'ImageNotAuthorized

#trackback

File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 260, in decorated_function
  function(self, context, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 237, in decorated_function
  e, sys.exc_info())
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
  self.gen.next()
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 224, in decorated_function
  return function(self, context, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 1240, in run_instance
  do_run_instance()
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/openstack/common/lockutils.py", line 242, in inner
  retval = f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 1239, in do_run_instance
  admin_password, is_first_time, node, instance)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 895, in _run_instance
  self._set_instance_error_state(context, instance['uuid'])
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
  self.gen.next()
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 816, in _run_instance
  image_meta = self._check_image_size(context, instance)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 1022, in _check_image_size
  image_meta = _get_image_meta(context, instance['image_ref'])
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/compute/manager.py", line 268, in _get_image_meta
  return image_service.show(context, image_id)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/image/glance.py", line 239, in show
  _reraise_translated_image_exception(image_id)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/image/glance.py", line 237, in show
  image = self._client.call(context, 1, 'get', image_id)
File "/usr/local/lib/python2.7/dist-packages/nova-2013.1.4.a20.g43f2a4c-py2.7.egg/nova/image/glance.py", line 182, in call
  return getattr(client.images, method)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_glanceclient-0.11.0-py2.7.egg/glanceclient/v1/images.py", line 114, in get
  % urllib.quote(str(image_id)))
File "/usr/local/lib/python2.7/dist-packages/python_glanceclient-0.11.0-py2.7.egg/glanceclient/common/http.py", line 272, in raw_request
  return self._http_request(url, method, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_glanceclient-0.11.0-py2.7.egg/glanceclient/common/http.py", line 233, in _http_request
  raise exc.from_response(resp, body_str)
edit retag flag offensive close merge delete

Comments

Probably the "cirros" image is a private one! By "work fine", do you mean the "cirros" image you are using to boot a new instance is listed by "glance image-list" and "nova image-list"?

unmesh-gurjar gravatar imageunmesh-gurjar ( 2013-09-18 09:49:49 -0600 )edit

first of all ,thanks your commment. yes,it's listd by glance image-list, nova image-list ,and 'cirros' is public image, so when boot a instance and it's raise image not authorized is really confusion me,

Joe-Lei gravatar imageJoe-Lei ( 2013-09-18 19:57:01 -0600 )edit

3 answers

Sort by » oldest newest most voted
3

answered 2013-09-18 20:54:28 -0600

Joe-Lei gravatar image

updated 2014-03-07 14:43:03 -0600

smaffulli gravatar image

i found the answer: in nova.conf change rabbit_host=localhost to rabbit_host=10.10.1.51 (your glance auth ip)

if rabbit_host is localhost, when nova compute schedules a new instance, it will send to ampq queue, and ampq will use the host to glance to get image but localhost does not allow to get image so will raise the error image not authorized.

edit flag offensive delete link more

Comments

Please click the "tick" next to your answer to mark it as the accepted answer to this question. This will prevent it appearing in the list of unanswered questions. Thanks!

sgordon gravatar imagesgordon ( 2013-09-19 08:21:12 -0600 )edit
0

answered 2014-01-20 08:45:41 -0600

Hi, maybe you want to check this https://answers.launchpad.net/nova/+question/193324 (link)

edit flag offensive delete link more
0

answered 2014-05-06 06:13:26 -0600

nova.conf was missing the following line: ---auth_strategy=keystone

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-09-18 09:21:28 -0600

Seen: 2,719 times

Last updated: May 06 '14