Don't wait for pods to terminate when host is offline

If a host is offline, the VIM should not wait for pods to terminate
as part of host lock.

Change-Id: Ifff9b34013a97cecbf18c909087b89ba55538973
Closes-Bug: 1848349
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
This commit is contained in:
Kevin Smith 2019-10-18 10:58:55 -04:00
parent 334bab12c1
commit f88b3dd29c
1 changed files with 3 additions and 2 deletions

View File

@ -246,8 +246,9 @@ class DisableHostTask(state_machine.StateTask):
if not sw_mgmt_director.single_controller:
task_work_list.append(DisableHostServicesTaskWork(
self, host, objects.HOST_SERVICES.CONTAINER))
task_work_list.append(WaitHostServicesDisabledTaskWork(
self, host, objects.HOST_SERVICES.CONTAINER))
if not self._host.is_offline():
task_work_list.append(WaitHostServicesDisabledTaskWork(
self, host, objects.HOST_SERVICES.CONTAINER))
task_work_list.append(notify_host_services_task(
self, host, force_pass=True))
if host.host_service_configured(objects.HOST_SERVICES.COMPUTE):