Bug 1713305
| Summary: | run-os-net-config.sh does not parse hostname that resolves to IPv6 address properly | |||
|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Gurenko Alex <agurenko> | |
| Component: | openstack-tripleo-heat-templates | Assignee: | Dan Sneddon <dsneddon> | |
| Status: | CLOSED ERRATA | QA Contact: | Gurenko Alex <agurenko> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 13.0 (Queens) | CC: | apevec, aschultz, bdobreli, bfournie, dsneddon, hjensas, jslagle, lhh, mburns, mgeary | |
| Target Milestone: | z7 | Keywords: | Triaged, ZStream | |
| Target Release: | 13.0 (Queens) | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | openstack-tripleo-heat-templates-8.3.1-28.el7ost | Doc Type: | Bug Fix | |
| Doc Text: |
This update adds support for validating API endpoint connectivity for hostnames with IPv6 addresses.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1714655 (view as bug list) | Environment: | ||
| Last Closed: | 2019-07-10 13:05:31 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1714655 | |||
|
Description
Gurenko Alex
2019-05-23 11:09:59 UTC
The code from the report is in THT/network/scripts/run-os-net-config.sh This should be fixed by this patch: https://review.opendev.org/#/c/661095/ Once that merges upstream it will need to be backported to OSP 13. For a mitigation, you can add one line and change one line in /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh or wherever your local copy of the TripleO Heat Templates is located. You just add the line that resolves _IP to the IP address, and you change the test to look at $_IP instead of $METADATA_IP: 47 _ping=ping 48 if [[ "$METADATA_IP" =~ ":" ]] ; then 49 _ping=ping6 50 fi becomes: 47 _IP="$(getent hosts $METADATA_IP | awk '{ print $1 }')" 48 _ping=ping 49 if [[ "$_IP" =~ ":" ]] ; then 50 _ping=ping6 51 fi Diff: diff --git a/network/scripts/run-os-net-config.sh b/network/scripts/run-os-net-config.sh index 46532c72d..22085cabd 100755 --- a/network/scripts/run-os-net-config.sh +++ b/network/scripts/run-os-net-config.sh @@ -44,8 +44,9 @@ function ping_metadata_ip() { echo -n "Trying to ping metadata IP ${METADATA_IP}..." + _IP="$(getent hosts $METADATA_IP | awk '{ print $1 }')" _ping=ping - if [[ "$METADATA_IP" =~ ":" ]] ; then + if [[ "$_IP" =~ ":" ]] ; then _ping=ping6 fi (In reply to Dan Sneddon from comment #2) > This should be fixed by this patch: > > https://review.opendev.org/#/c/661095/ > > Once that merges upstream it will need to be backported to OSP 13. For a > mitigation, you can add one line and change one line in > /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net- > config.sh or wherever your local copy of the TripleO Heat Templates is > located. > > You just add the line that resolves _IP to the IP address, and you change > the test to look at $_IP instead of $METADATA_IP: > > 47 _ping=ping > 48 if [[ "$METADATA_IP" =~ ":" ]] ; then > 49 _ping=ping6 > 50 fi > > becomes: > > 47 _IP="$(getent hosts $METADATA_IP | awk '{ print $1 }')" > 48 _ping=ping > 49 if [[ "$_IP" =~ ":" ]] ; then > 50 _ping=ping6 > 51 fi > > > Diff: > > diff --git a/network/scripts/run-os-net-config.sh > b/network/scripts/run-os-net-config.sh > index 46532c72d..22085cabd 100755 > --- a/network/scripts/run-os-net-config.sh > +++ b/network/scripts/run-os-net-config.sh > @@ -44,8 +44,9 @@ function ping_metadata_ip() { > > echo -n "Trying to ping metadata IP ${METADATA_IP}..." > > + _IP="$(getent hosts $METADATA_IP | awk '{ print $1 }')" > _ping=ping > - if [[ "$METADATA_IP" =~ ":" ]] ; then > + if [[ "$_IP" =~ ":" ]] ; then > _ping=ping6 > fi Thanks a lot, Dan, with this patch, I've managed to deploy with a hostname that resolves to IPv6. Hi Alex - now that the build is available would you be able to verify this? Hi Alex - can you test this on OSP-13? Thanks. Verified on puddle 2019-06-13.2. Deployment with hostname that resolves to IPv6 worked smoothly. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1738 |