Merge "Delete orphan compute nodes before updating resources"
This commit is contained in:
commit
372f624893
@ -7756,9 +7756,6 @@ class ComputeManager(manager.Manager):
|
||||
LOG.warning("Virt driver is not ready.")
|
||||
return
|
||||
|
||||
for nodename in nodenames:
|
||||
self._update_available_resource_for_node(context, nodename)
|
||||
|
||||
# Delete orphan compute node not reported by driver but still in db
|
||||
for cn in compute_nodes_in_db:
|
||||
if cn.hypervisor_hostname not in nodenames:
|
||||
@ -7774,6 +7771,9 @@ class ComputeManager(manager.Manager):
|
||||
self.scheduler_client.reportclient.delete_resource_provider(
|
||||
context, cn, cascade=True)
|
||||
|
||||
for nodename in nodenames:
|
||||
self._update_available_resource_for_node(context, nodename)
|
||||
|
||||
def _get_compute_nodes_in_db(self, context, use_slave=False,
|
||||
startup=False):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user