mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
e2e: retry running kubectl on known errors
By using retryKubectl helper function, a retry will be done, and the known error messages will be skipped. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
2071c535fa
commit
2c66dfc3e4
@ -375,7 +375,14 @@ func deletePod(name, ns string, c kubernetes.Interface, t int) error {
|
||||
}
|
||||
|
||||
func deletePodWithLabel(label, ns string, skipNotFound bool) error {
|
||||
_, err := framework.RunKubectl(ns, "delete", "po", "-l", label, fmt.Sprintf("--ignore-not-found=%t", skipNotFound))
|
||||
err := retryKubectlArgs(
|
||||
ns,
|
||||
kubectlDelete,
|
||||
deployTimeout,
|
||||
"po",
|
||||
"-l",
|
||||
label,
|
||||
fmt.Sprintf("--ignore-not-found=%t", skipNotFound))
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete pod %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user