Last active
August 29, 2015 14:23
-
-
Save jriguera/4736508eb0d412f83b2e to your computer and use it in GitHub Desktop.
Delete nova compute node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@node-11:~# nova hypervisor-list | |
+----+--------------------------+ | |
| ID | Hypervisor hostname | | |
+----+--------------------------+ | |
| 3 | node-8 | | |
| 6 | node-12 | | |
| 9 | node-15 | | |
+----+--------------------------+ | |
COMPUTE_NODE=node-8 | |
SERVICE_ID=$(mysql -B --disable-column-names -D nova -e "SELECT service_id FROM compute_nodes WHERE hypervisor_hostname='$COMPUTE_NODE'") | |
NODE_ID=$(mysql -B --disable-column-names -D nova -e "SELECT id FROM compute_nodes WHERE hypervisor_hostname='$COMPUTE_NODE'") | |
nova: DELETE FROM compute_nodes WHERE id='$NODE_ID' | |
nova: DELETE FROM services WHERE id='$SERVICE_ID' | |
root@node-11:~# neutron agent-list | |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+ | |
| id | agent_type | host | alive | admin_state_up | binary | | |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+ | |
| 186f2678-1401-4391-9b0e-dd63e6185bef | Metadata agent | node-13 | :-) | True | neutron-metadata-agent | | |
| 2586dbdc-ffd7-4c04-827a-6af732207a49 | Open vSwitch agent | node-14 | :-) | True | neutron-openvswitch-agent | | |
| 2de56f68-cd0e-452f-8082-df32302ca08d | L3 agent | node-13 | :-) | True | neutron-l3-agent | | |
| 33cddb10-3236-49bf-abad-8883751ced62 | L3 agent | node-14 | :-) | True | neutron-l3-agent | | |
| 7b23548e-dac9-4738-9259-7c10063e46b8 | Open vSwitch agent | node-15 | :-) | True | neutron-openvswitch-agent | | |
| 8afd5768-a645-4fc1-9e7b-44ca8dfd59ca | Open vSwitch agent | node-11 | :-) | True | neutron-openvswitch-agent | | |
| 907d3652-e731-4896-a068-26d3b9b7422a | Open vSwitch agent | node-8 | xxx | True | neutron-openvswitch-agent | | |
| a8e8ffc5-d041-4104-adb9-dfc5bb9fdb50 | Metadata agent | node-14 | :-) | True | neutron-metadata-agent | | |
| c409a394-d709-49c3-a51c-f1f0c6a305f9 | Metadata agent | node-11 | :-) | True | neutron-metadata-agent | | |
| c4e66d07-efee-418a-905c-c18e5f4006dd | Open vSwitch agent | node-12 | :-) | True | neutron-openvswitch-agent | | |
| c552aab6-52a7-4be7-b7f0-e7df82b86db9 | Open vSwitch agent | node-13 | :-) | True | neutron-openvswitch-agent | | |
| d2b0ee67-6fbd-460c-934a-b9b75c375ce0 | L3 agent | node-11 | :-) | True | neutron-l3-agent | | |
| dc77d56f-3f8a-4fa7-9f52-6584a74429de | DHCP agent | node-11 | :-) | True | neutron-dhcp-agent | | |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+ | |
neutron: DELETE FROM agents WHERE host='$COMPUTE_NODE'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment