Comment 9 for bug 1719770

Revision history for this message
Edward Hope-Morley (hopem) wrote : Re: hypervisor stats issue after charm removal if nova-compute service not disabled first

Hi @afreiberger, i've run a test using our charms and Xenial Mitaka and here are the results - http://pastebin.ubuntu.com/25879833/

A few points for clarification:

When you do juju remove-unit nova-compute/0 the charm is not performing any cleanup at all i.e. it will not notify the cloud controller that the node is to be disabled or deleted. So what you are left with following a remove-unit is a compute node whose database state represents it as "State:down" "disabled:0" and "deleted:0". Therefore Nova is correctly still counting the compute resources associated with that node as available.

If, subsequent to removing the unit, you then issue a 'openstack compute service delete <id>' the node is marked as "deleted:<id>" and it's resources are no longer counted as available (as can be clearly seen in the pastebin output I provided above).

I am still verifying whether entries with the same hostname but different deleted status are skewing the stats and will report back once ive confirmed but in any case the findings so far hopefully show that regardless you always need to manually delete a compute host using the api following its removal with juju.