← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1192715] Re: nova ec2-api: euca-describe-tags fails with UnknownError

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-2

-- 
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/1192715

Title:
  nova ec2-api: euca-describe-tags fails with UnknownError

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  I believe this is because the following call was added to
  compute/api.py:

  @wrap_check_policy
  def get_all_instance_metadata(self, context, search_filts):

  And check_policy needs a target (an instance) to check against -- all
  the other functions that use this wrapper have (self, context,
  instance) as the first three arguments.

  Removing the wrapper lets the call succeed, but is it the right thing
  to do?

  --

  2013-06-19 21:04:38.221 16387 DEBUG nova.utils [-] Reloading cached file /etc/nova/policy.json read_cached_file /opt/stack/nova/nova/utils.py:750
  2013-06-19 21:04:38.250 DEBUG nova.api.ec2 [req-7848f2fe-0069-45c9-abe0-9fd10d45fee3 demo demo] action: DescribeTags __call__ /opt/stack/nova/nova/api/ec2/__init__.py:336
  2013-06-19 21:04:38.254 ERROR nova.api.ec2 [req-7848f2fe-0069-45c9-abe0-9fd10d45fee3 demo demo] Unexpected error raised: list indices must be integers, not unicode
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2 Traceback (most recent call last):
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/api/ec2/__init__.py", line 486, in __call__
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     result = api_request.invoke(context)
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/api/ec2/apirequest.py", line 79, in invoke
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     result = method(context, **args)
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/api/ec2/cloud.py", line 1826, in describe_tags
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     search_filts):
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/compute/api.py", line 169, in wrapped
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     check_policy(context, func.__name__, target, scope)
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/compute/api.py", line 181, in check_policy
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     nova.policy.enforce(context, _action, target)
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/policy.py", line 102, in enforce
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     return policy.check(action, target, credentials, **extra)
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/openstack/common/policy.py", line 175, in check
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     result = _rules[rule](target, creds)
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/openstack/common/policy.py", line 731, in __call__
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     return _rules[self.match](target, creds)
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/openstack/common/policy.py", line 365, in __call__
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     if rule(target, cred):
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2   File "/opt/stack/nova/nova/openstack/common/policy.py", line 776, in __call__
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2     match = self.match % target
  2013-06-19 21:04:38.254 16387 TRACE nova.api.ec2 TypeError: list indices must be integers, not unicode

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