Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haproxy: add support for track in wait_until_status #53677

Merged
merged 1 commit into from Mar 18, 2019

Conversation

Projects
None yet
5 participants
@Jonasee
Copy link
Contributor

Jonasee commented Mar 12, 2019

When haproxy is configured to track the status of a server using a
server in another backend it will not report all status as expected.
Using substring matching will solve this.

The CSV will output the server status in the following way:
MAINT: MAINT (via pxname/svname)
UP: UP
DOWN: DOWN

Haproxy doc on trach: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-track

SUMMARY

Fixes #53676

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/module_utils/net_tools/haproxy.py

ADDITIONAL INFORMATION

Configure haproxy to track the server status using a different backend and try to put the server in maintenance mode using ansible.

Haproxy:

backend backendA
    option httpchk
    server server01 1.2.3.4:80 check
    server server02 1.2.3.5:80 check

backend backendB
    server server01 1.2.3.4:80 track backendA/server01
    server server02 1.2.3.5:80 track backendA/server02

Playbook:

- name: disable backend in haproxy
  delegate_to: haproxy
  haproxy:
    state: disable
    host: server01
    socket: /var/run/haproxy/admin.sock
    wait: yes
Haproxy: add support for track in wait_until_status
When haproxy is configured to track the status of a server using a
server in another backend it will not report all status as expected.
Using substring matching will solve this.

The CSV will output the server status in the following way:
MAINT: MAINT (via pxname/svname)
UP: UP
DOWN: DOWN

Haproxy doc on trach: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-track
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 12, 2019

@ravibhure

This comment has been minimized.

Copy link
Contributor

ravibhure commented Mar 13, 2019

shipit

@ansibot ansibot removed the needs_triage label Mar 13, 2019

@resmo

This comment has been minimized.

Copy link
Member

resmo commented Mar 18, 2019

@ravibhure please only comment with a single "shipit" on a line, or a 👍 on a line, but not both otherwise the bot will not count it.

@resmo

This comment has been minimized.

Copy link
Member

resmo commented Mar 18, 2019

shipit

@ansibot ansibot merged commit f9b812a into ansible:devel Mar 18, 2019

1 check passed

Shippable Run 113352 status is SUCCESS.
Details

catcombo added a commit to catcombo/ansible that referenced this pull request Mar 21, 2019

Haproxy: add support for track in wait_until_status (ansible#53677)
When haproxy is configured to track the status of a server using a
server in another backend it will not report all status as expected.
Using substring matching will solve this.

The CSV will output the server status in the following way:
MAINT: MAINT (via pxname/svname)
UP: UP
DOWN: DOWN

Haproxy doc on trach: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-track
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.