-
Notifications
You must be signed in to change notification settings - Fork 887
Coder agent should exit when out-of-date #3485
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
Comments
Basically a dupe of #2970 |
We'll have to move the exchanging of a token from instance identity deeper in the agent, which isn't a big deal anyways. The problem is we exchange a token from instance identity at the beginning of the agents lifecycle, so when a new build comes up it attempts to use the old token instead of refreshing. |
@kylecarbs Is this issue provider dependent? I've mostly used the Docker templates and there I've only ever seen the workspace get re-created on updates. So this issue hasn't surfaced. I kind of think it would be OK for So, I guess another way to put this is: Depending on how a template is configured, could it sometimes restart the workspace and sometimes leave it running (currently)? If the behavior varies, I think it'd be important for the user to know this (i.e. warning) or always do updates in the same "interruptive" way. |
It's not, this is purely in the agent. If a token is returned invalid, we should exchange to get a new one from the instance identity again, not continually poll with the invalid token. |
With the Coder agent configured as a systemd service, when a workspace is updated, the agent will no longer be shown as connected in the UI and the running agent displays a warning level log with "Error: build is outdated". The coder agent does not exit however. If it did, systemd would just restart it and everything would be happy again. I could restart it as part of a Terraform null_resource, but I think the coder agent behavior should just be improved.
Couple points:
The text was updated successfully, but these errors were encountered: