mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Add additional logs on failed cleanup.
This commit is contained in:
parent
5678fa83d9
commit
b0ab8a27cb
@ -160,9 +160,18 @@ func volumeTestCleanup(client *client.Client, config VolumeTestConfig) {
|
|||||||
|
|
||||||
podClient := client.Pods(config.namespace)
|
podClient := client.Pods(config.namespace)
|
||||||
|
|
||||||
// ignore all errors, the pods may not be even created
|
err := podClient.Delete(config.prefix+"-client", nil)
|
||||||
podClient.Delete(config.prefix+"-client", nil)
|
if err != nil {
|
||||||
podClient.Delete(config.prefix+"-server", nil)
|
// Log the error before failing test: if the test has already failed,
|
||||||
|
// expectNoError() won't print anything to logs!
|
||||||
|
glog.Warningf("Failed to delete client pod: %v", err)
|
||||||
|
expectNoError(err, "Failed to delete client pod: %v", err)
|
||||||
|
}
|
||||||
|
err = podClient.Delete(config.prefix+"-server", nil)
|
||||||
|
if err != nil {
|
||||||
|
glog.Warningf("Failed to delete server pod: %v", err)
|
||||||
|
expectNoError(err, "Failed to delete server pod: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start a client pod using given VolumeSource (exported by startVolumeServer())
|
// Start a client pod using given VolumeSource (exported by startVolumeServer())
|
||||||
|
Loading…
Reference in New Issue
Block a user