Ask Your Question

how to remove compute host in controller ?? unfortunately i removed that host but name still available

asked 2016-10-14 00:02:55 -0500

Nataraj N gravatar image

how to remove compute host in controller ?? unfortunately i removed that host but name still available

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted

answered 2018-08-17 15:03:31 -0500

lrgc01 gravatar image

Hi there!

I know this question is too old, but I found myself with this issue.

In my case it seemed something else was lacking. So, I did all of this plus two DELETE in nova_api database:

MariaDB []> USE nova_api;
MariaDB [nova_api]> DELETE FROM resource_providers WHERE name='node1';
MariaDB [nova_api]> DELETE FROM host_mappings WHERE host='node1';

Then I could see my "new" node node1 with the same old name being created as a new resource:

2018-08-17 16:17:29.207 31495 INFO [req-47662f1d-93c4-4c71-b163-4735c953578f - - - - -] [req-3bf709dc-3b6b-430f-8467-ec367a0a77bc] Created resource provider record via placement API for resource provider with UUID 95099ca5-1265-44ba-9de1-6bd310408988 and name node1.

Now my "new old" hypervisor node1 is working.

I hope it helps!

Luiz R.G.C.

edit flag offensive delete link more

answered 2016-11-08 12:54:17 -0500

volenbovsky gravatar image

Hi, check 'nova service-delete'

edit flag offensive delete link more

answered 2016-10-16 09:01:26 -0500

sunnyarora gravatar image

That is possible, But make sure to take the backup of database, before you make any changes. Suppose for example i have two compute nodes i.e node1 and node2, and my node1 host is down or got corrupted or i have removed it physically. Then we need to remove node1 name from controller database.

Step1 : Check for available hypervisors by below command.

root@controller1:~# nova hypervisor-list
| ID | Hypervisor hostname |
| 1  | node1               |
| 4  | node2               |

Step 2: check of nova service's, you should also able to see the service down for node1.

 root@controller1:~# nova service-list

Step3: Login to my mysql db and select nova database.

root@controller1:~#  mysql -u root
mysql>USE nova;

Run the following SQL command to check entries of hypervisors in database :

mysql> SELECT id, created_at, updated_at, hypervisor_hostname FROM compute_nodes;

Step 4: After running above command you must be able to see the 'id' of host 'node1". Suppose that id is 1. Delete the hypervisor from the nova database by running below SQL commands.

mysql>DELETE FROM compute_node_stats WHERE compute_node_id='1';

mysql>DELETE FROM compute_nodes WHERE hypervisor_hostname='node1;

Step 5 : In This step , we will need to also delete the service of "node1", which is down as we have checked in step2.

mysql>DELETE FROM services WHERE host='node1';

You are done,, check nova hypervisor-list and nova service-list to confirm that there is no entry for host which is not present or removed permanently.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-10-14 00:02:55 -0500

Seen: 11,366 times

Last updated: Nov 08 '16