Ask Your Question
5

How to remove compute node from havana

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

Alin Calinciuc gravatar image

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

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 : http://pic.dhe.ibm.com/infocenter/tivihelp/v48r1/index.jsp?topic=%2Fcom.ibm.sco.doc_2.2%2Ft_deleting_computenodes.html but it didn't work.

edit retag flag offensive close merge delete

Comments

1

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 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
5

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

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 cn.id from compute_nodes cn, services s where cn.service_id=s.id and s.host='hostname');
delete from compute_nodes where service_id=(select id from services where host='hostname');
delete from services where host='hostname';

Hope it helps,

Alessandro

edit flag offensive delete link more

Comments

1

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 -0600 )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 -0600 )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 -0600 )edit
2

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

dheeru gravatar image

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

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
0

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

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

Comments

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 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

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

Seen: 8,308 times

Last updated: Sep 03 '14