Skip to content

[cmd/opampsupervisor] fix: Report RemoteConfigStatus on startup if present #40233

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

Conversation

dpaasman00
Copy link
Contributor

@dpaasman00 dpaasman00 commented May 22, 2025

Description

The OpAMP Client StartSettings include an initial RemoteConfigStatus that can be reported on startup. In the event it is unset/nil, OpAMP servers will respond with a RemoteConfig message to the supervisor. However, when the supervisor receives this message and it's the same config it is already running the collector with, it has nothing to do so it drops the message. This causes the OpAMP server to continually send more RemoteConfig messages because the supervisor hasn't reported a status since startup.

This PR sets this initial RemoteConfigStatus if we have one present. Made a slight refactor to how we load the initial config. Pulled out the remote config loading into it's own function that is called during the client start. This has no affect on the config loading.

Link to tracking issue

Fixes

Testing

Updated an e2e test testing supervisor&collector start up when there's a remote config present to also check the remote config message that is sent.

Documentation

@dpaasman00 dpaasman00 requested review from evan-bradley, atoulme and a team as code owners May 22, 2025 18:34
@dpaasman00 dpaasman00 changed the title [cmd/opampsupervisor] report remotecfg on startup if present [cmd/opampsupervisor] Report RemoteConfigStatus on startup if present May 22, 2025
@github-actions github-actions bot requested a review from tigrannajaryan May 22, 2025 18:34
@dpaasman00 dpaasman00 changed the title [cmd/opampsupervisor] Report RemoteConfigStatus on startup if present [cmd/opampsupervisor] fix: Report RemoteConfigStatus on startup if present May 22, 2025
@dpaasman00 dpaasman00 force-pushed the supervisor-reports-remote-cfg-on-startup branch from f3d5df9 to 52d5ed6 Compare May 22, 2025 19:15
@dpaasman00 dpaasman00 marked this pull request as draft May 22, 2025 19:24
@dpaasman00 dpaasman00 marked this pull request as ready for review May 22, 2025 19:50
@dpaasman00 dpaasman00 force-pushed the supervisor-reports-remote-cfg-on-startup branch from d907495 to 5200ee3 Compare May 23, 2025 14:42
@evan-bradley evan-bradley merged commit 74d5901 into open-telemetry:main May 23, 2025
175 checks passed
@github-actions github-actions bot added this to the next release milestone May 23, 2025
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants