-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add remote restart consumer to handle remote restart actions #1948
Add remote restart consumer to handle remote restart actions #1948
Conversation
level.Debug(logger).Log("msg", "run launcher", "stack", fmt.Sprintf("%+v", err)) | ||
return 1 | ||
} | ||
level.Debug(logger).Log("msg", "runLauncher exited to run newer version of launcher", "err", err.Error()) | ||
level.Debug(logger).Log("msg", "runLauncher exited to reload launcher", "err", err.Error()) | ||
if err := runNewerLauncherIfAvailable(ctx, slogger.Logger); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works on macOS/Linux unless there is nothing to be found in the autoupdate library, in which case launcher will exit and we would have to rely on the init system (launchd/systemd) to restart launcher. (On Windows, we always exit completely and rely on the Service Manager to restart launcher.)
This seems like an okay tradeoff to me, since we will be doing this action only rarely as a troubleshooting step, but I wanted to flag it in case others disagree.
ee/control/consumers/remoterestartconsumer/remoterestartconsumer.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exciting! looks great
This PR implements support for remote restart actions from the control server.
For this new action, it is important that we perform the action exactly once. This PR contains two features to ensure that the action will only be performed once: