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

Remote Agent shutdown and/or pause capability #38

Open
djaglowski opened this issue Nov 18, 2021 · 1 comment
Open

Remote Agent shutdown and/or pause capability #38

djaglowski opened this issue Nov 18, 2021 · 1 comment

Comments

@djaglowski
Copy link
Member

djaglowski commented Nov 18, 2021

A "shutdown" capability can be useful for retiring unsupported versions / zombie instances.

Is it assumed that the OpAMP connection is lost after the "shutdown"? This would mean "shutdown" is irreversible (unless the Agent us run again after e.g. machine restarts)?

That is how I would define it.

I have implemented a shutdown in a supervised model but not one where the supervisor had a connection. I'll describe that first as a possible model:

  • Server sends a shutdown signal to the agent
  • The agent process shuts down w/ a particular exit code
  • The supervisor checks the exit code and interprets it to mean that it should itself shut down
  • If there is an externally driven restart (e.g. machine restart)
    • The agent connects to the server, transmits (among other things) its ID
    • The server recognizes the ID as having been retired, and responds with another "shutdown" signal

In the case where the supervisor has a connection, it may worth differentiating between the cases where a total shutdown is desired, vs waiting for further instructions. Even a standalone agent could differentiate between the two behaviors:

  • "shutdown": end the process
  • "pause": cease all activity except for the connection to server

Originally posted by @djaglowski in #22 (comment)

@andykellr
Copy link
Contributor

I proposed an implementation in open-telemetry/opamp-go#53 using ServerToAgent.Flags

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

No branches or pull requests

2 participants