summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-05-07 11:59:24 +0000
committerGerrit Code Review <review@openstack.org>2021-05-07 11:59:24 +0000
commit02667a9789b10965689a86aaa4648d1b6613b756 (patch)
treef408e91157ea25ec19283b1bba22f8f25790d47a
parentad11189f57160711d32f6e1bc9739e44563bfaaa (diff)
parent1a03a3f8fc4da54123df582af943b31697deea3a (diff)
downloadneutron-17.1.2.tar.gz
Merge "ovn-migration: UNDERCLOUD_NODE_USER variable" into stable/victoria17.1.2
-rw-r--r--doc/source/ovn/migration.rst3
-rw-r--r--tools/ovn_migration/tripleo_environment/ovn_migration.sh9
2 files changed, 9 insertions, 3 deletions
diff --git a/doc/source/ovn/migration.rst b/doc/source/ovn/migration.rst
index 21fd3d5eff..93875e8550 100644
--- a/doc/source/ovn/migration.rst
+++ b/doc/source/ovn/migration.rst
@@ -107,6 +107,9 @@ Perform the following steps in the undercloud
step 1.
Default: ~/overcloud-deploy-ovn.sh
+ * UNDERCLOUD_NODE_USER - user used on the undercloud nodes
+ Default: heat-admin
+
* STACK_NAME - Name or ID of the heat stack
Default: 'overcloud'
If the stack that is migrated differs from the default, please set this
diff --git a/tools/ovn_migration/tripleo_environment/ovn_migration.sh b/tools/ovn_migration/tripleo_environment/ovn_migration.sh
index 20b25612a3..742c457d5c 100644
--- a/tools/ovn_migration/tripleo_environment/ovn_migration.sh
+++ b/tools/ovn_migration/tripleo_environment/ovn_migration.sh
@@ -29,6 +29,9 @@ LANG=C
# overcloud deploy script for OVN migration.
: ${OVERCLOUD_OVN_DEPLOY_SCRIPT:=~/overcloud-deploy-ovn.sh}
+# user on the nodes in the undercloud
+: ${UNDERCLOUD_NODE_USER:=heat-admin}
+
: ${OPT_WORKDIR:=$PWD}
: ${STACK_NAME:=overcloud}
: ${PUBLIC_NETWORK_NAME:=public}
@@ -138,7 +141,7 @@ generate_ansible_inventory_file() {
ovn_central=False
node="$node_name ansible_host=$node_ip ovn_central=true"
fi
- echo $node ansible_ssh_user=heat-admin ansible_become=true >> hosts_for_migration
+ echo $node ansible_ssh_user=$UNDERCLOUD_NODE_USER ansible_become=true >> hosts_for_migration
done
echo "" >> hosts_for_migration
@@ -148,7 +151,7 @@ generate_ansible_inventory_file() {
OVN_CONTROLLERS=$(get_group_hosts "$inventory_file" neutron_ovs_agent)
for node_name in $OVN_CONTROLLERS; do
node_ip=$(get_host_ip "$inventory_file" $node_name)
- echo $node_name ansible_host=$node_ip ansible_ssh_user=heat-admin ansible_become=true ovn_controller=true >> hosts_for_migration
+ echo $node_name ansible_host=$node_ip ansible_ssh_user=$UNDERCLOUD_NODE_USER ansible_become=true ovn_controller=true >> hosts_for_migration
done
rm -f "$inventory_file"
echo "" >> hosts_for_migration
@@ -168,7 +171,7 @@ EOF
cat >> hosts_for_migration << EOF
[$1:vars]
-remote_user=heat-admin
+remote_user=$UNDERCLOUD_NODE_USER
public_network_name=$PUBLIC_NETWORK_NAME
image_name=$IMAGE_NAME
working_dir=$OPT_WORKDIR