Merge "Fix the way to get localhost IP in devstack"

This commit is contained in:
Zuul 2019-03-27 01:28:04 +00:00 committed by Gerrit Code Review
commit c590106f79
1 changed files with 1 additions and 1 deletions

View File

@ -583,7 +583,7 @@ function _setup_minimal_image {
##### - we assume tripleo elements and all other elements have been downloaded
echo "Exporting image-related environmental variables"
PRIMARY_IP=$(ip route get 8.8.8.8 | head -1 | cut -d' ' -f8)
PRIMARY_IP=$(ip route get 8.8.8.8 | head -1 | awk '{print $7}')
export CONTROLLER_IP=${CONTROLLER_IP:-$PRIMARY_IP}
export HOST_USERNAME=${HOST_USERNAME:-'stack'}
export HOST_SCP_USERNAME=${HOST_SCP_USERNAME:-'stack'}