mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 06:15:45 +00:00
Merge pull request #118623 from pohly/e2e-storage-stress-test-fix
e2e storage: terminate worker quietly on test completion
This commit is contained in:
commit
07646db483
@ -18,6 +18,7 @@ package storage
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -517,7 +518,7 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
pv, err = config.client.CoreV1().PersistentVolumes().Get(backgroundCtx, pv.Name, metav1.GetOptions{})
|
pv, err = config.client.CoreV1().PersistentVolumes().Get(backgroundCtx, pv.Name, metav1.GetOptions{})
|
||||||
if apierrors.IsNotFound(err) {
|
if apierrors.IsNotFound(err) || errors.Is(err, context.Canceled) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Delete and create a new PV for same local volume storage
|
// Delete and create a new PV for same local volume storage
|
||||||
@ -528,9 +529,15 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = config.client.CoreV1().PersistentVolumes().Delete(backgroundCtx, pv.Name, metav1.DeleteOptions{})
|
err = config.client.CoreV1().PersistentVolumes().Delete(backgroundCtx, pv.Name, metav1.DeleteOptions{})
|
||||||
|
if errors.Is(err, context.Canceled) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
pvConfig := makeLocalPVConfig(config, localVolume)
|
pvConfig := makeLocalPVConfig(config, localVolume)
|
||||||
localVolume.pv, err = e2epv.CreatePV(backgroundCtx, config.client, f.Timeouts, e2epv.MakePersistentVolume(pvConfig))
|
localVolume.pv, err = e2epv.CreatePV(backgroundCtx, config.client, f.Timeouts, e2epv.MakePersistentVolume(pvConfig))
|
||||||
|
if errors.Is(err, context.Canceled) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user