Repository navigation
🐛 fix: treat already-running agent at startup launch as benign #18938
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Startup no longer reports "failed to start agent" (and a self-report issue) when an agent is already running or launching by the time its startup launch runs ([#18936](https://github.com/hivecommons/hive/issues/18936)). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4655,7 +4655,13 @@ func (b *boot) bootLaunchWith(deps bootLaunchDeps) { | |
| } | ||
| b.logger.Info("audit: starting agent", "name", name, "trigger", "startup") | ||
| if err := deps.startAgent(b.ctx, b.agentMgr, name); err != nil { | ||
| b.logger.Warn("failed to start agent", "name", name, "error", err) | ||
| if stoppedAgentStartErrorIsBenign(err) { | ||
| // Already running (adopted/raced) or launching: the desired | ||
| // end state holds, so this is not a start failure (#18936). | ||
| b.logger.Info("agent already started; skipping startup launch", "name", name, "reason", err.Error()) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Low: the benign check also matches |
||
| } else { | ||
| b.logger.Warn("failed to start agent", "name", name, "error", err) | ||
| } | ||
| } else { | ||
| // Surface whether a persisted operator pause was honored on this | ||
| // restart, so the audit log shows pause state survived (or didn't). | ||
|
|
||
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.
Advisory: stoppedAgentStartErrorIsBenign also matches 'shared session pool is busy' (eval_cycle_seams.go:665-667). That case means the agent did not start, yet this logs 'agent already started'. Consider restricting to the already-running/launch-in-progress messages, or rewording.