ovn-migration: Use DHCP nodes to configure dnsmasq
Previously, the migration script used controller nodes to configure dnsmasq when configuring new MTU. Controller nodes may not run DHCP agents. The patch detects DHCP agents instead and uses those to configure dnsmasq. Change-Id: Ib468c04779af7aaf4dedf84ba885bce71078248b Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
This commit is contained in:
parent
7bb5fb2de1
commit
569aa4452a
@ -126,6 +126,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
|
||||
@ -153,13 +155,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…
x
Reference in New Issue
Block a user