From: Andrew Bays Date: Fri, 1 Nov 2019 14:59:47 +0000 (-0400) Subject: Add error-checking for automated cluster teardown X-Git-Tag: akraino_r2~12 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=512cce3cb300a5bbc5c4befb11422f8d18633c35;p=kni%2Finstaller.git Add error-checking for automated cluster teardown Change-Id: I4c7a056da929cd03e0cdbfb4d2a5469850e5631d --- 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{}