Kubernetes: Remove VIM hypervisor query if plugin disabled
After the openstack application is removed, stale hypervisor information in the VIM's database could cause repeated controller host swacts when a worker host lock/unlock is attempted. Qualifying the hypervisor query with an enabled compute plugin will resolve this. Note that subsequent openstack application apply will re-initialize the VIM's hypervisor information in the database. Story: 2004520 Task: 29186 Change-Id: I7365fb88c71f3152864239aa629798e66b5c988a Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
This commit is contained in:
parent
2ab1a23a59
commit
a6498c3e01
@ -172,6 +172,7 @@ class EnableHostTask(state_machine.StateTask):
|
|||||||
self, host, objects.HOST_SERVICES.GUEST))
|
self, host, objects.HOST_SERVICES.GUEST))
|
||||||
task_work_list.append(NotifyHostServicesEnabledTaskWork(
|
task_work_list.append(NotifyHostServicesEnabledTaskWork(
|
||||||
self, host, force_pass=True))
|
self, host, force_pass=True))
|
||||||
|
if host.host_service_configured(objects.HOST_SERVICES.COMPUTE):
|
||||||
task_work_list.append(QueryHypervisorTaskWork(
|
task_work_list.append(QueryHypervisorTaskWork(
|
||||||
self, host, force_pass=True))
|
self, host, force_pass=True))
|
||||||
super(EnableHostTask, self).__init__(
|
super(EnableHostTask, self).__init__(
|
||||||
@ -236,6 +237,7 @@ class DisableHostTask(state_machine.StateTask):
|
|||||||
if host.host_service_configured(objects.HOST_SERVICES.CONTAINER):
|
if host.host_service_configured(objects.HOST_SERVICES.CONTAINER):
|
||||||
task_work_list.append(DisableHostServicesTaskWork(
|
task_work_list.append(DisableHostServicesTaskWork(
|
||||||
self, host, objects.HOST_SERVICES.CONTAINER))
|
self, host, objects.HOST_SERVICES.CONTAINER))
|
||||||
|
if host.host_service_configured(objects.HOST_SERVICES.COMPUTE):
|
||||||
task_work_list.append(QueryHypervisorTaskWork(
|
task_work_list.append(QueryHypervisorTaskWork(
|
||||||
self, host, force_pass=True))
|
self, host, force_pass=True))
|
||||||
task_work_list.append(NotifyInstancesHostDisablingTaskWork(self, host))
|
task_work_list.append(NotifyInstancesHostDisablingTaskWork(self, host))
|
||||||
@ -248,6 +250,7 @@ class DisableHostTask(state_machine.StateTask):
|
|||||||
task_work_list.append(NotifyInstancesHostDisabledTaskWork(self, host))
|
task_work_list.append(NotifyInstancesHostDisabledTaskWork(self, host))
|
||||||
task_work_list.append(notify_host_services_task(
|
task_work_list.append(notify_host_services_task(
|
||||||
self, host, force_pass=True))
|
self, host, force_pass=True))
|
||||||
|
if host.host_service_configured(objects.HOST_SERVICES.COMPUTE):
|
||||||
task_work_list.append(QueryHypervisorTaskWork(
|
task_work_list.append(QueryHypervisorTaskWork(
|
||||||
self, host, force_pass=True))
|
self, host, force_pass=True))
|
||||||
super(DisableHostTask, self).__init__(
|
super(DisableHostTask, self).__init__(
|
||||||
|
Loading…
Reference in New Issue
Block a user