medik8s / self-node-remediation

Automatic repair for unhealthy Kubernetes nodes
https://www.medik8s.io/
Apache License 2.0
45 stars 17 forks source link

`isSoftwareRebootEnabled` doesn't work, node still get annotation for `is-reboot-capable.self-node-remediation.medik8s.io` is `true` #236

Closed rockwyc992 closed 2 weeks ago

rockwyc992 commented 1 month ago

After setup isSoftwareRebootEnabled in SelfNodeRemediationConfig, nodes still get annotaion is-reboot-capable.self-node-remediation.medik8s.io is true

https://github.com/medik8s/self-node-remediation/blob/6c2442db6f97aeb5f6fbd175d875175f2e8c30ed/pkg/utils/annotations.go#L47

I found the source code here. I think it would be && (And) condition between watchdogInitiated and softwareRebootEnabled, or softwareRebootEnabled will never work.

rockwyc992 commented 1 month ago

Can we disable reboot feature with watchdog enabled ?

We need an options to force disable reboot feature to prevent unexpected rebooting.

slintes commented 1 month ago

Reboot is a basic feature of SNR for ensuring that workloads are fenced. Without it, using SNR would not make sense at all. So it can't be disabled. Reboot is primarily triggered by using a watchdog. Only if initializing a watchdog fails, software reboot is used, if allowed in the config. So both the annotation and code are correct, because the node can be rebooted by watchdog OR software reboot.

slintes commented 2 weeks ago

closing, feel free to reopen in case things are unclear

/close

openshift-ci[bot] commented 2 weeks ago

@slintes: Closing this issue.

In response to [this](https://github.com/medik8s/self-node-remediation/issues/236#issuecomment-2407841073): >closing, feel free to reopen in case things are unclear > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.