-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Agent configuration overridden by default fleet config #29297
Conversation
This pull request does not have a backport label. Could you fix it @narph? 🙏
NOTE: |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
@@ -39,10 +39,11 @@ type upgraderControl interface { | |||
} | |||
|
|||
// New creates a new Agent and bootstrap the required subsystem. | |||
func New(log *logger.Logger, pathConfigFile string, reexec reexecManager, statusCtrl status.Controller, uc upgraderControl, agentInfo *info.AgentInfo) (Application, error) { | |||
func New(log *logger.Logger, reexec reexecManager, statusCtrl status.Controller, uc upgraderControl, agentInfo *info.AgentInfo) (Application, error) { | |||
// Load configuration from disk to understand in which mode of operation | |||
// we must start the elastic-agent, the mode of operation cannot be changed without restarting the | |||
// elastic-agent. |
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.
@michalpristas , based on the comments, it looks like it's expecting the elastic-agent.yml config instead of what is sent (fleet.yml). Replacing it made sure the standalone version gets the right config, also that mergeFleetConfig
can merge the 2 configs
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
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.
Looks good to me.
Seems like the change was really paths.AgentConfigFile()
to paths.ConfigFile()
What exactly is the |
Sorry for the confusion here, the agent reads both |
Got it. Based on our offline discussion I'm trying to get my head around why standalone elastic agent reads the fleet.yml in the first place. I'm good with getting the change in but lets make sure we come up with a proper "plan" on how it should work in the future afterwards. |
* replace config * changelog * add test on merge * fmt (cherry picked from commit 70ac1b0)
What does this PR do?
Elastic agent configuration options were overwritten by fleet default configuration options, even in standalone mode.
Why is it important?
undesired behavior.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues