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

Fixes #7189: issues with process management on physical hosting LXC containers #747

Conversation

peckpeck
Copy link
Member

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}'"

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 ?

Copy link
Member Author

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

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)

Copy link
Member Author

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

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 :)

@peckpeck peckpeck force-pushed the bug_7189/issues_with_process_management_on_physical_hosting_lxc_containers branch from 8ca35f3 to 1b122bf Compare September 21, 2015 15:41
@peckpeck
Copy link
Member Author

PR updated

@peckpeck peckpeck force-pushed the bug_7189/issues_with_process_management_on_physical_hosting_lxc_containers branch from 1b122bf to 2f667ce Compare September 21, 2015 16:04
@peckpeck
Copy link
Member Author

PR updated

@Kegeruneku
Copy link

Looks good !

Kegeruneku pushed a commit that referenced this pull request Sep 21, 2015
…nagement_on_physical_hosting_lxc_containers

Fixes #7189: issues with process management on physical hosting LXC containers
@Kegeruneku Kegeruneku merged commit b3f9867 into Normation:branches/rudder/2.11 Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants