Merge "Fix HealthMonitorToErrorOnRevertTask revert method" into stable/train

This commit is contained in:
Zuul 2022-07-26 17:52:03 +00:00 committed by Gerrit Code Review
commit 58e2e13b2b
5 changed files with 10 additions and 4 deletions

View File

@ -52,7 +52,7 @@ class HealthMonitorToErrorOnRevertTask(BaseLifecycleTask):
pass
def revert(self, health_mon, listeners, loadbalancer, *args, **kwargs):
self.task_utils.mark_health_mon_prov_status_error(health_mon.pool_id)
self.task_utils.mark_health_mon_prov_status_error(health_mon.id)
self.task_utils.mark_pool_prov_status_active(health_mon.pool_id)
self.task_utils.mark_loadbalancer_prov_status_active(loadbalancer.id)
for listener in listeners:

View File

@ -52,7 +52,7 @@ class HealthMonitorToErrorOnRevertTask(BaseLifecycleTask):
pass
def revert(self, health_mon, listeners, loadbalancer, *args, **kwargs):
self.task_utils.mark_health_mon_prov_status_error(health_mon.pool_id)
self.task_utils.mark_health_mon_prov_status_error(health_mon.id)
self.task_utils.mark_pool_prov_status_active(health_mon.pool_id)
self.task_utils.mark_loadbalancer_prov_status_active(loadbalancer.id)
for listener in listeners:

View File

@ -28,7 +28,7 @@ class TestLifecycleTasks(base.TestCase):
self.AMPHORA.id = self.AMPHORA_ID
self.HEALTH_MON = mock.MagicMock()
self.HEALTH_MON_ID = uuidutils.generate_uuid()
self.HEALTH_MON.pool_id = self.HEALTH_MON_ID
self.HEALTH_MON.id = self.HEALTH_MON_ID
self.L7POLICY = mock.MagicMock()
self.L7POLICY_ID = uuidutils.generate_uuid()
self.L7POLICY.id = self.L7POLICY_ID

View File

@ -28,7 +28,7 @@ class TestLifecycleTasks(base.TestCase):
self.AMPHORA.id = self.AMPHORA_ID
self.HEALTH_MON = mock.MagicMock()
self.HEALTH_MON_ID = uuidutils.generate_uuid()
self.HEALTH_MON.pool_id = self.HEALTH_MON_ID
self.HEALTH_MON.id = self.HEALTH_MON_ID
self.L7POLICY = mock.MagicMock()
self.L7POLICY_ID = uuidutils.generate_uuid()
self.L7POLICY.id = self.L7POLICY_ID

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fix a bug that prevented the provisioning_state of a health-monitor to be
set to ERROR when an error occurred while creating, updating or deleting a
health-monitor.