openstack 彻底删除nova节点

1,将节点上所有实例迁移都其他节点
2,停止节点服务
2,进入数据库,use nova;

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 | uuid                                 |
+---------------------+---------------------+------------+-----+----------------------+--------------------+-------------+--------------+----------+---------+-----------------+---------------------+-------------+---------+--------------------------------------+
| 2019-03-11 10:30:01 | NULL                | NULL       |   4 | 100.100.32.201       | nova-osapi_compute | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      35 | 3becc105-44cf-4885-8b2d-8048d00ded47 |
| 2019-03-11 10:30:01 | NULL                | NULL       |  10 | 100.100.32.201       | nova-metadata      | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      35 | 387e3f1f-0823-4224-831b-df08cb2c1746 |
| 2019-03-11 10:30:13 | 2019-07-31 02:30:14 | NULL       |  19 | wuhan32-ceph01.v3.os | nova-scheduler     | scheduler   |      1202548 |        0 |       0 | NULL            | 2019-07-31 02:30:14 |           0 |      35 | d4c9496c-34f7-4f2f-9834-467cfafb01ac |
| 2019-03-11 10:30:14 | NULL                | NULL       |  43 | 100.100.32.203       | nova-osapi_compute | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      35 | 6009d41a-0b05-4137-8761-9fd12157e49c |
| 2019-03-11 10:30:14 | NULL                | NULL       |  46 | 100.100.32.202       | nova-osapi_compute | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      35 | 3b04e9a1-a603-4b32-bff7-d6702fafdf27 |
| 2019-03-11 10:30:14 | NULL                | NULL       |  55 | 100.100.32.203       | nova-metadata      | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      35 | 9a75e21e-856e-43f1-a876-fa1f301122f9 |
| 2019-03-11 10:30:15 | NULL                | NULL       |  61 | 100.100.32.202       | nova-metadata      | NULL        |            0 |        0 |       0 | NULL            | NULL                |           0 |      35 | 44068439-287a-454b-acfc-4330a63ed868 |
| 2019-03-11 10:30:18 | 2019-07-31 02:30:09 | NULL       |  73 | wuhan32-ceph03.v3.os | nova-scheduler     | scheduler   |      1202466 |        0 |       0 | NULL            | 2019-07-31 02:30:09 |           0 |      35 | 1d6144dd-0b3b-4f45-99d2-5804938d5184 |
| 2019-03-11 10:30:19 | 2019-07-31 02:30:14 | NULL       | 103 | wuhan32-ceph02.v3.os | nova-scheduler     | scheduler   |      1197330 |        0 |       0 | NULL            | 2019-07-31 02:30:13 |           0 |      35 | 3f9a4d0c-b268-4351-bcc7-361eec6a4606 |
| 2019-03-11 10:30:21 | 2019-07-31 02:30:11 | NULL       | 133 | wuhan32-ceph01.v3.os | nova-conductor     | conductor   |      1202912 |        0 |       0 | NULL            | 2019-07-31 02:30:10 |           0 |      35 | 9c862d9e-451e-4a4d-9251-4e40f8a5c9a1 |
| 2019-03-11 10:30:24 | 2019-07-31 02:30:11 | NULL       | 136 | wuhan32-ceph02.v3.os | nova-conductor     | conductor   |      1198093 |        0 |       0 | NULL            | 2019-07-31 02:30:11 |           0 |      35 | c5cd2311-fb06-423e-9b94-f8e45815b8a1 |
| 2019-03-11 10:30:25 | 2019-07-31 02:30:14 | NULL       | 145 | wuhan32-ceph03.v3.os | nova-conductor     | conductor   |      1202915 |        0 |       0 | NULL            | 2019-07-31 02:30:14 |           0 |      35 | 3fd6eec5-e90c-4dd8-9f7c-36adb25b7b8c |
| 2019-03-11 10:30:27 | 2019-07-31 02:30:09 | NULL       | 151 | wuhan32-ceph01.v3.os | nova-consoleauth   | consoleauth |      1202847 |        0 |       0 | NULL            | 2019-07-31 02:30:09 |           0 |      35 | 0c50d5f8-5d09-4ec6-b01c-4783ffb31b5c |
| 2019-03-11 10:30:31 | 2019-07-31 02:30:15 | NULL       | 154 | wuhan32-ceph02.v3.os | nova-consoleauth   | consoleauth |      1197846 |        0 |       0 | NULL            | 2019-07-31 02:30:15 |           0 |      35 | 9ea57ee0-a3cf-4c93-b4a6-b4781d9219ca |
| 2019-03-11 10:30:31 | 2019-07-31 02:30:12 | NULL       | 157 | wuhan32-ceph03.v3.os | nova-consoleauth   | consoleauth |      1202629 |        0 |       0 | NULL            | 2019-07-31 02:30:12 |           0 |      35 | c8e39978-db2f-4450-bbe1-6e55fe9ba2ac |
| 2019-03-11 10:31:17 | 2019-07-27 10:14:22 | NULL       | 160 | wuhan32-ceph01.v3.os | nova-compute       | compute     |      1185461 |        1 |       0 | NULL            | 2019-07-27 10:14:22 |           0 |      35 | 42b0abcf-5269-452d-8440-d94d3e65be5f |
| 2019-03-11 10:31:21 | 2019-07-31 02:30:15 | NULL       | 163 | wuhan32-ceph02.v3.os | nova-compute       | compute     |      1199198 |        1 |       0 | NULL            | 2019-07-31 02:30:15 |           0 |      35 | 6de82966-51fe-445a-a44c-cc3640f24135 |
| 2019-03-11 10:31:22 | 2019-07-31 02:30:10 | NULL       | 166 | wuhan32-ceph03.v3.os | nova-compute       | compute     |      1203925 |        1 |       0 | NULL            | 2019-07-31 02:30:10 |           0 |      35 | f03ff74a-0f25-48be-a0ee-bee119256a26 |
| 2019-03-20 04:42:44 | 2019-07-31 02:30:09 | NULL       | 169 | wuhan32-nova01.v3.os | nova-compute       | compute     |      1135132 |        1 |       0 | NULL            | 2019-07-31 02:30:09 |           0 |      35 | e69d60b3-6a14-423f-a1ea-c10efd372fb1 |
| 2019-03-20 04:42:44 | 2019-07-31 02:30:08 | NULL       | 172 | wuhan32-nova02.v3.os | nova-compute       | compute     |      1135141 |        1 |       0 | NULL            | 2019-07-31 02:30:08 |           0 |      35 | 1ed15525-1510-4ece-8159-57c500810a4c |
| 2019-03-20 09:15:32 | 2019-07-31 02:30:10 | NULL       | 178 | wuhan32-nova03.v3.os | nova-compute       | compute     |      1133477 |        1 |       0 | NULL            | 2019-07-31 02:30:10 |           0 |      35 | 3331d4e6-7a0d-4840-992f-676f82372870 |
| 2019-03-20 09:30:06 | 2019-07-31 02:30:14 | NULL       | 184 | wuhan32-nova04.v3.os | nova-compute       | compute     |      1133343 |        0 |       0 | NULL            | 2019-07-31 02:30:14 |           0 |      35 | 2afab391-6421-4765-a281-75d6e217decf |
| 2019-03-20 09:58:53 | 2019-07-31 02:30:09 | NULL       | 190 | wuhan32-nova05.v3.os | nova-compute       | compute     |      1133243 |        1 |       0 | NULL            | 2019-07-31 02:30:09 |           0 |      35 | 3ee7cc40-ba2b-4796-9b32-c993ce0bce2d |
| 2019-03-20 09:58:52 | 2019-07-31 02:30:09 | NULL       | 193 | wuhan32-nova06.v3.os | nova-compute       | compute     |      1133251 |        1 |       0 | NULL            | 2019-07-31 02:30:09 |           0 |      35 | 30c17f15-a759-4fd3-a9f3-96764224bd1c |
| 2019-06-03 06:40:29 | 2019-07-29 06:15:00 | NULL       | 196 | wuhan32-nova07.v3.os | nova-compute       | compute     |       467760 |        1 |       0 | NULL            | 2019-07-27 10:07:39 |           0 |      35 | c9671f52-8eb6-49b6-b2ae-b1e89cf545e3 |
| 2019-06-03 07:36:10 | 2019-07-26 04:14:16 | NULL       | 200 | wuhan32-nova08.v3.os | nova-compute       | compute     |       455860 |        1 |       0 | NULL            | 2019-07-26 01:56:38 |           0 |      35 | 4fbe496f-d2f0-4658-b814-808c1cef0b5b |
| 2019-06-03 08:13:41 | 2019-07-31 02:30:05 | NULL       | 202 | wuhan32-nova09.v3.os | nova-compute       | compute     |       485954 |        1 |       0 | NULL            | 2019-07-31 02:30:05 |           0 |      35 | cbc9232f-4b85-4d4e-8a1a-8899ff0aed2c |
| 2019-06-03 08:13:44 | 2019-07-31 02:30:12 | NULL       | 205 | wuhan32-nova10.v3.os | nova-compute       | compute     |       485952 |        1 |       0 | NULL            | 2019-07-31 02:30:12 |           0 |      35 | b228da41-7dba-42ab-adb5-340237f5a2d7 |
| 2019-06-10 07:17:15 | 2019-07-31 02:30:08 | NULL       | 208 | wuhan32-nova11.v3.os | nova-compute       | compute     |       424052 |        1 |       0 | NULL            | 2019-07-31 02:30:08 |           0 |      35 | 5ed6fed6-1dca-4a7a-b652-fc56c5b970b8 |
+---------------------+---------------------+------------+-----+----------------------+--------------------+-------------+--------------+----------+---------+-----------------+---------------------+-------------+---------+--------------------------------------+

MariaDB [nova]> delete from compute_nodes where hypervisor_hostname="wuhan32-nova11.v3.os";
Query OK, 1 row affected (0.01 sec)

MariaDB [nova]> delete from nova.services where host="wuhan32-nova11.v3.os";
Query OK, 1 row affected (0.00 sec)

删除这2条数据即可,这样wuhan32-nova11.v3.os彻底踢出节点

猜你喜欢

转载自blog.51cto.com/7585527/2425135