From 669337a5570000db47763ff3ea1d48162e1d6dbb Mon Sep 17 00:00:00 2001 From: Mike Fedosin Date: Tue, 10 Dec 2019 20:41:39 +0100 Subject: [PATCH] Bug 1780534: create bootstrap floating ip after the bootstrap machine Now we create the bootstrap floating ip in the beginning of the installation and then wait the bootstrap machine to become ready. If the provisioning takes more than 10 minutes, due to long image uploading or other reasons, fip creation fails with timeout. To prevent this we should create the fip when the machine is already available. --- data/data/openstack/bootstrap/main.tf | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/data/data/openstack/bootstrap/main.tf b/data/data/openstack/bootstrap/main.tf index f00d7afa206..906a822254f 100644 --- a/data/data/openstack/bootstrap/main.tf +++ b/data/data/openstack/bootstrap/main.tf @@ -24,13 +24,6 @@ resource "openstack_networking_port_v2" "bootstrap_port" { } } -resource "openstack_networking_floatingip_v2" "bootstrap_fip" { - description = "${var.cluster_id}-bootstrap-fip" - pool = var.external_network - port_id = openstack_networking_port_v2.bootstrap_port.id - tags = ["openshiftClusterID=${var.cluster_id}"] -} - data "openstack_compute_flavor_v2" "bootstrap_flavor" { name = var.flavor_name } @@ -52,3 +45,12 @@ resource "openstack_compute_instance_v2" "bootstrap" { openshiftClusterID = var.cluster_id } } + +resource "openstack_networking_floatingip_v2" "bootstrap_fip" { + description = "${var.cluster_id}-bootstrap-fip" + pool = var.external_network + port_id = openstack_networking_port_v2.bootstrap_port.id + tags = ["openshiftClusterID=${var.cluster_id}"] + + depends_on = ["openstack_compute_instance_v2.bootstrap"] +}