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

Improve stability of the CAPI metadata tags collection feature #148

Merged
merged 55 commits into from
Jan 6, 2023

Conversation

NouemanKHAL
Copy link
Member

What does this PR do?

  • Fix SUPPRESS_DD_AGENT_OUTPUT behaviour and logs redirection.
  • Fix ImportError: No module named site on the create_logs_config python script by switching to Ruby.
  • Fix a rare race condition that could lead to missing metadata tags during container startup. See update_tags.rb script.
  • Adds a lock mechanism to the update_agent_config.sh script.
  • Improves process management
  • Improves logging
  • Cleanup and refactor of existing code

Review checklist (to be filled by reviewers)

  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@NouemanKHAL NouemanKHAL added the changelog/Fixed Fixed features results into a bug fix version bump label Dec 19, 2022
@NouemanKHAL NouemanKHAL requested a review from a team as a code owner December 19, 2022 13:00
lib/scripts/utils.sh Show resolved Hide resolved
lib/scripts/utils.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@sarah-witt sarah-witt left a comment

Choose a reason for hiding this comment

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

Awesome, left some comments!

lib/scripts/update_tags.rb Outdated Show resolved Hide resolved
Comment on lines +49 to +53
# verify that check_datadog exited successfully
if [ ${exit_code} -ne 0 ]; then
log_error "could not find agent, aborting update script!"
exit ${exit_code}
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, I think we should still try running the update script. Maybe the agent was killed in between runs of the script. But if we don't do this, then we should confirm the trace agent isn't running before exiting since we don't want to be in a state with the trace agent running but not the agent.

lib/scripts/create_logs_config.rb Show resolved Hide resolved
lib/scripts/update_agent_config.sh Outdated Show resolved Hide resolved
lib/scripts/update_yaml_config.rb Outdated Show resolved Hide resolved
lib/scripts/update_yaml_config.rb Outdated Show resolved Hide resolved
@NouemanKHAL NouemanKHAL merged commit 34d6eb2 into master Jan 6, 2023
@NouemanKHAL NouemanKHAL deleted the noueman/fix-agent-redirection-and-cleanup branch January 6, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/Fixed Fixed features results into a bug fix version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants