OpenStack删除物理主机后控制台报错处理

公司平台一台物理节点出故障手动移除该节点后,点击控制台报错如下截图,实际使用中管理台的计算节点功能均正常。

错误:无法获取虚拟机管理信息。

下线物理机的时候原物理机的主机名为computer1新上线物理机为compute1,通过openstack compute service list命令显示如下:

[[email protected] images]# openstack compute service list
+----+------------------+-------------+----------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+------------------+-------------+----------+---------+-------+----------------------------+
| 2 | nova-cert                 | controller1 | internal | enabled | up | 2017-08-23T03:47:32.000000 |
| 6 | nova-conductor       | controller1 | internal | enabled | up | 2017-08-23T03:47:36.000000 |
| 17 | nova-scheduler     | controller1 | internal | enabled | up | 2017-08-23T03:47:34.000000 |
| 25 | nova-consoleauth | controller1 | internal | enabled | up | 2017-08-23T03:47:31.000000 |
| 27 | nova-cert               | controller2 | internal | enabled | up | 2017-08-23T03:47:36.000000 |
| 30 | nova-cert               | controller3 | internal | enabled | up | 2017-08-23T03:47:33.000000 |
| 32 | nova-conductor     | controller3 | internal | enabled | up | 2017-08-23T03:47:35.000000 |
| 36 | nova-scheduler     | controller3 | internal | enabled | up | 2017-08-23T03:47:38.000000 |
| 39 | nova-scheduler     | controller2 | internal | enabled | up | 2017-08-23T03:47:37.000000 |
| 43 | nova-conductor     | controller2 | internal | enabled | up | 2017-08-23T03:47:37.000000 |
| 57 | nova-compute       | compute1  |   nova   | enabled | up | 2017-08-23T03:46:50.000000 |

| 59 | nova-compute       | compute1  |   nova   | enabled | down | 2017-08-23T03:46:50.000000 |

+----+------------------+-------------+----------+---------+-------+----------------------------+

使用命令:

[[email protected] images]# openstack compute service -h
Command "compute" matches:
compute agent create
compute agent delete
compute agent list
compute agent set
compute service delete
compute service list
compute service set

[[email protected] images]# openstack compute service delete -h
usage: openstack compute service delete [-h] <service> [<service> ...]

Delete compute service(s)

positional arguments:
<service> Compute service(s) to delete (ID only)

optional arguments:
-h, --help show this help message and exit

[[email protected] images]# openstack compute service delete 59

[[email protected] images]# openstack compute service list

+----+------------------+-------------+----------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+------------------+-------------+----------+---------+-------+----------------------------+
| 2 | nova-cert               | controller1 | internal | enabled | up | 2017-08-23T04:04:22.000000 |
| 6 | nova-conductor     | controller1 | internal | enabled | up | 2017-08-23T04:04:30.000000 |
| 17 | nova-scheduler   | controller1 | internal | enabled | up | 2017-08-23T04:04:24.000000 |
| 25 | nova-consoleauth | controller1 | internal | enabled | up | 2017-08-23T04:04:31.000000 |
| 27 | nova-cert             | controller2 | internal | enabled | up | 2017-08-23T04:04:26.000000 |
| 30 | nova-cert             | controller3 | internal | enabled | up | 2017-08-23T04:04:24.000000 |
| 32 | nova-conductor   | controller3 | internal | enabled | up | 2017-08-23T04:04:32.000000 |
| 36 | nova-scheduler   | controller3 | internal | enabled | up | 2017-08-23T04:04:28.000000 |
| 39 | nova-scheduler   | controller2 | internal | enabled | up | 2017-08-23T04:04:27.000000 |
| 43 | nova-conductor   | controller2 | internal | enabled | up | 2017-08-23T04:04:29.000000 |
| 57 | nova-compute     | compute1 | nova | enabled | up | 2017-08-23T04:03:50.000000 |
+----+------------------+-------------+----------+---------+-------+----------------------------+

PS:查询资料建议先使用 nova service-disable computer1 nova-compute禁用掉computer1的nova服务器再进行删除操作

删除后使用dashboard过程中点击--虚拟机管理器报错:错误:无法获取虚拟机管理信息。

初步怀疑是删除物理节点导致问题,查询/var/log/nova/nova-api.log后发现不能发现主机computer1,初步推断为数据库中有未移除内容导致。

查询数据库中信息:

MariaDB [nova]> select * from nova.services;
+---------------------+---------------------+---------------------+----+-------------+--------------------+-------------+--------------+----------+---------+-------------------------------------+---------------------+-------------+---------+
| created_at | updated_at | deleted_at | id | host | binary | topic | report_count | disabled | deleted | disabled_reason | last_seen_up | forced_down | version |
+---------------------+---------------------+---------------------+----+-------------+--------------------+-------------+--------------+----------+---------+-------------------------------------+---------------------+-------------+---------+
| 2017-08-21 15:58:33 | 2017-08-23 04:23:03 | NULL | 2 | controller1 | nova-cert | cert | 13093 | 0 | 0 | NULL | 2017-08-23 04:23:03 | 0 | 15 |
| 2017-08-21 15:58:33 | 2017-08-23 04:23:10 | NULL | 6 | controller1 | nova-conductor | conductor | 13099 | 0 | 0 | NULL | 2017-08-23 04:23:10 | 0 | 15 |
| 2017-08-21 15:58:34 | NULL | NULL | 15 | 0.0.0.0 | nova-osapi_compute | NULL | 0 | 0 | 0 | NULL | NULL | 0 | 15 |
| 2017-08-21 15:58:35 | 2017-08-23 04:23:04 | NULL | 17 | controller1 | nova-scheduler | scheduler | 13096 | 0 | 0 | NULL | 2017-08-23 04:23:04 | 0 | 15 |
| 2017-08-21 15:58:35 | NULL | NULL | 20 | 0.0.0.0 | nova-metadata | NULL | 0 | 0 | 0 | NULL | NULL | 0 | 15 |
| 2017-08-21 15:58:35 | 2017-08-23 04:23:11 | NULL | 25 | controller1 | nova-consoleauth | consoleauth | 13097 | 0 | 0 | NULL | 2017-08-23 04:23:11 | 0 | 15 |
| 2017-08-21 15:59:00 | 2017-08-23 04:23:07 | NULL | 27 | controller2 | nova-cert | cert | 13088 | 0 | 0 | NULL | 2017-08-23 04:23:07 | 0 | 15 |
| 2017-08-21 15:59:03 | 2017-08-23 04:23:04 | NULL | 30 | controller3 | nova-cert | cert | 13088 | 0 | 0 | NULL | 2017-08-23 04:23:04 | 0 | 15 |
| 2017-08-21 15:59:03 | 2017-08-23 04:23:10 | NULL | 32 | controller3 | nova-conductor | conductor | 13082 | 0 | 0 | NULL | 2017-08-23 04:23:09 | 0 | 15 |
| 2017-08-21 15:59:03 | 2017-08-23 04:23:08 | NULL | 36 | controller3 | nova-scheduler | scheduler | 13094 | 0 | 0 | NULL | 2017-08-23 04:23:08 | 0 | 15 |
| 2017-08-21 15:59:04 | 2017-08-23 04:23:07 | NULL | 39 | controller2 | nova-scheduler | scheduler | 13094 | 0 | 0 | NULL | 2017-08-23 04:23:07 | 0 | 15 |
| 2017-08-21 15:59:05 | 2017-08-23 04:23:10 | NULL | 43 | controller2 | nova-conductor | conductor | 13092 | 0 | 0 | NULL | 2017-08-23 04:23:10 | 0 | 15 |
| 2017-08-21 16:03:34 | 2017-08-22 04:40:22 | 2017-08-22 10:24:43 | 53 | compute1 | nova-compute | compute | 749 | 1 | 53 | AUTO: Connection to libvirt lost: 0 | 2017-08-22 04:39:52 | 0 | 15 |
| 2017-08-22 13:41:19 | 2017-08-23 04:22:50 | NULL | 57 | compute1 | nova-compute | compute | 883 | 0 | 0 | NULL | 2017-08-23 04:22:50 | 0 | 15 |
+---------------------+---------------------+---------------------+----+-------------+--------------------+-------------+--------------+----------+---------+-------------------------------------+--------------

