Make POST /v1/introspection synchronous when manage_boot==False
Without manage_boot the only real action we do is updating the firewall, which is supposed to be pretty fast. Making the call synchronous means that ironic will receive information about PXE filter failures and will not attempt to power on a failed node or before the PXE filter is updated. Change-Id: I95b63d4e1d4c2c186c0e8234c4382b00aa918aa8 Story: #2007658 Task: #39746
This commit is contained in:
parent
3d1bf55b35
commit
f3e27c1916
@ -62,7 +62,10 @@ def introspect(node_id, manage_boot=True, token=None):
|
||||
manage_boot=manage_boot,
|
||||
ironic=ironic)
|
||||
|
||||
utils.executor().submit(_background_introspect, node_info, ironic)
|
||||
if manage_boot:
|
||||
utils.executor().submit(_do_introspect, node_info, ironic)
|
||||
else:
|
||||
_do_introspect(node_info, ironic)
|
||||
|
||||
|
||||
def _persistent_ramdisk_boot(node):
|
||||
@ -92,7 +95,7 @@ def _wait_for_turn(node_info):
|
||||
|
||||
@node_cache.release_lock
|
||||
@node_cache.fsm_transition(istate.Events.wait)
|
||||
def _background_introspect(node_info, ironic):
|
||||
def _do_introspect(node_info, ironic):
|
||||
node_info.acquire_lock()
|
||||
|
||||
# TODO(dtantsur): pagination
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The introspection start API is now synchronous when ``manage_boot==False``.
|
||||
This means that any failures will be propagated to ironic, preventing it
|
||||
from powering a node on and booting it without the PXE filter updated.
|
Loading…
Reference in New Issue
Block a user