Merge pull request #118498 from pacoxu/nodegracefulshutdown-e2e

re-send the shutdown signal in case the dbus restart is not done
This commit is contained in:
Kubernetes Prow Robot 2023-06-07 10:20:12 -07:00 committed by GitHub
commit fb9c22cb29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -340,14 +340,14 @@ var _ = SIGDescribe("GracefulNodeShutdown [Serial] [NodeFeature:GracefulNodeShut
err = restartDbus() err = restartDbus()
framework.ExpectNoError(err) framework.ExpectNoError(err)
// Wait a few seconds to ensure dbus is restarted... gomega.Eventually(ctx, func(ctx context.Context) error {
time.Sleep(5 * time.Second) // re-send the shutdown signal in case the dbus restart is not done
ginkgo.By("Emitting Shutdown signal") ginkgo.By("Emitting Shutdown signal")
err = emitSignalPrepareForShutdown(true) err = emitSignalPrepareForShutdown(true)
framework.ExpectNoError(err) if err != nil {
return err
}
gomega.Eventually(ctx, func(ctx context.Context) error {
isReady := getNodeReadyStatus(ctx, f) isReady := getNodeReadyStatus(ctx, f)
if isReady { if isReady {
return fmt.Errorf("node did not become shutdown as expected") return fmt.Errorf("node did not become shutdown as expected")