0

我正在(尝试)在 Ubuntu 12.04 服务器上测试新的 OpenStack Essex 安装,截至本文已完全更新。当我启动我的第一个 VM 时,由于配置错误导致了一些网络问题,所以我删除了固定的 IPv4 网络定义。显然这是一个错误,因为试图启动图像的 nova-compute 节点在守护进程启动时崩溃并出现“NetworkNotFound”错误,大概是因为它找不到我必须删除的错误配置的网络 ID。我已经发布了“nova delete”来删除虚拟机,但它仍然显示为“nova list ...”等。(我猜是因为 nova-compute 无法启动,它无法检查队列删除损坏的图像。所以...我如何让 nova-compute 重新启动,并删除 VM 的所有痕迹?

2012-05-02 15:46:02 TRACE nova Traceback (most recent call last):
2012-05-02 15:46:02 TRACE nova   File "/usr/bin/nova-compute", line 49, in <module>
2012-05-02 15:46:02 TRACE nova     service.wait()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 413, in wait
2012-05-02 15:46:02 TRACE nova     _launcher.wait()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 131, in wait
2012-05-02 15:46:02 TRACE nova     service.wait()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2012-05-02 15:46:02 TRACE nova     return self._exit_event.wait()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2012-05-02 15:46:02 TRACE nova     return hubs.get_hub().switch()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2012-05-02 15:46:02 TRACE nova     return self.greenlet.switch()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2012-05-02 15:46:02 TRACE nova     result = function(*args, **kwargs)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
2012-05-02 15:46:02 TRACE nova     server.start()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 162, in start
2012-05-02 15:46:02 TRACE nova     self.manager.init_host()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 247, in init_host
2012-05-02 15:46:02 TRACE nova     self.reboot_instance(context, instance['uuid'])
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2012-05-02 15:46:02 TRACE nova     return f(*args, **kw)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 153, in decorated_function
2012-05-02 15:46:02 TRACE nova     function(self, context, instance_uuid, *args, **kwargs)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 177, in decorated_function
2012-05-02 15:46:02 TRACE nova     sys.exc_info())
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-05-02 15:46:02 TRACE nova     self.gen.next()
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 171, in decorated_function
2012-05-02 15:46:02 TRACE nova     return function(self, context, instance_uuid, *args, **kwargs)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 896, in reboot_instance
2012-05-02 15:46:02 TRACE nova     network_info = self._get_instance_nw_info(context, instance)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 313, in _get_instance_nw_info
2012-05-02 15:46:02 TRACE nova     instance)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/network/api.py", line 219, in get_instance_nw_info
2012-05-02 15:46:02 TRACE nova     'args': args})
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/rpc/__init__.py", line 68, in call
2012-05-02 15:46:02 TRACE nova     return _get_impl().call(context, topic, msg, timeout)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 674, in call
2012-05-02 15:46:02 TRACE nova     return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 338, in call
2012-05-02 15:46:02 TRACE nova     rv = list(rv)
2012-05-02 15:46:02 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 306, in __iter__
2012-05-02 15:46:02 TRACE nova     raise result
2012-05-02 15:46:02 TRACE nova RemoteError: Remote error: NetworkNotFound Network 3 could not be found.
2012-05-02 15:46:02 TRACE nova [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 252, in _process_data\n    rval = node_func(context=ctxt, **node_args)\n', u'  File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 258, in wrapped\n    return func(self, context, *args, **kwargs)\n', u'  File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 957, in get_instance_nw_info\n    network = self._get_network_by_id(context, vif[\'network_id\'])\n', u'  File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 1733, in _get_network_by_id\n    network_id)\n', u'  File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 1549, in _get_network_by_id\n    return self.db.network_get(context, network_id)\n', u'  File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 755, in network_get\n    return IMPL.network_get(context, network_id)\n', u'  File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 120, in wrapper\n    return f(*args, **kwargs)\n', u'  File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 1920, in network_get\n    raise exception.NetworkNotFound(network_id=network_id)\n', u'NetworkNotFound: Network 3 could not be found.\n'].
4

1 回答 1

0

我的 OpenStack 部署也有类似的问题。解决方案非常简单:转到您的 Nova 数据库,并在网络表中创建一个新网络,但手动设置 id,在您的情况下 id=3。在此之后,您可以尝试再次删除该实例,它应该会正确终止。删除所有错误配置的实例后,再次从数据库中删除网络。

于 2012-05-23T19:16:07.610 回答