Add error-checking for automated cluster teardown 98/1898/1
authorAndrew Bays <andrew.bays@gmail.com>
Fri, 1 Nov 2019 14:59:47 +0000 (10:59 -0400)
committerAndrew Bays <andrew.bays@gmail.com>
Fri, 1 Nov 2019 14:59:47 +0000 (10:59 -0400)
Change-Id: I4c7a056da929cd03e0cdbfb4d2a5469850e5631d

pkg/automation/baremetal.go

index 94abdce..2de36a8 100644 (file)
@@ -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{}