Open Dcosmas opened 2 weeks ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @Normo @ravibhure click here for bot help
For reference, the old PR was #8100.
(Also state
can also be None
, so simply using state[0]['status']
won't work either. The condition needs to be slightly more complex.)
Summary
Hi, I'm sorry @RayJin2000 but state is not a String but a tuple of map :( so the issue https://github.com/ansible-collections/community.general/issues/8092 has to be reopen I think.
if self.wait and not (wait_for_status == "DRAIN" and state == "DOWN"):
have to be
if self.wait and not (wait_for_status == "DRAIN" and state[0]['status'] == "DOWN"):
Thank you for your time and consideration.
Issue Type
Bug Report
Component Name
haproxy
Ansible Version
Community.general Version
Configuration
OS / Environment
Debian 11 & 12
Steps to Reproduce
Expected Results
The expected behavior would be to either directly fail or bypass the DRAIN mode and enter MAINT immediately.
Actual Results
Code of Conduct