发起问题

sunzuohua 的档案 - activity

2020-03-03 19:38:48 -0500 获得奖牌  热门的问题 (source)
2020-03-03 19:38:48 -0500 获得奖牌  著名问题 (source)
2020-03-03 19:38:48 -0500 获得奖牌  受欢迎的问题 (source)
2013-07-04 06:37:11 -0500 回答问题 attach interface error

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.

2013-07-04 01:47:17 -0500 问了问题 attach interface error

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?

2013-06-17 09:35:35 -0500 回答问题 I think the port should not be deleted when the interface is detched,if the port is created independently.

I view the codes.

In the method nova.compute.manager.ComputeManager.detach_interface(),the method nova.network.quantumv2.api.API.deallocate_port_for_instance() is called where the port is deleted.

def deallocate_port_for_instance(self, context, instance, port_id, conductor_api=None): try: quantumv2.get_client(context).delete_port(port_id) except Exception as ex: LOG.exception(_("Failed to delete quantum port %(port_id)s ") % locals())

This may be the problem.

2013-06-17 02:26:21 -0500 问了问题 I think the port should not be deleted when the interface is detched,if the port is created independently.

Hi:

I created a port,attached the interface to a VM,and then detached the interface from the VM.I found that the port was deleted.

I think the port should not be deleted when the interface is detched,if the port is created independently.

Thank you.