Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/e2e/basic/sysctl_d_override.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ var _ = ginkgo.Describe("[basic][sysctl_d_override] Node Tuning Operator /etc/sy

ginkgo.By(fmt.Sprintf("writing %s override file on the host with %s=%s", sysctlFile, sysctlVar, sysctlValSet))
_, _, err = util.ExecAndLogCommand("oc", "exec", "-n", ntoconfig.OperatorNamespace(), pod.Name, "--", "sh", "-c",
fmt.Sprintf("echo %s=%s > %s", sysctlVar, sysctlValSet, sysctlFile))
fmt.Sprintf("echo %s=%s > %s; sync %s", sysctlVar, sysctlValSet, sysctlFile, sysctlFile))
gomega.Expect(err).NotTo(gomega.HaveOccurred())

util.ExecAndLogCommand("oc", "rsh", "-n", ntoconfig.OperatorNamespace(), pod.Name, "cat", sysctlFile)

ginkgo.By(fmt.Sprintf("deleting Pod %s", pod.Name))
_, _, err = util.ExecAndLogCommand("oc", "delete", "-n", ntoconfig.OperatorNamespace(), "pod", pod.Name, "--wait")
gomega.Expect(err).NotTo(gomega.HaveOccurred())
Expand Down
23 changes: 1 addition & 22 deletions test/e2e/reboots/stalld.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ var _ = ginkgo.Describe("[reboots][stalld] Node Tuning Operator installing syste

ginkgo.By(fmt.Sprintf("checking the stalld daemon is not running on node %s", node.Name))
out, err := util.ExecCmdInPod(pod, "pidof", "stalld")
gomega.Expect(out).To(gomega.Equal(""))
gomega.Expect(err).To(gomega.HaveOccurred()) // pidof exits 1 when there is no running process found

ginkgo.By(fmt.Sprintf("applying custom realtime profile %s with stalld service", profileStalldOn))
Expand All @@ -99,28 +100,6 @@ var _ = ginkgo.Describe("[reboots][stalld] Node Tuning Operator installing syste
util.Logf(fmt.Sprintf("stalld process running on node %s with PID %s", node.Name, out))
gomega.Expect(err).NotTo(gomega.HaveOccurred())

// We need to wait for TuneD daemon to start and apply its profile, otherwise it might race
// to start 'stalld' after we stop it via systemctl below.
waitForTuneD()

ginkgo.By(fmt.Sprintf("stopping the stalld daemon on node %s", node.Name))
out, err = util.WaitForCmdInPod(pollInterval, waitDuration, pod, "chroot", "/host", "systemctl", "stop", "stalld")
util.ExecAndLogCommand("oc", "rsh", "-n", ntoconfig.OperatorNamespace(), pod.Name, "chroot", "/host", "systemctl", "status", "stalld", "-l", "--no-pager")
gomega.Expect(err).NotTo(gomega.HaveOccurred())

ginkgo.By(fmt.Sprintf("checking the stalld daemon is not running on node %s", node.Name))
_, err = util.ExecCmdInPod(pod, "pidof", "stalld")
gomega.Expect(err).To(gomega.HaveOccurred()) // pidof exits 1 when there is no running process found

ginkgo.By(fmt.Sprintf("rebooting node %s with stalld daemon enabled", node.Name))
util.ExecCmdInPod(pod, "chroot", "/host", "reboot")
// Ignore errors; we can get "exit status 143", i.e. SIGTERM caused by the reboot

// Wait for the host to reboot and the TuneD [service] plug-in to start/enable stalld service.
ginkgo.By(fmt.Sprintf("checking the stalld daemon is running on node %s", node.Name))
out, err = util.WaitForCmdInPod(pollInterval, 20*time.Minute, pod, "pidof", "stalld")
gomega.Expect(err).NotTo(gomega.HaveOccurred())

// Node label needs to be removed first, and we also need to wait for the worker pool to complete the update;
// otherwise worker-rt MachineConfigPool deletion would cause Degraded state of the worker pool.
// see rhbz#1816239
Expand Down