Merge "Upgrade orchestration handle host-unlock after HostUpgrade"

This commit is contained in:
Zuul 2021-10-08 19:10:42 +00:00 committed by Gerrit Code Review
commit 27382a03df
2 changed files with 27 additions and 24 deletions

View File

@ -937,7 +937,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['storage-0']},
{'name': 'upgrade-hosts',
'entity_names': ['storage-0']},
_unlock_hosts_stage_as_dict(['storage-0'], retry_count=0),
_unlock_hosts_stage_as_dict(['storage-0']),
{'name': 'wait-data-sync',
'timeout': 7200}
]
@ -950,8 +950,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['storage-1', 'storage-2']},
{'name': 'upgrade-hosts',
'entity_names': ['storage-1', 'storage-2']},
_unlock_hosts_stage_as_dict(['storage-1', 'storage-2'],
retry_count=0),
_unlock_hosts_stage_as_dict(['storage-1', 'storage-2']),
{'name': 'wait-data-sync',
'timeout': 7200}
]
@ -964,7 +963,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['storage-3']},
{'name': 'upgrade-hosts',
'entity_names': ['storage-3']},
_unlock_hosts_stage_as_dict(['storage-3'], retry_count=0),
_unlock_hosts_stage_as_dict(['storage-3']),
{'name': 'wait-data-sync',
'timeout': 7200}
]
@ -1021,7 +1020,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['storage-0']},
{'name': 'upgrade-hosts',
'entity_names': ['storage-0']},
_unlock_hosts_stage_as_dict(['storage-0'], retry_count=0),
_unlock_hosts_stage_as_dict(['storage-0']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 7200}
@ -1035,7 +1034,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['storage-1']},
{'name': 'upgrade-hosts',
'entity_names': ['storage-1']},
_unlock_hosts_stage_as_dict(['storage-1'], retry_count=0),
_unlock_hosts_stage_as_dict(['storage-1']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 7200}
@ -1049,7 +1048,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['storage-2']},
{'name': 'upgrade-hosts',
'entity_names': ['storage-2']},
_unlock_hosts_stage_as_dict(['storage-2'], retry_count=0),
_unlock_hosts_stage_as_dict(['storage-2']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 7200}
@ -1063,7 +1062,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['storage-3']},
{'name': 'upgrade-hosts',
'entity_names': ['storage-3']},
_unlock_hosts_stage_as_dict(['storage-3'], retry_count=0),
_unlock_hosts_stage_as_dict(['storage-3']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 7200}
@ -1111,8 +1110,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['controller-0']},
{'name': 'upgrade-hosts',
'entity_names': ['controller-0']},
_unlock_hosts_stage_as_dict(['controller-0'],
retry_count=0),
_unlock_hosts_stage_as_dict(['controller-0']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 14400}
@ -1159,8 +1157,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['controller-1']},
{'name': 'upgrade-hosts',
'entity_names': ['controller-1']},
_unlock_hosts_stage_as_dict(['controller-1'],
retry_count=0),
_unlock_hosts_stage_as_dict(['controller-1']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 14400}
@ -1176,8 +1173,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['controller-0']},
{'name': 'upgrade-hosts',
'entity_names': ['controller-0']},
_unlock_hosts_stage_as_dict(['controller-0'],
retry_count=0),
_unlock_hosts_stage_as_dict(['controller-0']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 14400}
@ -1503,8 +1499,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['controller-1']},
{'name': 'upgrade-hosts',
'entity_names': ['controller-1']},
_unlock_hosts_stage_as_dict(['controller-1'],
retry_count=0),
_unlock_hosts_stage_as_dict(['controller-1']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 14400}
@ -1520,8 +1515,7 @@ class TestSwUpgradeStrategy(sw_update_testcase.SwUpdateStrategyTestCase):
'entity_names': ['controller-0']},
{'name': 'upgrade-hosts',
'entity_names': ['controller-0']},
_unlock_hosts_stage_as_dict(['controller-0'],
retry_count=0),
_unlock_hosts_stage_as_dict(['controller-0']),
{'name': 'wait-data-sync',
'ignore_alarms': ['900.005', '900.201', '750.006'],
'timeout': 14400}

View File

@ -1752,8 +1752,11 @@ class SwUpgradeStrategy(SwUpdateStrategy):
True, ignore_alarms=self._ignore_alarms))
stage.add_step(strategy.LockHostsStep(host_list))
stage.add_step(strategy.UpgradeHostsStep(host_list))
# Note: standard controllers do not need the same retry as AIO
stage.add_step(strategy.UnlockHostsStep(host_list))
# During an upgrade, unlock may need to retry. Bug details:
# https://bugs.launchpad.net/starlingx/+bug/1946255
stage.add_step(strategy.UnlockHostsStep(
host_list,
retry_count=strategy.UnlockHostsStep.MAX_RETRIES))
# Allow up to four hours for controller disks to synchronize
stage.add_step(strategy.WaitDataSyncStep(
timeout_in_secs=4 * 60 * 60,
@ -1773,8 +1776,11 @@ class SwUpgradeStrategy(SwUpdateStrategy):
stage.add_step(strategy.SwactHostsStep(host_list))
stage.add_step(strategy.LockHostsStep(host_list))
stage.add_step(strategy.UpgradeHostsStep(host_list))
# Note: standard controllers do not need the same retry as AIO
stage.add_step(strategy.UnlockHostsStep(host_list))
# During an upgrade, unlock may need to retry. Bug details:
# https://bugs.launchpad.net/starlingx/+bug/1946255
stage.add_step(strategy.UnlockHostsStep(
host_list,
retry_count=strategy.UnlockHostsStep.MAX_RETRIES))
# Allow up to four hours for controller disks to synchronize
stage.add_step(strategy.WaitDataSyncStep(
timeout_in_secs=4 * 60 * 60,
@ -1823,8 +1829,11 @@ class SwUpgradeStrategy(SwUpdateStrategy):
True, ignore_alarms=self._ignore_alarms))
stage.add_step(strategy.LockHostsStep(host_list))
stage.add_step(strategy.UpgradeHostsStep(host_list))
# storage hosts do not need the same retry logic as AIO
stage.add_step(strategy.UnlockHostsStep(host_list))
# During an upgrade, unlock may need to retry. Bug details:
# https://bugs.launchpad.net/starlingx/+bug/1946255
stage.add_step(strategy.UnlockHostsStep(
host_list,
retry_count=strategy.UnlockHostsStep.MAX_RETRIES))
# After storage node(s) are unlocked, we need extra time to
# allow the OSDs to go back in sync and the storage related