memcached healthcheck doesn't work when config has multiple endpoints or tls

Bug #1929881 reported by Damien Ciabrini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Damien Ciabrini

Bug Description

Lately, memcached is configured by t-h-t to listen to both localhost and the internal api. Since then, the generated memcached config can no longer be parsed by the memcached healthcheck:

# bash -x /openstack/healthcheck
+ . /usr/share/openstack-tripleo-common/healthcheck/common.sh
++ set -euo pipefail
++ : 0
++ '[' 0 -ne 0 ']'
++ exec
++ : 10
++ : curl-healthcheck
++ : pyrequests-healthcheck
++ : '\n%{http_code}' '%{remote_ip}:%{remote_port}' '%{time_total}' 'seconds\n'
++ : /dev/null
+++ awk 'match($0, /-l +([0-9a-fA-F\.\:]+) /, a) {print a[1]}' /etc/sysconfig/memcached
++ wrap_ipv6
/usr/share/openstack-tripleo-common/healthcheck/common.sh: line 142: $1: unbound variable

Note: the same parsing error will occur when memcached is configured with TLS, because the current regex won't parse properly the IP to connect to.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-common/+/794631

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-common/+/794733

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/tripleo-common/+/794734

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/tripleo-common/+/794736

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/793507
Committed: https://opendev.org/openstack/tripleo-common/commit/3f84495b8f8dc0a20148dfa8eaaa22d750ada39d
Submitter: "Zuul (22348)"
Branch: master

commit 3f84495b8f8dc0a20148dfa8eaaa22d750ada39d
Author: Damien Ciabrini <email address hidden>
Date: Fri May 28 00:25:25 2021 +0200

    Fix config parsing in memcached healthcheck

    When memcached is configured to listen on multiple IP, or
    is configured with TLS-e, make sure the healthcheck parses
    the right IP to connect to and its associated port.

    Change-Id: Ia0baf8501884d9ed2324938c9acbb30d1687cf27
    Closes-Bug: #1929881

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/794631
Committed: https://opendev.org/openstack/tripleo-common/commit/10ea69441d4d47d5da2daa771abe9d2f2664df06
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 10ea69441d4d47d5da2daa771abe9d2f2664df06
Author: Damien Ciabrini <email address hidden>
Date: Fri May 28 00:25:25 2021 +0200

    Fix config parsing in memcached healthcheck

    When memcached is configured to listen on multiple IP, or
    is configured with TLS-e, make sure the healthcheck parses
    the right IP to connect to and its associated port.

    Change-Id: Ia0baf8501884d9ed2324938c9acbb30d1687cf27
    Closes-Bug: #1929881
    (cherry picked from commit 3f84495b8f8dc0a20148dfa8eaaa22d750ada39d)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/794734
Committed: https://opendev.org/openstack/tripleo-common/commit/833ef486d65a3ffe9886c2a605c68bce3130577c
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 833ef486d65a3ffe9886c2a605c68bce3130577c
Author: Damien Ciabrini <email address hidden>
Date: Fri May 28 00:25:25 2021 +0200

    Fix config parsing in memcached healthcheck

    When memcached is configured to listen on multiple IP, or
    is configured with TLS-e, make sure the healthcheck parses
    the right IP to connect to and its associated port.

    Change-Id: Ia0baf8501884d9ed2324938c9acbb30d1687cf27
    Closes-Bug: #1929881
    (cherry picked from commit 3f84495b8f8dc0a20148dfa8eaaa22d750ada39d)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/794733
Committed: https://opendev.org/openstack/tripleo-common/commit/1f15a0706d202c7827dca0f948868193e72ce2cb
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 1f15a0706d202c7827dca0f948868193e72ce2cb
Author: Damien Ciabrini <email address hidden>
Date: Fri May 28 00:25:25 2021 +0200

    Fix config parsing in memcached healthcheck

    When memcached is configured to listen on multiple IP, or
    is configured with TLS-e, make sure the healthcheck parses
    the right IP to connect to and its associated port.

    Change-Id: Ia0baf8501884d9ed2324938c9acbb30d1687cf27
    Closes-Bug: #1929881
    (cherry picked from commit 3f84495b8f8dc0a20148dfa8eaaa22d750ada39d)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 15.2.1

This issue was fixed in the openstack/tripleo-common 15.2.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/train)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/794736
Committed: https://opendev.org/openstack/tripleo-common/commit/fdd2fb3b388548fc20d1f7e1e0578466448b35ca
Submitter: "Zuul (22348)"
Branch: stable/train

commit fdd2fb3b388548fc20d1f7e1e0578466448b35ca
Author: Damien Ciabrini <email address hidden>
Date: Fri May 28 00:25:25 2021 +0200

    Fix config parsing in memcached healthcheck

    When memcached is configured to listen on multiple IP, or
    is configured with TLS-e, make sure the healthcheck parses
    the right IP to connect to and its associated port.

    Change-Id: Ia0baf8501884d9ed2324938c9acbb30d1687cf27
    Closes-Bug: #1929881
    (cherry picked from commit 3f84495b8f8dc0a20148dfa8eaaa22d750ada39d)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 12.4.5

This issue was fixed in the openstack/tripleo-common 12.4.5 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 16.1.0

This issue was fixed in the openstack/tripleo-common 16.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 13.2.2

This issue was fixed in the openstack/tripleo-common 13.2.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common train-eol

This issue was fixed in the openstack/tripleo-common train-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.