From d49ce1652d31fb884285ed30e39ec10ef40c864d Mon Sep 17 00:00:00 2001 From: Roman Safronov Date: Mon, 18 Oct 2021 09:23:08 +0300 Subject: [PATCH] Fix OVN migration workload creation order Currently workload VMs start before subnet is connected to router. When DVR is enabled this causes sometimes that one of the VMs is not able to get metadata. Closes bug: #1947547 Change-Id: Ifd686d7ff452abd1226fbbc97f499e05102e4596 --- .../create/templates/create-resources.sh.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/ovn_migration/tripleo_environment/playbooks/roles/resources/create/templates/create-resources.sh.j2 b/tools/ovn_migration/tripleo_environment/playbooks/roles/resources/create/templates/create-resources.sh.j2 index ebb12d1c996..0003b5461eb 100644 --- a/tools/ovn_migration/tripleo_environment/playbooks/roles/resources/create/templates/create-resources.sh.j2 +++ b/tools/ovn_migration/tripleo_environment/playbooks/roles/resources/create/templates/create-resources.sh.j2 @@ -35,18 +35,18 @@ neutron net-update ovn-migration-net-{{ resource_suffix }} --mtu 1442 openstack subnet create --network ovn-migration-net-{{ resource_suffix }} --subnet-range 172.168.199.0/24 ovn-migration-subnet-{{ resource_suffix }} -openstack port create --network ovn-migration-net-{{ resource_suffix }} --security-group ovn-migration-sg-{{ resource_suffix }} ovn-migration-server-port-{{ resource_suffix }} - -openstack server create --flavor ovn-migration-{{ resource_suffix }} --image $image_name \ ---key-name ovn-migration-{{ resource_suffix }} \ ---nic port-id=ovn-migration-server-port-{{ resource_suffix }} ovn-migration-server-{{ resource_suffix }} - openstack router create ovn-migration-router-{{ resource_suffix }} openstack router set --external-gateway {{ public_network_name }} ovn-migration-router-{{ resource_suffix }} openstack router add subnet ovn-migration-router-{{ resource_suffix }} ovn-migration-subnet-{{ resource_suffix }} +openstack port create --network ovn-migration-net-{{ resource_suffix }} --security-group ovn-migration-sg-{{ resource_suffix }} ovn-migration-server-port-{{ resource_suffix }} + +openstack server create --flavor ovn-migration-{{ resource_suffix }} --image $image_name \ +--key-name ovn-migration-{{ resource_suffix }} \ +--nic port-id=ovn-migration-server-port-{{ resource_suffix }} ovn-migration-server-{{ resource_suffix }} + server_ip=`openstack floating ip create --port ovn-migration-server-port-{{ resource_suffix }} \ {{ public_network_name }} -c floating_ip_address | grep floating_ip_address \ | awk '{print $4'}`