From 512cce3cb300a5bbc5c4befb11422f8d18633c35 Mon Sep 17 00:00:00 2001 From: Andrew Bays Date: Fri, 1 Nov 2019 10:59:47 -0400 Subject: [PATCH] Add error-checking for automated cluster teardown Change-Id: I4c7a056da929cd03e0cdbfb4d2a5469850e5631d --- pkg/automation/baremetal.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/automation/baremetal.go b/pkg/automation/baremetal.go index 94abdce..2de36a8 100644 --- a/pkg/automation/baremetal.go +++ b/pkg/automation/baremetal.go @@ -498,10 +498,11 @@ func (bad baremetalAutomatedDeployment) DestroyCluster() error { } // Destroy masters via terraform - // TODO: Ignoring errors here until we fix the bogus bootstrap VM destruction error - // that falsely reports a problem when there isn't one (the error says that the - // VM cannot be found, but this is expected because the VM was just destroyed!) - bad.runTerraform(automationRepoPath, "cluster", terraformDestroy) + err = bad.runTerraform(automationRepoPath, "cluster", terraformDestroy) + + if err != nil { + return err + } // Remove bastion (provisioning host) containers scripts := []scriptRunInstance{} -- 2.16.6