mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Add extra log when Cinder volume deletion fails
"cinder show <id>" output will help us to debug what's wrong with the Cinder volume.
This commit is contained in:
parent
ead8707f3a
commit
b003187053
@ -1209,6 +1209,13 @@ func (v *cinderVolume) DeleteVolume() {
|
||||
}
|
||||
framework.Logf("Failed to delete volume %s / %s: %v\n%s", id, name, err, string(output))
|
||||
}
|
||||
// Timed out, try to get "cinder show <volume>" output for easier debugging
|
||||
showOutput, showErr := exec.Command("cinder", "show", id).CombinedOutput()
|
||||
if showErr != nil {
|
||||
framework.Logf("Failed to show volume %s / %s: %v\n%s", id, name, showErr, string(showOutput))
|
||||
} else {
|
||||
framework.Logf("Volume %s / %s:\n%s", id, name, string(showOutput))
|
||||
}
|
||||
framework.Logf("Giving up deleting volume %s / %s: %v\n%s", id, name, err, string(output[:]))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user