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

Inifinite Restarts of Broken Agents #188

Open
davidraker opened this issue Mar 7, 2024 · 0 comments
Open

Inifinite Restarts of Broken Agents #188

davidraker opened this issue Mar 7, 2024 · 0 comments

Comments

@davidraker
Copy link
Contributor

Describe the bug
When an agent fails to complete its initial setup (i.e., it dies during init), VOLTTRON automatically restarts the agent every few seconds ad infinitum. vctl status shows the agent as being dead, with status 1. This is a problem, because having started a broken agent,
there is no obvious way to stop it from infinitely relaunching agent, since it is not running, short of restarting the platform.

To Reproduce
Steps to reproduce the behavior:

  1. Put a code error into the __init__() of an agent, e.g., "None.get(4)".
  2. Start the agent.
  3. Watch a log tail as the agent repeatedly dies and restarts.

Expected behavior
Agents like the Forward Historian, which may fail to start if it is not able to reach its target, require the restarting functionality, but most agents do not. There should be a limited number of retries, which is configurable, perhaps as an argument to Agent, which can be used by the Forwarder (or manually by developers while debugging the init of a new agent) to specify a larger (or infinite) number of restarts. Other agents should use a default number which is small (say 5 or less). Each time it dies, the log should get a message saying, "Agent died, will restart x more times. Next restart in y seconds". Once x falls to 0, the agent stops restarting.

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

1 participant