path.udev.data is not currently using the --path.rootfs prefix#3216
Open
czephyr wants to merge 1 commit intoprometheus:masterfrom
Open
path.udev.data is not currently using the --path.rootfs prefix#3216czephyr wants to merge 1 commit intoprometheus:masterfrom
czephyr wants to merge 1 commit intoprometheus:masterfrom
Conversation
Author
|
needs tests to be adapted |
SuperQ
requested changes
Feb 15, 2025
Member
SuperQ
left a comment
There was a problem hiding this comment.
This needs a DCO sign-off. You can use git commit -s --amend to add it.
Also, the tests need to pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently when running the docker img you need to explicitly set the path.udev.data flag or it will run in:
the non-mounted location
/run/udev/datais searched by default, when instead it should look in${path.rootfs}/run/udev/dataif--path.rootfsis set.This is confusing because this flag is basically compulsory and is not well documented and doesn't align with the plug and play behavior of /proc
and/sys`.This PR suggests to prepend the
path.rootfsto the udev data path.The drawback is that it might make setting
--path.udev.dataconfusing if the user tries to already pass the prepended path like/host/run/udev/databut the error log in this case becomes helpful.Testing
When running the current latest tag
docker run -d --net="host" --pid="host" -v "/:/host:ro,rslave" quay.io/prometheus/node-exporter:latest --path.rootfs=/hostWhen running the local image built from branch
docker run -d --net="host" --pid="host" -v "/:/host:ro,rslave" node_exporter_local --path.rootfs=/host