Issue with Elastic Agent ID duplication
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 370
Description
Describe the enhancement:
It is necessary to implement the ability to "remove/reset" the value of agent.id for an installed agent without reinstalling the agent. Move the agent.id to a file in a separate directory that can be deleted/modified as needed, leading to a change in the agent's identifier. Implement the reset functionality by using the command ".\elastic-agent --reset-agent.id" to allow the execution of the command as part of an OS cloning script or for VDI scenarios.
Describe a specific use case for the enhancement or feature:
In certain scenarios, it is crucial to create a copy of a functioning operating system for the subsequent use by a user. This can include
Creating a golden image for installing the OS on new computers, a unified image with pre-installed software. It's not always feasible to install additional software after the OS deployment.
Creating an image for Virtual Desktop Infrastructure (VDI) since the philosophy is that a VM machine lives from booting to shutdown, and it doesn't have the capability to install software during runtime, as it may exist for minutes to many days.
In the current agent implementation, there is no capability to change the agent.id without reinstalling the agent, which significantly complicates administration. In this context, all VDI pool machines in the console are presented as a single host, just like workstations installed from a single golden image
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the elastic-agent command entry point and the code that persists agent.id. Trace how installation and startup load the identifier, then determine the reset behavior needed for OS cloning and VDI use cases. Done means the command can reset the identifier without reinstalling and the next agent run receives a distinct ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100