|
2015年11月17日发布
1. Check hypervisor name
root@controller:~# nova hypervisor-list
+----+---------------------+-------+---------+
| ID | Hypervisor hostname | State | Status |
+----+---------------------+-------+---------+
| 1 | controller | up | enabled |
| 2 | compute | down | enabled |
+----+---------------------+-------+---------+
2. Delete Duplicate Nova hypervisors and agent services
root@controller:~# mysql -u root -p
MariaDB [(none)]> Use nova;
Database changed
MariaDB [nova]> DELETE FROM compute_nodes WHERE hypervisor_hostname='compute';
Query OK, 1 row affected (0.01 sec)
MariaDB [nova]> DELETE FROM services WHERE host='compute';
Query OK, 1 row affected (0.02 sec)
MariaDB [nova]> exit
[iyunv@controller ~]# nova hypervisor-list
+----+---------------------+-------+---------+
| ID | Hypervisor hostname | State | Status |
+----+---------------------+-------+---------+
| 1 | controller | up | enabled |
+----+---------------------+-------+---------+
[iyunv@controller ~]# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-cert | controller | internal | enabled | up | 2015-11-18T07:03:36.000000 | - |
| 2 | nova-scheduler | controller | internal | enabled | up | 2015-11-18T07:03:38.000000 | - |
| 3 | nova-consoleauth | controller | internal | enabled | up | 2015-11-18T07:03:37.000000 | - |
| 4 | nova-conductor | controller | internal | enabled | up | 2015-11-18T07:03:33.000000 | - |
| 5 | nova-compute | controller | nova | enabled | up | 2015-11-18T07:03:41.000000 | - |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
3. Delete Duplicate Nuetorn services
[iyunv@controller ~]# neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| id | agent_type | host | alive | admin_state_up | binary |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| 177c72a6-42e0-4253-ab04-f8f6eb978bd8 | Open vSwitch agent | compute | xxx | True | neutron-openvswitch-agent |
| 3461f1ea-1e7a-4750-b87e-e3484d45e12c | L3 agent | controller | :-) | True | neutron-l3-agent |
| 791e1241-785a-4428-8512-05a65851e951 | DHCP agent | controller | :-) | True | neutron-dhcp-agent |
| 860001f4-b674-4c1b-b891-8e453bf2192f | Metadata agent | controller | :-) | True | neutron-metadata-agent |
| 95975894-495e-422e-826b-0b3949db8ea2 | Open vSwitch agent | controller | :-) | True | neutron-openvswitch-agent |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
[iyunv@controller ~]# mysql -u root -p
MariaDB [(none)]> use neutron;
Database changed
MariaDB [neutron]> DELETE FROM agents WHERE host='compute';
Query OK, 1 row affected (0.01 sec)
MariaDB [neutron]> exit
Bye
[iyunv@controller ~]# neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| id | agent_type | host | alive | admin_state_up | binary |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| 3461f1ea-1e7a-4750-b87e-e3484d45e12c | L3 agent | controller | :-) | True | neutron-l3-agent |
| 791e1241-785a-4428-8512-05a65851e951 | DHCP agent | controller | :-) | True | neutron-dhcp-agent |
| 860001f4-b674-4c1b-b891-8e453bf2192f | Metadata agent | controller | :-) | True | neutron-metadata-agent |
| 95975894-495e-422e-826b-0b3949db8ea2 | Open vSwitch agent | controller | :-) | True | neutron-openvswitch-agent |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
Reference:
http://thornelabs.net/2014/08/03/delete-duplicate-openstack-hypervisors-and-services.html |
|
|
|
|
|
|