Fix backup node lookup
The node lookup code added in change I27201319f31cdc01605a3c5ae9ef4b4218e4a3f6 was slightly broken in that we call a method with a keyword arguemnt which doesn't exist. uuid versus node_uuid. It happens, it is a quick fix! Spotted on a metalsmith job: [-] Agent is requesting to perform an explicit node cache update. This is to pickup any chanages in the cache before deployment. [-] Failed to update node cache. Error lookup_node() got an unexpected keyword argument 'uuid' Change-Id: I59ecec65707a2f03918b233f1925395ebe59b8c4
This commit is contained in:
parent
9b75453339
commit
3426963552
@ -498,7 +498,7 @@ def update_cached_node():
|
|||||||
hardware_info=list_hardware_info(use_cache=True),
|
hardware_info=list_hardware_info(use_cache=True),
|
||||||
timeout=API_LOOKUP_TIMEOUT,
|
timeout=API_LOOKUP_TIMEOUT,
|
||||||
starting_interval=API_LOOKUP_INTERVAL,
|
starting_interval=API_LOOKUP_INTERVAL,
|
||||||
uuid=uuid)
|
node_uuid=uuid)
|
||||||
cache_node(content['node'])
|
cache_node(content['node'])
|
||||||
return content['node']
|
return content['node']
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
@ -4533,7 +4533,7 @@ class TestAPIClientSaveAndUse(base.IronicAgentTest):
|
|||||||
hardware_info=mock.ANY,
|
hardware_info=mock.ANY,
|
||||||
timeout=1,
|
timeout=1,
|
||||||
starting_interval=2,
|
starting_interval=2,
|
||||||
uuid='node1')
|
node_uuid='node1')
|
||||||
self.assertEqual(updated_node, hardware.NODE)
|
self.assertEqual(updated_node, hardware.NODE)
|
||||||
calls = [mock.call('list_hardware_info'),
|
calls = [mock.call('list_hardware_info'),
|
||||||
mock.call('wait_for_disks')]
|
mock.call('wait_for_disks')]
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes a minor incorrect keyword argument that was
|
||||||
|
matching between the method caller and the unit test but
|
||||||
|
not the actual method, unit test, and caller. This was
|
||||||
|
a non-fatal issue, and should now permit the agent to
|
||||||
|
attempt to lookup the node one last time before deploying
|
||||||
|
the instance image to pick-up a root device hint.
|
Loading…
Reference in New Issue
Block a user