MariaDB [nova]> delete from compute_nodes where hypervisor_hostname="computer1";
Query OK, 2 rows affected (0.56sec)

MariaDB [nova]> delete from nova.services where host="computer1";

Query OK, 0 rows affected (0.61 sec)

重新登录dashboard后正常显示节点信息。

时间: 2024-10-14 22:59:53

OpenStack删除物理主机后控制台报错处理的相关文章

azure云迁移后expdp报错ORA-01110: data file 201: &#39;/home/oradata/powerdes/temp01.dbf&#39;

1,expdp的时候报错: 在idc的oracle服务器上正常导入导出都ok的,但是到了azure云上就出故障了: [[email protected] oracle]$ expdp \'powerdesk/testcrmfile\' directory=DIR_DUMP tables=bis_floor,bis_shop,bis_shop_conn,bis_store,bis_cont dumpfile=zhengyin.qu_bak_$(date +%Y%m%d)_02.dmp Export

安装mongodb后启动报错libstdc++

安装mongo后启动报错如下图 显然说是libstdc++.so文件版本的问题,这种一般都是gcc版本太低了 接着查询gcc的版本    strings /usr/lib/libstdc++.so.6 | grep GLIBCXX 接着去找下libstdc++.so新点的版本,一定要根据自己的系统版本去找啊,由于我找错了版本报错系统位数不对 随后下载了一个64位的libstdc++.so.6.0.17的文件,然后软链成libstdc++.so.6 ln -s libstdc++.so.6.0.1

dialogic d300语音卡驱动重装后启动报错问题解决方法

dialogic d300 驱动重装后 dlstart  报错解决 问题描述:dlstart  后如下报错 [[email protected] data]#dlstop Stopping Dialogic Services... Stopping Clocking Daemon:[  纭畾  ] Stopping ClockingServer:[  纭畾  ] Stopping Telephony System Monitor:[  纭畾  ] Stopping Dialogic(R)

升级php7后的报错处理

*由于php7的出现带来大幅的性能提升,想体验下新版本带来的特性,因此做了升级. 发现在网站中请求接口时发生错误,排查后把解决方法记录下来 升级php后站点报错,提示如下: Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and willbe removed in a future version. To avoid this warning set'always_populate_raw_post_d

Maven项目下update maven后Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderL

Maven项目下update maven后Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderL     严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.co

安卓工作室 android studio 汉化后,报错。 设置界面打不开。Can&#39;t find resource for bundle java.util.PropertyResourceBundle, key emmet.bem.class.name.element.separator.label

安卓工作室 android studio 汉化后,报错. 设置界面打不开. Android studio has been sinified and reported wrong.The setup interface cannot be opened. 安卓工作室 android studio 版本 2.3.3 Android studio version 2.3.3 汉化包版本 AndroidStudio_v2.0.0.20_resources_cn-v0.2-20170414.jar Lo

使用Entity Framework迁移完数据库后,每次修改代码(非模型代码)后都报错。

问题:使用Entity Framework迁移完数据库后,每次修改代码(非模型代码)后都报错: 支持“XXXDbContext”上下文的模型已在数据库创建后发生更改.请考虑使用 Code First 迁移更新数据库(http://go.microsoft.com/fwlink/?LinkId=238269). 这时如果执行 Add-Migration 生成的迁移代码是空的.于是重新Update-Database,结果却是No pending explicit migrations. 不过这时是不

导入别人工程后项目报错,有个小红叉

Target runtime com.genuitec.runtime.generic 系统加载工程后,报错Target runtime com.genuitec.runtime.generic.jee60 is not defined,在发布工程的同事电脑上正常 2 新导入的工程,出问题很大可能是jdk的版本问题导致,检查一下,发现jdk果然不一致,修改了jdk版本,但异常没有消除 3 网上查询下解决方案,原来在工程目录下的settings,有个文件也需要修改下 4 打开该文件,会发现<run

node+react 打包成功,控制台报错

控制台报错: 'ReactCurrentOwner' of undefined 解决办法:RN版本的问题. As I mentioned, make sure you've installed the correct version of React. If you're using React Native 0.45: yarn add [email protected] npm install [email protected] --save-dev npm install --save-d