yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07837
[Bug 1249194] Re: nova add-fixed-ip not work
** Changed in: nova
Status: New => Invalid
--
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/1249194
Title:
nova add-fixed-ip not work
Status in OpenStack Compute (Nova):
Invalid
Bug description:
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, I run command to create the port:
neutron port-create --tenant-id ${tenant-id} --device-id ${instance_id} ${net-name}
But the value for data =
neutronv2.get_client(context).list_ports(**search_opts) is still
empty.
Then I get into database and find the new port created by "neutron
port-create" do not have "device_owner":
mysql> select * from ports where device_id='27d1f715-cec2-4514-83e2-1066842a745a';
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------+
| tenant_id | id | name | network_id | mac_address | admin_state_up | status | device_id | device_owner |
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------+
| 45c69667e2a64c889719ef8d8e0dd098 | d2e64bc6-29b3-476e-8caf-74b0420529c1 | | 316215a2-e514-4dea-a061-6b335e89ccd7 | fa:16:3e:0c:b7:cd | 1 | ACTIVE | 27d1f715-cec2-4514-83e2-1066842a745a | compute:None |
| 45c69667e2a64c889719ef8d8e0dd098 | ece1fa2d-bf8d-4c04-933e-ffadc447bfd2 | | 8232d0b8-4204-4751-ba42-04345c2dbe5a | fa:16:3e:59:3c:61 | 1 | DOWN | 27d1f715-cec2-4514-83e2-1066842a745a | |
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------+
Anyone know why this happens ????
How to add device_owner to the port ???
Thanks.
-chen
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1249194/+subscriptions