[continue 912] strip rootfs prefix for run in docker #1058
[continue 912] strip rootfs prefix for run in docker #1058SuperQ merged 3 commits intoprometheus:masterfrom
Conversation
- relates to prometheus#66 Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
namespace, which allows processes within the container to see all of the processes on the system. Signed-off-by: Yecheng Fu <cofyc.jackson@gmail.com>
grobie
left a comment
There was a problem hiding this comment.
Could we add some tests this behavior?
|
@cofyc Thanks for picking this up. I'm thinking about this, and trying to decide if we should default the flag to |
|
Sure, I found there is a e2e framework Agree, by default rootfs is at However, I found there is a issue to get mount points from These are container internal mount points we don't care. Note that I suggest to get mount points from In container, with We still need to mount host filesystem into container to access filesystem stats. |
|
hi, I pushed a new commit to use Here is my quick test to verify it works the same as on the host: |
`/proc/1/mounts`. See prometheus#1058. Signed-off-by: Yecheng Fu <cofyc.jackson@gmail.com>
|
Any other concerns? |
|
Wow! Completely forgot about 912 and accidentally have found this new pr with google :) @cofyc good work 👍 |
|
Sorry, this fell off my review radar. Would you please update the CHANGELOG.md with an Otherwise, looks great! |
|
Since we're moving to |
* strip rootfs prefix for run in docker * Use `/` as default value of path.rootfs, and parse mounts from `/proc/1/mounts`. * No need to mount `/proc` and `/sys` because we share host's PID namespace, which allows processes within the container to see all of the processes on the system. Closes: percona#66 Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com> Signed-off-by: Yecheng Fu <cofyc.jackson@gmail.com>
Because @diafour has not responded for months, and I hope we can support it officially, so I continue his work in #912.
Summary of changes:
cc @SuperQ @discordianfish