From 4fdb1cfae2ae78686671757cca510dfc5a59faa8 Mon Sep 17 00:00:00 2001 From: Mike Fedosin Date: Mon, 23 Mar 2020 13:04:47 +0100 Subject: [PATCH] Bug 1812950: generate metadata before tfvars Now we generate terraform config and create resources for OpenStack first, and only then we create the metadata.json file. In case the resources were not created because of an error, we get garbage in the system. And the installer cannot remove it because the metadata file has not been generated yet. This commit creates the file before the generation of terraform config. --- pkg/asset/targets/targets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/asset/targets/targets.go b/pkg/asset/targets/targets.go index 6e0fdd73e24..3b3303c67f8 100644 --- a/pkg/asset/targets/targets.go +++ b/pkg/asset/targets/targets.go @@ -63,11 +63,11 @@ var ( // Cluster are the cluster targeted assets. Cluster = []asset.WritableAsset{ + &cluster.Metadata{}, &cluster.TerraformVariables{}, &kubeconfig.AdminClient{}, &password.KubeadminPassword{}, &tls.JournalCertKey{}, - &cluster.Metadata{}, &cluster.Cluster{}, } )