Merge pull request #121506 from kwilczynski/fix/upstream/remove-dbus-restart-test

Remove problematic Dbus restart test
This commit is contained in:
Kubernetes Prow Robot 2023-10-26 01:08:41 +02:00 committed by GitHub
commit 1662399131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -374,35 +374,6 @@ var _ = SIGDescribe("GracefulNodeShutdown [Serial] [NodeFeature:GracefulNodeShut
return nil return nil
}, nodeStatusUpdateTimeout, pollInterval).Should(gomega.Succeed()) }, nodeStatusUpdateTimeout, pollInterval).Should(gomega.Succeed())
}) })
ginkgo.It("after restart dbus, should be able to gracefully shutdown", func(ctx context.Context) {
// allows manual restart of dbus to work in Ubuntu.
err := overlayDbusConfig()
framework.ExpectNoError(err)
defer func() {
err := restoreDbusConfig()
framework.ExpectNoError(err)
}()
ginkgo.By("Restart Dbus")
err = restartDbus()
framework.ExpectNoError(err)
gomega.Eventually(ctx, func(ctx context.Context) error {
// re-send the shutdown signal in case the dbus restart is not done
ginkgo.By("Emitting Shutdown signal")
err = emitSignalPrepareForShutdown(true)
if err != nil {
return err
}
isReady := getNodeReadyStatus(ctx, f)
if isReady {
return fmt.Errorf("node did not become shutdown as expected")
}
return nil
}, nodeStatusUpdateTimeout, pollInterval).Should(gomega.Succeed())
})
}) })
ginkgo.Context("when gracefully shutting down with Pod priority", func() { ginkgo.Context("when gracefully shutting down with Pod priority", func() {
@ -680,12 +651,6 @@ func getNodeReadyStatus(ctx context.Context, f *framework.Framework) bool {
return isNodeReady(&nodeList.Items[0]) return isNodeReady(&nodeList.Items[0])
} }
func restartDbus() error {
cmd := "systemctl restart dbus"
_, err := runCommand("sh", "-c", cmd)
return err
}
func systemctlDaemonReload() error { func systemctlDaemonReload() error {
cmd := "systemctl daemon-reload" cmd := "systemctl daemon-reload"
_, err := runCommand("sh", "-c", cmd) _, err := runCommand("sh", "-c", cmd)