diff options
author | Zuul <zuul@review.opendev.org> | 2023-04-26 15:37:43 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-04-26 15:37:43 +0000 |
commit | 316e3e0a3b24fcb0597fd3193ec4d8f6fc0abc44 (patch) | |
tree | 1fccb8827ea8cf265958d3dcb2d26e486ada03a7 /nova/compute | |
parent | b9ac827491fff76eb6e4cd243d9be31304ea338d (diff) | |
parent | fbf2515b4c1dc5f279bb3df2fcb2193a1b52673a (diff) | |
download | nova-316e3e0a3b24fcb0597fd3193ec4d8f6fc0abc44.tar.gz |
Merge "Remove silent failure to find a node on rebuild"
Diffstat (limited to 'nova/compute')
-rw-r--r-- | nova/compute/manager.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 5ea71827fc..5c42aa4d89 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -3791,9 +3791,21 @@ class ComputeManager(manager.Manager): try: compute_node = self._get_compute_info(context, self.host) scheduled_node = compute_node.hypervisor_hostname - except exception.ComputeHostNotFound: + except exception.ComputeHostNotFound as e: + # This means we were asked to rebuild one of our own + # instances, or another instance as a target of an + # evacuation, but we are unable to find a matching compute + # node. LOG.exception('Failed to get compute_info for %s', self.host) + self._set_migration_status(migration, 'failed') + self._notify_instance_rebuild_error(context, instance, e, + bdms) + raise exception.InstanceFaultRollback( + inner_exception=exception.BuildAbortException( + instance_uuid=instance.uuid, + reason=e.format_message())) + else: scheduled_node = instance.node |