Browse Source

Merge "ovn-migration: Use DHCP nodes to configure dnsmasq" into stable/train

changes/08/791008/4
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
2c7c4cc794
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      migration/tripleo_environment/ovn_migration.sh

+ 12
- 1
migration/tripleo_environment/ovn_migration.sh View File

@ -128,6 +128,8 @@ EOF
# Generate the inventory file for ansible migration playbook.
generate_ansible_inventory_file() {
local dhcp_nodes
echo "Generating the inventory file for ansible-playbook"
source $STACKRC_FILE
echo "[ovn-dbs]" > hosts_for_migration
@ -157,13 +159,22 @@ generate_ansible_inventory_file() {
node_ip=$(get_host_ip "$inventory_file" $node_name)
echo $node_name ansible_host=$node_ip ansible_ssh_user=$UNDERCLOUD_NODE_USER ansible_become=true ovn_controller=true >> hosts_for_migration
done
echo "" >> hosts_for_migration
echo "[dhcp]" >> hosts_for_migration
dhcp_nodes=$(get_group_hosts "$inventory_file" neutron_dhcp)
for node_name in $dhcp_nodes; do
node_ip=$(get_host_ip "$inventory_file" $node_name)
echo $node_name ansible_host=$node_ip ansible_ssh_user=$UNDERCLOUD_NODE_USER ansible_become=true >> hosts_for_migration
done
rm -f "$inventory_file"
echo "" >> hosts_for_migration
cat >> hosts_for_migration << EOF
[overcloud-controllers:children]
ovn-dbs
dhcp
[overcloud:children]
ovn-controllers


Loading…
Cancel
Save