Merge "Fix Octavia HA test_stop_haproxy"
This commit is contained in:
commit
2fc1b3b171
@ -179,10 +179,22 @@ class OctaviaBasicFaultTest(testtools.TestCase):
|
|||||||
# Finding the amphora haproxy unit name and stop it
|
# Finding the amphora haproxy unit name and stop it
|
||||||
amp_haproxy_unit_command = (
|
amp_haproxy_unit_command = (
|
||||||
"systemctl list-units | awk '/haproxy-/{print $1}'")
|
"systemctl list-units | awk '/haproxy-/{print $1}'")
|
||||||
|
|
||||||
|
for attempt in tobiko.retry(timeout=300., interval=5.):
|
||||||
amp_haproxy_unit = octavia.run_command_on_amphora(
|
amp_haproxy_unit = octavia.run_command_on_amphora(
|
||||||
command=amp_haproxy_unit_command,
|
command=amp_haproxy_unit_command,
|
||||||
lb_id=self.lb.id,
|
lb_id=self.lb.id,
|
||||||
lb_vip=self.lb.vip_address)
|
lb_vip=self.lb.vip_address)
|
||||||
|
|
||||||
|
if amp_haproxy_unit:
|
||||||
|
break
|
||||||
|
|
||||||
|
# it will raise tobiko.RetryTimeLimitError in case of timeout
|
||||||
|
attempt.check_limits()
|
||||||
|
|
||||||
|
LOG.debug(f"Waiting for haproxy instance on LB {self.lb.id} to get"
|
||||||
|
" the haproxy unit id")
|
||||||
|
|
||||||
LOG.info(f'The amp_haproxy_unit is {amp_haproxy_unit}')
|
LOG.info(f'The amp_haproxy_unit is {amp_haproxy_unit}')
|
||||||
|
|
||||||
octavia.run_command_on_amphora(
|
octavia.run_command_on_amphora(
|
||||||
|
Loading…
Reference in New Issue
Block a user