Ask Your Question
0

attach interface error

asked 2013-07-04 01:47:17 -0500

sunzuohua gravatar image

I created a vm,created a port in a network different with the vm's network , and then attached the port to the vm.

The log is as follows:

File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line 430, in _process_data rval = self.proxy.dispatch(ctxt, version, method, **args)

File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py", line 133, in dispatch return getattr(proxyobj, method)(ctxt, **kwargs)

File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2983, in attach_interface self.conductor_api)

File "/usr/lib/python2.7/dist-packages/nova/network/api.py", line 46, in wrapper res = f(self, context, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 336, in allocate_port_for_instance conductor_api=conductor_api)

File "/usr/lib/python2.7/dist-packages/nova/network/api.py", line 46, in wrapper res = f(self, context, args, *kwargs)

File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 286, in allocate_for_instance nw_info = self._get_instance_nw_info(context, instance, networks=nets)

File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 368, in _get_instance_nw_info nw_info = self._build_network_info_model(context, instance, networks)

File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 797, in _build_network_info_model [n['id'] for n in networks])

File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 954, in _ensure_requested_network_ordering if preferred:

File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 954, in <lambda> if preferred:

ValueError: u'0dc714fa-9022-4a03-bb22-9821a396bb9d' is not in list

It looks like that a vm can't have ports in different networks. Is that right?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-07-04 04:16:24 -0500

keith-tobin gravatar image

The VM can only connect to the port of a network if,

A) the tenant that owns the VM is also the owner of the network. B) the network is flagged as a shared network, then any VM from any network can create a port and connect a VM.

What you can not do is have a VM belong to one tenant connect to a port in a second tenant network where that network is not a flagged as shared.

The above is true for quantum/neutron/openstack networking.

edit flag offensive delete link more
0

answered 2013-07-04 06:37:11 -0500

sunzuohua gravatar image

I think that may be a problem in nova. The method nova.network.quantumv2.api._ensure_requested_network_ordering() will sort the port list with respect to the preferred network ordering.But if there is a port which is not belong to any preferred,the error will occur.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-07-04 01:47:17 -0500

Seen: 114 times

Last updated: Jul 04 '13