Currently, tracker instances cannot be started if an agent with the same name already exists in the system. However, agents are not always cleaned up properly, and in cases where an instance crashes and is not removed, users are unable to restart their agent with the same name because the database still registers the old agent.
Feature Request:
Enable the creation of a new agent with the same name if it's determined that the existing agent is stale (e.g., not active, crashed, or otherwise unreachable). This will ensure that users do not get blocked when trying to restart agents after abrupt failures.
Acceptance Criteria:
- When starting a tracker instance, if an agent with the requested name already exists:
- Check whether the existing agent is stale (criteria for staleness to be defined, e.g., last heartbeat timestamp, unreachable status, etc.).
- If the agent is stale, allow the new instance to overwrite and reuse the name.
- If the agent is not stale, retain the current duplication block behavior.
- Provide clear logging/messaging to the user when an agent name is overwritten due to staleness.
Benefits:
- Prevents agent restarts from being blocked by lingering stale entries.
- Improves reliability and user experience, especially after crashes or abrupt failures.
If relevant, please further specify criteria for "staleness" in follow-up comments.
Currently, tracker instances cannot be started if an agent with the same name already exists in the system. However, agents are not always cleaned up properly, and in cases where an instance crashes and is not removed, users are unable to restart their agent with the same name because the database still registers the old agent.
Feature Request:
Enable the creation of a new agent with the same name if it's determined that the existing agent is stale (e.g., not active, crashed, or otherwise unreachable). This will ensure that users do not get blocked when trying to restart agents after abrupt failures.
Acceptance Criteria:
Benefits:
If relevant, please further specify criteria for "staleness" in follow-up comments.