run-os-net-config.sh script fails on IPv6 hostnames
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Dan Sneddon |
Bug Description
When hostnames are used, and those hostnames resolve to an IPv6-only address, the run-os-
If the script resolved the hostname, it could use ping6 conditionally. For example:
function ping_metadata_ip() {
local METADATA_
if [ -n "$METADATA_IP" ] && ! is_local_ip $METADATA_IP; then
echo -n "Trying to ping metadata IP ${METADATA_IP}..."
_IP="$(getent hosts $METADATA_IP | awk '{ print $1 }')"
_ping=ping
if [[ "$_IP" =~ ":" ]] ; then
_ping=ping6
fi
local COUNT=0
until $_ping -c 1 $METADATA_IP &> /dev/null; do
COUNT=$(( $COUNT + 1 ))
if [ $COUNT -eq 10 ]; then
echo "FAILURE"
echo "$METADATA_IP is not pingable." >&2
exit 1
fi
done
echo "SUCCESS"
else
echo "No metadata IP found. Skipping."
fi
}
Changed in tripleo: | |
assignee: | nobody → Dan Sneddon (dsneddon) |
importance: | Undecided → High |
status: | New → Triaged |
Changed in tripleo: | |
milestone: | none → train-1 |
tags: | added: queens-backport-potential |
tags: | added: rocky-backport-potential stein-backport-potential |
Fix proposed to branch: master /review. opendev. org/661095
Review: https:/