openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #22859
How to hot-plug network interface for a running instance
Hi, All
I'm testing hot-plug network interface, I can successfully hot-add an
interface to a running instance by using command 'nova interface-attach
--net-id xxxxxx <instance_name>', but the network of the interface must has
been specified to instance when you create it. For a new network, I can't
attach it to the instance and got errors from nova-api.log:
==================================================================
2013-04-22 13:27:38.484 ERROR nova.api.openstack
[req-73c7fcb6-5137-43c0-aa4f-c3ba3509df64 3745e52df7864de79f912d7a9479e182
67b78b4656cf4affa49fc75b847e8914] Caught error:
u'e4eca07f-bf8e-435a-84e2-628f89067623' is not in list
Traceback (most recent call last):
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
2969, 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 335, 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 285, 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 367, 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 788, in _build_network_info_model
[n['id'] for n in networks])
File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py",
line 945, in _ensure_requested_network_ordering
unordered.sort(key=lambda i: preferred.index(accessor(i)))
File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py",
line 945, in <lambda>
unordered.sort(key=lambda i: preferred.index(accessor(i)))
ValueError: u'e4eca07f-bf8e-435a-84e2-628f89067623' is not in list
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack Traceback (most
recent call last):
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py", line 81,
in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
req.get_response(self.application)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack application,
catch_exc_info=False)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/request.py", line 1260, in
call_application
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack app_iter =
application(self.environ, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
resp(environ, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py",
line 450, in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
self.app(env, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
resp(environ, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
resp(environ, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
resp(environ, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in
__call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack response =
self.app(environ, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
resp(environ, start_response)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack resp =
self.call_func(req, *args, **self.kwargs)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
self.func(req, *args, **kwargs)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 890, in
__call__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack content_type,
body, accept)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 942, in
_process_stack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack action_result =
self.dispatch(meth, request, action_args)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 1022,
in dispatch
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
method(req=request, **action_args)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/attach_interfaces.py",
line 104, in create
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack instance,
network_id, port_id, req_ip)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 164, in wrapped
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
func(self, context, target, *args, **kwargs)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2357, in
attach_interface
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
requested_ip=requested_ip)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/compute/rpcapi.py", line 216, in
attach_interface
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack version='2.25')
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/proxy.py", line
80, in call
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
rpc.call(context, self._get_topic(topic), msg, timeout)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/__init__.py",
line 140, in call
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
_get_impl().call(CONF, context, topic, msg, timeout)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/impl_kombu.py",
line 798, in call
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
rpc_amqp.get_connection_pool(conf, Connection))
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line
612, in call
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack rv = list(rv)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line
561, in __iter__
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack raise result
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack ValueError:
u'e4eca07f-bf8e-435a-84e2-628f89067623' is not in list
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack Traceback (most
recent call last):
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line
430, in _process_data
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack rval =
self.proxy.dispatch(ctxt, version, method, **args)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py",
line 133, in dispatch
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack return
getattr(proxyobj, method)(ctxt, **kwargs)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2969, in
attach_interface
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
self.conductor_api)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/api.py", line 46, in wrapper
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack res = f(self,
context, *args, **kwargs)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 335,
in allocate_port_for_instance
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
conductor_api=conductor_api)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/api.py", line 46, in wrapper
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack res = f(self,
context, *args, **kwargs)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 285,
in allocate_for_instance
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack nw_info =
self._get_instance_nw_info(context, instance, networks=nets)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 367,
in _get_instance_nw_info
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack nw_info =
self._build_network_info_model(context, instance, networks)
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 788,
in _build_network_info_model
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack [n['id'] for n
in networks])
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 945,
in _ensure_requested_network_ordering
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
unordered.sort(key=lambda i: preferred.index(accessor(i)))
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack File
"/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 945,
in <lambda>
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
unordered.sort(key=lambda i: preferred.index(accessor(i)))
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack ValueError:
u'e4eca07f-bf8e-435a-84e2-628f89067623' is not in list
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
2013-04-22 13:27:38.484 22571 TRACE nova.api.openstack
==================================================================
Ray
Follow ups