Skip to content

Fix #8462 - Use more permissive regexp to extract containerid#18272

Merged
trask merged 1 commit into
open-telemetry:mainfrom
stefanroeck:fix_container_id_cgroupv2
Apr 30, 2026
Merged

Fix #8462 - Use more permissive regexp to extract containerid#18272
trask merged 1 commit into
open-telemetry:mainfrom
stefanroeck:fix_container_id_cgroupv2

Conversation

@stefanroeck

Copy link
Copy Markdown
Contributor

This fixes #8462 by using a more strict regexp that doesn't match "/container" ocurrances in the option field area of the mountinfo file.

Also report a warning, in case a unique containerId cannot be extracted and return the last one.

@stefanroeck
stefanroeck requested a review from a team as a code owner April 24, 2026 21:04
@linux-foundation-easycla

linux-foundation-easycla Bot commented Apr 24, 2026

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: stefanroeck / name: Stefan Röck (c7274f7)

@stefanroeck
stefanroeck force-pushed the fix_container_id_cgroupv2 branch 2 times, most recently from 7f20b55 to a98f7a1 Compare April 24, 2026 23:28
@trask

trask commented Apr 25, 2026

Copy link
Copy Markdown
Member

thanks @stefanroeck! I'm going to convert your PR to draft until you're able to resolve the CLA, and then please mark it ready for review

@trask
trask marked this pull request as draft April 25, 2026 20:34
@stefanroeck
stefanroeck force-pushed the fix_container_id_cgroupv2 branch from a98f7a1 to 4b8921d Compare April 28, 2026 06:28
@stefanroeck

Copy link
Copy Markdown
Contributor Author

/easycla

@stefanroeck
stefanroeck marked this pull request as ready for review April 28, 2026 17:33
@stefanroeck
stefanroeck force-pushed the fix_container_id_cgroupv2 branch from 4b8921d to 3766ef7 Compare April 29, 2026 17:23
…inerid for podman /mountinfo.

Also report a warning, in case of a unique containerId cannot be extracted and return the last one.
@stefanroeck
stefanroeck force-pushed the fix_container_id_cgroupv2 branch from 3766ef7 to c7274f7 Compare April 30, 2026 14:58

@trask trask left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@breedx-splk if you have time can you have a look as well? thanks

@trask
trask merged commit 187269e into open-telemetry:main Apr 30, 2026
93 checks passed
@stefanroeck
stefanroeck deleted the fix_container_id_cgroupv2 branch April 30, 2026 19:36
@otelbot

otelbot Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution @stefanroeck! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container id may be incorrect if cgroup v2 is used

3 participants