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

service discovery: Add missing cgroup mount #1610

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

vitkyrka
Copy link
Collaborator

@vitkyrka vitkyrka commented Jan 8, 2025

What does this PR do?

Add a missing cgroup mount to system-probe which is required to get container information for service discovery.
This was not required for earlier agent releases but will be from version 7.61 of the agent.

Motivation

Bug found during manual testing of latest agent release.

Additional Notes

The same mount is already added for other features like USM/NPM.

Minimum Agent Versions

Describe your test plan

Follow the instructions on #1449 except use at least version 7.61.0-rc.10 of the agent.
Run the following command in the system-probe container to check that the container_id is filled:

$ kubectl exec -it -n system datadog-agent-wh7nn -c system-probe -- /bin/bash
# curl --unix-socket /var/run/sysprobe/sysprobe.sock http://unix/discovery/services
.... ,"container_id":"2405b0f93c5ed4039223c7b5ac098f32b3e6ae7671a743bca4023e5ac2e75c59"}] ...

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

Add a missing cgroup mount to system-probe which is required to get
container information.
@vitkyrka vitkyrka added the bug Something isn't working label Jan 8, 2025
@vitkyrka vitkyrka added this to the v1.13.0 milestone Jan 8, 2025
@vitkyrka vitkyrka marked this pull request as ready for review January 8, 2025 15:55
@vitkyrka vitkyrka requested a review from a team as a code owner January 8, 2025 15:55
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.77%. Comparing base (db00883) to head (4b8e87e).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1610      +/-   ##
==========================================
- Coverage   48.94%   48.77%   -0.18%     
==========================================
  Files         227      235       +8     
  Lines       20636    21195     +559     
==========================================
+ Hits        10101    10337     +236     
- Misses      10010    10318     +308     
- Partials      525      540      +15     
Flag Coverage Δ
unittests 48.77% <100.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...r/datadogagent/feature/servicediscovery/feature.go 84.61% <100.00%> (+1.28%) ⬆️

... and 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db00883...4b8e87e. Read the comment docs.

@tbavelier
Copy link
Member

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jan 10, 2025

Devflow running: /merge

View all feedbacks in Devflow UI.


2025-01-10 08:32:18 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 15m.


2025-01-10 08:49:03 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit d49f7c2 into main Jan 10, 2025
26 checks passed
@dd-mergequeue dd-mergequeue bot deleted the vincent.whitchurch/sd-cgroup branch January 10, 2025 08:49
tbavelier pushed a commit that referenced this pull request Jan 10, 2025
* service discovery: Add missing cgroup mount

Add a missing cgroup mount to system-probe which is required to get
container information.

* Update test
tbavelier added a commit that referenced this pull request Jan 10, 2025
* service discovery: Add missing cgroup mount

Add a missing cgroup mount to system-probe which is required to get
container information.

* Update test

Co-authored-by: Vincent Whitchurch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mergequeue-status: done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants