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
Fixes #7189: issues with process management on physical hosting LXC containers #747
Conversation
PS="${RUDDERPS} -E 0" | ||
ns=$(ps -h -o utsns --pid $$ 2>/dev/null) | ||
if [ $? -eq 0 ]; then # we have namespaces | ||
PS_COMMAND="ps -h -e -O utsns | grep -E '^[[:space:]]*[[:digit:]]*[[:space:]]+${ns}'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we consider a namespace-enabled ps binary compatible with OpenVZ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, the openvz version I tried didn't have namespaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm asking because this command works on my Debian jessie (without any container management system installed, just because systemd is here seems to be enough) and in the case you have a ns enabled ps and OpenVZ installed, this modification would basically break OpenVZ support I guess (the vzps cases wouldn't even be evaluated)
Maybe we should make two separate if's to separate Docker/LXC support (namespaces) and OpenVZ one (/proc/bs/0 presence)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can revers the test logic and first detect openvz, if it is present, user will probably use openvz and not namespace based containers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, looks good to me :)
8ca35f3
to
1b122bf
Compare
PR updated |
1b122bf
to
2f667ce
Compare
PR updated |
Looks good ! |
…nagement_on_physical_hosting_lxc_containers Fixes #7189: issues with process management on physical hosting LXC containers
https://www.rudder-project.org/redmine/issues/7189