Ask Your Question

How to remove compute node from havana

asked 2013-12-07 11:51:20 -0500

Alin Calinciuc gravatar image

updated 2014-02-03 21:48:49 -0500

scott-devoid gravatar image

Does anyone knows how to remove a node from openstack, I have to mention it is a host that I newly added to cluster , and after that I renamed it, it never had an instances on it or anything else. Now it appears under the hypervisors list and service list. Is there a safe way I can remove it ? I tried : but it didn't work.

edit retag flag offensive close merge delete



In my Juno deployment I have successfully used nova service-delete <id> to delete the dead nodes, where <id> can be found from nova service-list. However it will mark the corresponding records as deleted but not completely remove them.

wangrich gravatar imagewangrich ( 2015-10-24 03:00:58 -0500 )edit

4 answers

Sort by ยป oldest newest most voted

answered 2014-02-03 03:51:10 -0500

desalvo gravatar image

Hi, actually it seems to be a little more complex. I've recently done it with the following 3 queries:

mysql -u root -p
use nova;
delete from compute_node_stats where compute_node_id=(select from compute_nodes cn, services s where and'hostname');
delete from compute_nodes where service_id=(select id from services where host='hostname');
delete from services where host='hostname';

Hope it helps,


edit flag offensive delete link more



I don't think that you shoud mess up directly with the database content, it's not very safe.

smaffulli gravatar imagesmaffulli ( 2014-09-03 18:38:42 -0500 )edit

In general you are right, but in havana there is no other way to do that, else than changing the database (which does not impact anything, btw). In icehouse there is an API to do that, so it's not needed anymore.

desalvo gravatar imagedesalvo ( 2014-09-04 03:47:03 -0500 )edit

@desalvo Can you show me where I can find the API to do this in icehouse?

ADN gravatar imageADN ( 2015-03-15 22:24:36 -0500 )edit

deleted compute node is still visible in GUI, how to remove it from there also?

snd0cff gravatar imagesnd0cff ( 2020-03-24 06:00:39 -0500 )edit

answered 2013-12-07 23:29:29 -0500

dheeru gravatar image

updated 2014-09-03 18:40:30 -0500

smaffulli gravatar image

Few options for you. Since you said that you don't have any instances. Just for maintenance you would like to delete.

  1. nova-manage service disable <service-name> <host-name>. This may not be required as you would like to delete it.
  2. Login to nova database and see the service table. Delete the particular entry. This looks better for you case.

    $ mysql -u root -p
    use nova;
    select * from service;

  3. Now you identify the compute node form above query and delete using SQL Query. If you want the readymade query I can give after sometime. i don't have access to my install now.

edit flag offensive delete link more

answered 2014-09-03 10:45:40 -0500

Sifty gravatar image

Actually it should be nova-manage service disable <host-name> <service-name>.

Thanks for the options though.

edit flag offensive delete link more


This just takes it out of rotation, it doesn't actually remove it from the database.

mpetason gravatar imagempetason ( 2014-09-03 10:48:11 -0500 )edit

answered 2020-03-24 05:47:13 -0500

deleted compute node is still visible in GUI, how to remove it from there also?

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-12-07 11:51:20 -0500

Seen: 8,815 times

Last updated: Sep 03 '14