Skip to content

Commit b003187

Browse files
committed
Add extra log when Cinder volume deletion fails
"cinder show <id>" output will help us to debug what's wrong with the Cinder volume.
1 parent ead8707 commit b003187

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/e2e/storage/drivers/in_tree.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,13 @@ func (v *cinderVolume) DeleteVolume() {
12091209
}
12101210
framework.Logf("Failed to delete volume %s / %s: %v\n%s", id, name, err, string(output))
12111211
}
1212+
// Timed out, try to get "cinder show <volume>" output for easier debugging
1213+
showOutput, showErr := exec.Command("cinder", "show", id).CombinedOutput()
1214+
if showErr != nil {
1215+
framework.Logf("Failed to show volume %s / %s: %v\n%s", id, name, showErr, string(showOutput))
1216+
} else {
1217+
framework.Logf("Volume %s / %s:\n%s", id, name, string(showOutput))
1218+
}
12121219
framework.Logf("Giving up deleting volume %s / %s: %v\n%s", id, name, err, string(output[:]))
12131220
}
12141221

0 commit comments

Comments
 (0)