Skip to content

Commit

Permalink
Merge pull request #136 from mshitrit/sysrq-trigger_for_software_reboot
Browse files Browse the repository at this point in the history
use sysrq-trigger for software reboot
  • Loading branch information
openshift-merge-robot authored Aug 1, 2023
2 parents b7042da + 5118acb commit 1fc3f14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/self_node_remediation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func getBootTime(node *v1.Node) (*time.Time, error) {
return err
}
return nil
}, 6*time.Minute, 10*time.Second).ShouldNot(HaveOccurred())
}, 15*time.Minute, 10*time.Second).ShouldNot(HaveOccurred())
return &bootTime, nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/reboot/rebooter.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (r *watchdogRebooter) Reboot() error {
func (r *watchdogRebooter) softwareReboot() error {
r.log.Info("about to try software reboot")
// hostPID: true and privileged:true required to run this
rebootCmd := exec.Command("/usr/bin/nsenter", "-m/proc/1/ns/mnt", "/bin/systemctl", "reboot", "--force", "--force")
rebootCmd := exec.Command("/usr/bin/nsenter", "-m/proc/1/ns/mnt", "/bin/bash", "-c", "echo b > /proc/sysrq-trigger")

if err := rebootCmd.Run(); err != nil {
r.log.Error(err, "failed to run reboot command")
Expand Down

0 comments on commit 1fc3f14

Please sign in to comment.