Upgrade orchestration updates for virtual subclouds
A couple of small adjustments to accommodate slow or virtual subclouds. Test Plan: - Verify successful orchestrated upgrade of a large number of virtual subclouds in parallel. Story: 2009725 Task: 45648 Change-Id: Ie116eaa8ee25f2b7b990817ea47cb1d772e11d30 Signed-off-by: Tee Ngo <tee.ngo@windriver.com>
This commit is contained in:
@@ -77,12 +77,19 @@ class UnlockHostState(BaseState):
|
|||||||
# handle possible unlock failures that can occur in corner cases
|
# handle possible unlock failures that can occur in corner cases
|
||||||
unlock_counter = 0
|
unlock_counter = 0
|
||||||
|
|
||||||
|
# For simplex subcloud upgrade, the host unlock is already done
|
||||||
|
# in data migration step. If it gets here, the host is still
|
||||||
|
# in degraded state, skip the unlock and proceed to the wait loop
|
||||||
|
# below.
|
||||||
|
if host.administrative != consts.ADMIN_UNLOCKED:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
response = self.get_sysinv_client(
|
response = self.get_sysinv_client(
|
||||||
strategy_step.subcloud.name).unlock_host(host.id)
|
strategy_step.subcloud.name).unlock_host(host.id)
|
||||||
if (response.ihost_action != 'unlock' or response.task != 'Unlocking'):
|
if (response.ihost_action != 'unlock' or
|
||||||
raise Exception("Unable to unlock host %s" % self.target_hostname)
|
response.task != 'Unlocking'):
|
||||||
|
raise Exception("Unable to unlock host %s"
|
||||||
|
% self.target_hostname)
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if unlock_counter >= self.max_unlock_retries:
|
if unlock_counter >= self.max_unlock_retries:
|
||||||
|
@@ -16,8 +16,8 @@ ACTIVATING_RETRY_STATES = ['activation-failed', ]
|
|||||||
|
|
||||||
ACTIVATING_IN_PROGRESS_STATES = ['activating', 'activating-hosts', ]
|
ACTIVATING_IN_PROGRESS_STATES = ['activating', 'activating-hosts', ]
|
||||||
|
|
||||||
# Max time: 45 minutes = 45 queries x 60 seconds sleep between queries
|
# Max time: 60 minutes = 60 queries x 60 seconds sleep between queries
|
||||||
DEFAULT_MAX_QUERIES = 45
|
DEFAULT_MAX_QUERIES = 60
|
||||||
DEFAULT_SLEEP_DURATION = 60
|
DEFAULT_SLEEP_DURATION = 60
|
||||||
MAX_FAILED_RETRIES = 10
|
MAX_FAILED_RETRIES = 10
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user