← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1432455] [NEW] non-admin user can't add new fixed ip to the VM by os-multinic api

 

Public bug reported:

When non-admin user add new nic to the vm by:

alex@hp-pc:/opt/stack/nova$ nova --debug add-fixed-ip vm1 12d4bedb-77fb-
44da-b6d6-6c52e7606c02


will get error as below:

2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/network/manager.py", line 778, in add_fixed_ip_to_instance
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     self._allocate_fixed_ips(context, instance_id, host, [network])
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/network/manager.py", line 194, in _allocate_fixed_ips
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     vpn=vpn, address=address)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/network/manager.py", line 1938, in allocate_fixed_ip
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     address = fip.address
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/base.py", line 161, in wrapper
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     args, kwargs)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/conductor/rpcapi.py", line 365, in object_class_action
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     objver=objver, args=args, kwargs=kwargs)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 156, in call
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     retry=self.retry)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 90, in _send
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     timeout=timeout, retry=retry)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 349, in send
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     retry=retry)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 340, in _send
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     raise result
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher AdminRequired_Remote: User does not have admin privileges
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/conductor/manager.py", line 420, in _object_dispatch
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     """Perform a classmethod action on an object."""
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/base.py", line 163, in wrapper
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     result = fn(cls, context, *args, **kwargs)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/fixed_ip.py", line 160, in associate_pool
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     host=host)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/db/api.py", line 509, in fixed_ip_associate_pool
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     instance_uuid, host)
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 127, in wrapper
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/context.py", line 235, in require_admin_context
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher AdminRequired: User does not have admin privileges

** Affects: nova
     Importance: Undecided
     Assignee: Alex Xu (xuhj)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Alex Xu (xuhj)

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

Title:
  non-admin user can't add new fixed ip to the VM by os-multinic api

Status in OpenStack Compute (Nova):
  New

Bug description:
  When non-admin user add new nic to the vm by:

  alex@hp-pc:/opt/stack/nova$ nova --debug add-fixed-ip vm1 12d4bedb-
  77fb-44da-b6d6-6c52e7606c02

  
  will get error as below:

  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/network/manager.py", line 778, in add_fixed_ip_to_instance
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     self._allocate_fixed_ips(context, instance_id, host, [network])
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/network/manager.py", line 194, in _allocate_fixed_ips
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     vpn=vpn, address=address)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/network/manager.py", line 1938, in allocate_fixed_ip
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     address = fip.address
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/base.py", line 161, in wrapper
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     args, kwargs)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/conductor/rpcapi.py", line 365, in object_class_action
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     objver=objver, args=args, kwargs=kwargs)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 156, in call
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     retry=self.retry)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 90, in _send
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     timeout=timeout, retry=retry)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 349, in send
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     retry=retry)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 340, in _send
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     raise result
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher AdminRequired_Remote: User does not have admin privileges
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/conductor/manager.py", line 420, in _object_dispatch
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     """Perform a classmethod action on an object."""
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/base.py", line 163, in wrapper
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     result = fn(cls, context, *args, **kwargs)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/fixed_ip.py", line 160, in associate_pool
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     host=host)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/db/api.py", line 509, in fixed_ip_associate_pool
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher     instance_uuid, host)
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 127, in wrapper
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/context.py", line 235, in require_admin_context
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher
  2015-03-16 09:23:18.306 TRACE oslo_messaging.rpc.dispatcher AdminRequired: User does not have admin privileges

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


Follow ups

References