Add some more logging so that we can debug PD delete errors.

This commit is contained in:
Brendan Burns 2015-06-17 22:13:34 -07:00
parent 0f3740501b
commit 0bf936d23a

View File

@ -214,7 +214,12 @@ func deletePD(pdName string) error {
zone := testContext.CloudConfig.Zone
// TODO: make this hit the compute API directly.
return exec.Command("gcloud", "compute", "--project="+testContext.CloudConfig.ProjectID, "disks", "delete", "--zone="+zone, pdName).Run()
cmd := exec.Command("gcloud", "compute", "--project="+testContext.CloudConfig.ProjectID, "disks", "delete", "--zone="+zone, pdName)
data, err := cmd.CombinedOutput()
if err != nil {
Logf("Error deleting PD: %s (%v)", string(data), err)
}
return err
} else {
volumes, ok := testContext.CloudConfig.Provider.(aws_cloud.Volumes)
if !ok {