Prevent patch strategy creation when AIO controller locked

In AIO-SX, we were allowing a patch orchestration strategy to be
created before the controller host had been unlocked. This causes
a reboot step to be added to the strategy, which doesn't work on
AIO-SX. The solution is to prevent a patch orchestration strategy
from being created when an AIO-SX host is locked - this was an
oversight in the original implementation.

Story: 2002863
Task: 22812

Change-Id: I4305fa91473e583b5c8e4b102e5f1678c33f912b
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Bart Wensley 2018-06-19 13:12:12 -04:00 committed by Jack Ding
parent d1215497a4
commit d85f7ac44d
1 changed files with 2 additions and 1 deletions

View File

@ -861,7 +861,8 @@ class SwPatchStrategy(SwUpdateStrategy):
return
for host in host_table.itervalues():
if HOST_PERSONALITY.COMPUTE in host.personality:
if HOST_PERSONALITY.COMPUTE in host.personality and \
HOST_PERSONALITY.CONTROLLER not in host.personality:
# Allow patch orchestration when compute hosts are available,
# locked or powered down.
if not ((host.is_unlocked() and host.is_enabled() and