Bug 2029906
| Summary: | RHOSP 16.2 /usr/share/openstack-tripleo-common/healthcheck/common.sh: line 160: $1: unbound variable | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | XinhuaLi <xili> |
| Component: | openstack-tripleo-common | Assignee: | Adriano Petrich <apetrich> |
| Status: | CLOSED DUPLICATE | QA Contact: | David Rosenfeld <drosenfe> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 16.2 (Train) | CC: | jslagle, lmiccini, mburns, slinaber |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-12-08 07:12:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
*** This bug has been marked as a duplicate of bug 1961321 *** |
Description of problem: We can see error against "healthcheck_memcahced " as below. ------------------------------------------------------------------------- #/usr/bin/podman exec --user root memcached /openstack/healthcheck /usr/share/openstack-tripleo-common/healthcheck/common.sh: line 160: $1: unbound variable ------------------------------------------------------------------------- ------------------------------------------------------------------------- tripleo_memcached_healthcheck.service - memcached healthcheck Loaded: loaded (/etc/systemd/system/tripleo_memcached_healthcheck.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2021-12-07 06:49:26 +03; 5s ago Process: 898636 ExecStart=/usr/bin/podman exec --user root memcached /openstack/healthcheck (code=exited, status=1/FAILURE) Main PID: 898636 (code=exited, status=1/FAILURE) ------------------------------------------------------------------------- ------------------------------------------------------------------------- (undercloud) [stack@director tmp]$ sudo systemctl status tripleo_memcached_healthcheck.service ● tripleo_memcached_healthcheck.service - memcached healthcheck Loaded: loaded (/etc/systemd/system/tripleo_memcached_healthcheck.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2021-12-07 10:39:40 +03; 4s ago Process: 371469 ExecStart=/usr/bin/podman exec --user root memcached /openstack/healthcheck (code=exited, status=1/FAILURE) Main PID: 371469 (code=exited, status=1/FAILURE) Dec 07 10:39:39 xxxxxx systemd[1]: Starting memcached healthcheck... Dec 07 10:39:40 xxxxxx podman[371469]: 2021-12-07 10:39:40.262533931 +0300 +03 m=+0.346147368 container exec 6bcb4fc48ebe12fd9bc1b5a27296dfc92ac527b8ebafcfe4b497cfffadedb984 > Dec 07 10:39:40 xxxxxx healthcheck_memcached[371469]: 2021/12/07 10:39:40 socat[293] E getaddrinfo("", "NULL", {1,0,1,6}, {}): Name or service not known Dec 07 10:39:40 xxxxxx systemd[1]: tripleo_memcached_healthcheck.service: Main process exited, code=exited, status=1/FAILURE Dec 07 10:39:40 xxxxxx systemd[1]: tripleo_memcached_healthcheck.service: Failed with result 'exit-code'. Dec 07 10:39:40 xxxxxx systemd[1]: Failed to start memcached healthcheck. (undercloud) [stack@director tmp]$ sudo /usr/bin/podman exec --user root memcached /openstack/healthcheck 2021/12/07 10:40:09 socat[305] E getaddrinfo("", "NULL", {1,0,1,6}, {}): Name or service not known ------------------------------------------------------------------------- Version-Release number of selected component (if applicable): ------------------------------------------------------------------------- openstack-memcached 16.2 e4541c8a52e2 3 months ago 476 MB Red Hat OpenStack Platform release 16.2.0 GA (Train) ------------------------------------------------------------------------- How reproducible: ------------------------------------------------------------------------- Install openstack and check the healthcheck_memcached status ------------------------------------------------------------------------- Steps to Reproduce: 1. 2. 3. Actual results: ------------------------------------------------------------------------- healthcheck_memcached code=exited, status=1/FAILURE ------------------------------------------------------------------------- Expected results: ------------------------------------------------------------------------- works well and exit as 0 ------------------------------------------------------------------------- Additional info: Possible BUG (enhanced) 1 , We should update "/usr/share/openstack-tripleo-common/healthcheck/common.sh" line 160 in openstack-memcached container --------------------------------------------------------------------------------- wrap_ipv6 () { if [ $# -ge 1 ] && [ -n "$1" ] ; then ## <<= We should add this check and make sure we have correct parameter input ip=$1 if [[ $ip =~ ":" ]] && [[ $ip != *\] ]]; then echo [$ip] else echo $ip fi fi ## <<== against the previous line 2 } --------------------------------------------------------------------------------- Possible BUG (enhanced) 2, We should update "/usr/share/openstack-tripleo-common/healthcheck/memcached" to make sure if memcached listen on localhost (127.0.0.1) and ctrl-plane (example 172.31.100.3 ); in this situation, memcached can still be able to get the correct IP. Because in current implementation, memcached cannot get the correct IP address as original codes listed below. --------------------------------------------------------------------------------- $(awk 'match($0, /-l +([0-9a-fA-F\.\:]+) /, a) {print a[1]}' /etc/sysconfig/memcached) --------------------------------------------------------------------------------- We should make sure the match can ignore the locahost IP like 127.0.0.1 or ::1 and just keep the ctrl-plane ip Regards Sam