_node_resources_unavailable() is supposed to be called after
_node_resources_used() returns False. Because get_inventory() doesn't
satisfy this condition, this method returns an empty inventory for a
deployed bare metal node. It causes the resource tracker to try
removing an allocated inventory from placement. This removal results
in periodic unexpected errors.
This patch calls _node_resources_used() prior to
_node_resources_unanvailable() for getting a proper inventory.
Change-Id: I6717ce19f6005c8ebb7af75437a72876c5a53f34
Closes-Bug: 1751472
(cherry picked from commit ac20fc22adb133d9de5f2ec15faad11b2de1987a)
Reviewed: https:/ /review. openstack. org/561923 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=525ea3cfac0 d91752bdac1bbca 4191976d3c592a
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 525ea3cfac0d917 52bdac1bbca4191 976d3c592a
Author: Hironori Shiina <email address hidden>
Date: Thu Mar 15 20:44:50 2018 +0900
ironic: Get correct inventory for deployed node
_node_ resources_ unavailable( ) is supposed to be called after resources_ used() returns False. Because get_inventory() doesn't
_node_
satisfy this condition, this method returns an empty inventory for a
deployed bare metal node. It causes the resource tracker to try
removing an allocated inventory from placement. This removal results
in periodic unexpected errors.
This patch calls _node_resources _used() prior to resources_ unanvailable( ) for getting a proper inventory.
_node_
Change-Id: I6717ce19f6005c 8ebb7af75437a72 876c5a53f34 9de5f2ec15faad1 1b2de1987a)
Closes-Bug: 1751472
(cherry picked from commit ac20fc22adb133d