mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #8100/b2b8fc30 backport][stable-7] HAProxy skips the wait when drain=true and the backend is down - fix issue 8092 (#8156)
HAProxy skips the wait when drain=true and the backend is down - fix issue 8092 (#8100)
* fix issue 8092
* "is not" => "!="
* moved the drain & down cause to the wait
* added changelogs for PR 8100
* fixed yaml
* fixed file type
* Apply suggestions from code review
Removed a dot from a comment
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/haproxy.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b2b8fc30bf
)
Co-authored-by: RayJin2000 <rayjin2000@gmail.com>
This commit is contained in:
parent
c71274639d
commit
a7d8397449
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- "haproxy - fix an issue where HAProxy could get stuck in DRAIN mode when the backend was unreachable (https://github.com/ansible-collections/community.general/issues/8092)."
|
|
@ -343,7 +343,7 @@ class HAProxy(object):
|
||||||
|
|
||||||
if state is not None:
|
if state is not None:
|
||||||
self.execute(Template(cmd).substitute(pxname=backend, svname=svname))
|
self.execute(Template(cmd).substitute(pxname=backend, svname=svname))
|
||||||
if self.wait:
|
if self.wait and not (wait_for_status == "DRAIN" and state == "DOWN"):
|
||||||
self.wait_until_status(backend, svname, wait_for_status)
|
self.wait_until_status(backend, svname, wait_for_status)
|
||||||
|
|
||||||
def get_state_for(self, pxname, svname):
|
def get_state_for(self, pxname, svname):
|
||||||
|
|
Loading…
Reference in a new issue