From dd49fae3f4b6462cbc17a49bd47f19554dd834ef Mon Sep 17 00:00:00 2001 From: Roman Safronov Date: Thu, 28 May 2020 01:19:41 +0300 Subject: [PATCH] Fix ssh to nodes during ML2/OVS to ML2/OVN migration Migration ansible playbooks are not able to connect to overcloud nodes using ssh due to bad settings in the generated ansible inventory file. Ctlplane subnet ip addresses should be used by ansible in order to be able to establish connection successfully. Closes-bug: #1881029 Change-Id: I1588b88279ba1e25706cc74f4a888901e5aadcb6 (cherry picked from commit 0402337c151d6db3b6e04569df3735e0dc44125f) --- tools/ovn_migration/tripleo_environment/ovn_migration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ovn_migration/tripleo_environment/ovn_migration.sh b/tools/ovn_migration/tripleo_environment/ovn_migration.sh index e0fbf8ed0c2..678bebffe8b 100644 --- a/tools/ovn_migration/tripleo_environment/ovn_migration.sh +++ b/tools/ovn_migration/tripleo_environment/ovn_migration.sh @@ -77,7 +77,7 @@ file again." get_host_ip() { inventory_file=$1 host_name=$2 - ip=`jq -r --arg role _meta --arg hostname $host_name 'to_entries[] | select(.key == $role) | .value.hostvars[$hostname].management_ip' $inventory_file` + ip=`jq -r --arg role _meta --arg hostname $host_name 'to_entries[] | select(.key == $role) | .value.hostvars[$hostname].ansible_host' $inventory_file` if [[ "x$ip" == "x" ]] || [[ "x$ip" == "xnull" ]]; then # This file does not provide translation from the hostname to the IP, or # we already have an IP (Queens backwards compatibility)