Revision history [back]

click to hide/show revision 1
initial version

How to configure nova-compute to get the right device_owner ??

Hi list,

I'm working under CentOS 6.4 + Havana.

I noticed there're some command support such as : nova add-fixed-ip nova interface-attach

Also, in neutron, neutron port-create

So, I guess it should be possible to add a new virtual NIC port on a running instances, right ?

But, after I run command: nova add-fixed-ip ${instance_name} ${net-id}

I get error in nova-compute.log:

2013-11-06 14:16:14.816 11803 DEBUG qpid.messaging.io.ops [-] SENT[28db2d8]: SessionCompleted(commands=[0-39]) write_op /usr/lib/python2.6/site-packages/qpid/messaging/driver.py:686 2013-11-06 14:16:14.818 11803 ERROR nova.openstack.common.rpc.amqp [req-fdb9abd1-f952-4e90-afb9-5803d3200810 c4633e89685d41c4a2d20a2234b5025e 45c69667e2a64c889719ef8d8e0dd098] Exception during message handling 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last): 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 461, in _process_data 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp *args) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 90, in wrapped 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp payload) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 73, in wrapped 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return f(self, context, args, *kw) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 243, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp pass 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 229, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return function(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 271, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp e, sys.exc_info()) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 258, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return function(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 3169, in add_fixed_ip_to_instance 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp network_id, conductor_api=self.conductor_api) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 49, in wrapper 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp res = f(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 513, in add_fixed_ip_to_instance 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp instance_id=instance['uuid']) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp NetworkNotFoundForInstance: Network could not be found for instance 27d1f715-cec2-4514-83e2-1066842a745a. 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp

Then I checked "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py" function add_fixed_ip_to_instance, find the value for data = neutronv2.get_client(context).list_ports(**search_opts) is empty.

So based on the **search_opt, I find the device_owner is compute:None, looks wrong. But, how can I configure nova-compute to get the correct device_owner??

Thanks. -chen

How to configure nova-compute to get the right device_owner ??enable nova add-fixed-ip

Hi list,

I'm working under CentOS 6.4 + Havana.

I noticed there're some command support such as : nova add-fixed-ip nova interface-attach

Also, in neutron, neutron port-create

So, I guess it should be possible to add a new virtual NIC port on a running instances, right ?

But, after I run command: nova add-fixed-ip ${instance_name} ${net-id}

I get error in nova-compute.log:

2013-11-06 14:16:14.816 11803 DEBUG qpid.messaging.io.ops [-] SENT[28db2d8]: SessionCompleted(commands=[0-39]) write_op /usr/lib/python2.6/site-packages/qpid/messaging/driver.py:686 2013-11-06 14:16:14.818 11803 ERROR nova.openstack.common.rpc.amqp [req-fdb9abd1-f952-4e90-afb9-5803d3200810 c4633e89685d41c4a2d20a2234b5025e 45c69667e2a64c889719ef8d8e0dd098] Exception during message handling 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last): 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 461, in _process_data 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp *args) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 90, in wrapped 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp payload) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 73, in wrapped 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return f(self, context, args, *kw) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 243, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp pass 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 229, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return function(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 271, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp e, sys.exc_info()) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 258, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return function(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 3169, in add_fixed_ip_to_instance 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp network_id, conductor_api=self.conductor_api) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 49, in wrapper 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp res = f(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 513, in add_fixed_ip_to_instance 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp instance_id=instance['uuid']) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp NetworkNotFoundForInstance: Network could not be found for instance 27d1f715-cec2-4514-83e2-1066842a745a. 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp

Then I checked "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py" function add_fixed_ip_to_instance, find the value for data = neutronv2.get_client(context).list_ports(**search_opts) is empty.

So based on the **search_opt, I find the device_owner is compute:None, looks wrong. But, how can I configure nova-compute to get the correct device_owner??Anyone know why this happens ????

Thanks. -chen