增加计算节点大概需要 4 个事情:
删除(下线)一个计算节点的话,只需要删除 nova 计算服务 和 Networking service 网络服务
删除 nova service
root@controller:/home/dhbm# nova service-list
+--------------------------------------+----------------+------------+----------+---------+-------+----------------------------+-----------------+-------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | Forced down |
+--------------------------------------+----------------+------------+----------+---------+-------+----------------------------+-----------------+-------------+
| 8108a83f-39a4-41cb-bf66-d13d36acff1b | nova-scheduler | controller | internal | enabled | up | 2022-11-21T06:14:46.000000 | - | False |
| 77aa7e35-b7df-41f8-a5af-657100b07ea6 | nova-conductor | controller | internal | enabled | up | 2022-11-21T06:14:46.000000 | - | False |
| 5385e0fd-f5f6-4045-ab31-1a057f7324aa | nova-compute | controller | nova | enabled | up | 2022-11-21T06:14:55.000000 | - | False |
| 5cb981b3-96b5-42f0-b978-3ed6eb51c586 | nova-conductor | compute1 | internal | enabled | down | - | - | False |
| 835a0ee6-b218-4c98-96f1-966d36e1e70a | nova-scheduler | compute1 | internal | enabled | down | - | - | False |
| 0eb6f0a6-42b6-4210-a858-34accd88cb20 | nova-compute | compute1 | nova | enabled | down | 2022-11-21T02:07:01.000000 | - | False |
+--------------------------------------+----------------+------------+----------+---------+-------+----------------------------+-----------------+-------------+
删除其中 compute1 相关的 service ID
root@controller:/home/dhbm# nova service-delete 5cb981b3-96b5-42f0-b978-3ed6eb51c586
root@controller:/home/dhbm# nova service-delete 835a0ee6-b218-4c98-96f1-966d36e1e70a
root@controller:/home/dhbm# nova service-delete 0eb6f0a6-42b6-4210-a858-34accd88cb20
最终结果
root@controller:/home/dhbm# openstack compute service list --service nova-compute
+----+--------------+------------+------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+--------------+------------+------+---------+-------+----------------------------+
| 5 | nova-compute | controller | nova | enabled | up | 2022-11-21T06:18:25.000000 |
+----+--------------+------------+------+---------+-------+----------------------------+
删除 network agent
root@controller:/home/dhbm# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 326c6f4c-370a-4f06-abfb-6e7fa1bc6c67 | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
| 4b594d85-cc54-45b1-8264-2c692827d7ca | Linux bridge agent | compute1 | None | XXX | UP | neutron-linuxbridge-agent |
| 633c6363-6a63-4ac9-a589-41d28a1508ae | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| 9a8ead8b-2173-44f2-a102-8c1d4b4098da | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
| fce10fb1-f9a7-4f5e-862b-51955d52b149 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
删除 compute1 对应的 ID
root@controller:/home/dhbm# openstack network agent delete 4b594d85-cc54-45b1-8264-2c692827d7ca
最终结果
root@controller:/home/dhbm# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 326c6f4c-370a-4f06-abfb-6e7fa1bc6c67 | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
| 633c6363-6a63-4ac9-a589-41d28a1508ae | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| 9a8ead8b-2173-44f2-a102-8c1d4b4098da | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
| fce10fb1-f9a7-4f5e-862b-51955d52b149 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+