Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sure node is drained before rebooting when rebootDelay is g… #930

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sebastiangaiser
Copy link

…reater than 0

closes #929

…reater than 0

Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
@jackfrancis
Copy link
Collaborator

I've added some concerns in the original issue #929. Let's definitely figure out how to solve for this scenario, but I'm not sure that a second drain operation after the retry wait is the right solution.

Copy link
Collaborator

@evrardjp evrardjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's wise to add this as is. Let's discuss on the issue first maybe?

@@ -788,6 +788,18 @@ func rebootAsRequired(nodeID string, booter reboot.Reboot, sentinelCommand []str
if rebootDelay > 0 {
log.Infof("Delaying reboot for %v", rebootDelay)
time.Sleep(rebootDelay)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it make sense to add this conditionally on reboot delay.

@@ -788,6 +788,18 @@ func rebootAsRequired(nodeID string, booter reboot.Reboot, sentinelCommand []str
if rebootDelay > 0 {
log.Infof("Delaying reboot for %v", rebootDelay)
time.Sleep(rebootDelay)

log.Infof("Making sure %s is drained before reboot", node.GetName())
err = drain(client, node)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don' think we should trigger another drain.

The state should be as expected before reboot, but not triggering an extra drain. See @jackfrancis 's opinion on the issue.

@evrardjp
Copy link
Collaborator

I like the idea, but I think we have details to iron out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kured should verify if node is still drained when delaying reboot
3 participants