rt: soften warning case in _remove_deleted_instances_allocations
During an instance_claim during initial server create or unshelve,
the instance.host/node values will be set before the resource
tracker has the instance in the tracked_instances dict. If
_remove_deleted_instances_allocations is called with the instance
before it's being tracked, a warning like this is logged:
Jul 31 13:12:57.455904 ubuntu-bionic-rax-iad-0009534722
nova-compute[31951]: WARNING nova.compute.resource_tracker
[None req-d6f2ae97-d8f7-46f6-8974-b42aeb58302d None None]
Instance 227c23cd-aeb2-4b5a-b001-21bd920a5e77 is not being actively
managed by this compute host but has allocations referencing this
compute host: {u'resources': {u'MEMORY_MB': 64, u'VCPU': 1,
u'DISK_GB': 1}}. Skipping heal of allocation because we do not know
what to do.
This shows up quite frequently in CI runs (see the bug report for
a logstash query) which means it should not be a warning.
This change checks the instance task_state and if set then we only
log a debug message rather than the warning since we can assume we
are racing and the task will correct itself upon completion.
Change-Id: I6db8bea6761b68c39e6332d4698d1f8312863758
Closes-Bug: #1838541
(cherry picked from commit ad4ef5af8bf7dc34caef21b0062ef9cc504bc216)
Reviewed: https:/ /review. opendev. org/679519 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=7e074ad0307 c267ee9bb8e0063 94393160a705c9
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 7e074ad0307c267 ee9bb8e00639439 3160a705c9
Author: Matt Riedemann <email address hidden>
Date: Wed Jul 31 12:41:00 2019 -0400
rt: soften warning case in _remove_ deleted_ instances_ allocations
During an instance_claim during initial server create or unshelve, deleted_ instances_ allocations is called with the instance
the instance.host/node values will be set before the resource
tracker has the instance in the tracked_instances dict. If
_remove_
before it's being tracked, a warning like this is logged:
Jul 31 13:12:57.455904 ubuntu- bionic- rax-iad- 0009534722 compute[ 31951]: WARNING nova.compute. resource_ tracker d8f7-46f6- 8974-b42aeb5830 2d None None] aeb2-4b5a- b001-21bd920a5e 77 is not being actively
nova-
[None req-d6f2ae97-
Instance 227c23cd-
managed by this compute host but has allocations referencing this
compute host: {u'resources': {u'MEMORY_MB': 64, u'VCPU': 1,
u'DISK_GB': 1}}. Skipping heal of allocation because we do not know
what to do.
This shows up quite frequently in CI runs (see the bug report for
a logstash query) which means it should not be a warning.
This change checks the instance task_state and if set then we only
log a debug message rather than the warning since we can assume we
are racing and the task will correct itself upon completion.
Change-Id: I6db8bea6761b68 c39e6332d4698d1 f8312863758 4caef21b0062ef9 cc504bc216)
Closes-Bug: #1838541
(cherry picked from commit ad4ef5af8bf7dc3