Skip to content
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

Check info endpoint for remote configuration availability in the agent #2756

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

lloeki
Copy link
Member

@lloeki lloeki commented Apr 5, 2023

What does this PR do?

Check info endpoint for remote configuration availability in the agent

Motivation

RC should not even start if the agent is unreachable or not configured properly.

Additional Notes

This should also warn the user so that corrective action can be taken self-served.

How to test the change?

Either one of:

  • Do not start agent
  • Start agent without DD_REMOTE_CONFIGURATION_ENABLED=false env var

And then start an app with DD_REMOTE_CONFIGURATION_ENABLED=true

@github-actions github-actions bot added the core Involves Datadog core libraries label Apr 5, 2023
@lloeki lloeki force-pushed the check-info-endpoint-for-config-availability branch from a89ee56 to 8160c00 Compare April 6, 2023 11:32
@lloeki lloeki marked this pull request as ready for review April 14, 2023 13:44
@lloeki lloeki requested a review from a team April 14, 2023 13:44
Comment on lines 28 to 36
Datadog.logger.error do
'agent reachable but does not report remote configuration endpoint: ' \
'disabling remote configuration for this process.'
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a user-visible message, consider perhaps suggesting that users upgrade their agent to get rid of this message?

(Same for the unreachable message below -- perhaps tell them that something seems wrong and they'll probably not be able to report data?)

Copy link
Member

@GustavoCaso GustavoCaso Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point @ivoanjo

Since we are targeting this change for the beta release. We can improve the error message for the official release 😄

@lloeki lloeki force-pushed the check-info-endpoint-for-config-availability branch from 8160c00 to 2795b2f Compare April 14, 2023 13:53
Copy link
Member

@GustavoCaso GustavoCaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lloeki lloeki merged commit 0e30c42 into master Apr 14, 2023
@lloeki lloeki deleted the check-info-endpoint-for-config-availability branch April 14, 2023 14:21
@github-actions github-actions bot added this to the 1.11.0 milestone Apr 14, 2023
@lloeki lloeki modified the milestones: 1.11.0, 1.11.0.beta1 Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants