[Devel] [PATCH 1/2] vzctl: allow upstream to safely stop container when setns is available
Glauber Costa
glommer at parallels.com
Mon Feb 25 19:40:36 PST 2013
The test preventing the execution of in-container reboot right now just
checks whether or not we are running an upstream Linux Kernel. However,
it is perfectly possible to gracefuly stop the container if joining the
pid namespace is possible.
Update the test to reflect that.
Signed-off-by: Glauber Costa <glommer at parallels.com>
---
src/lib/env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/env.c b/src/lib/env.c
index c185b3f..2da848d 100644
--- a/src/lib/env.c
+++ b/src/lib/env.c
@@ -797,7 +797,7 @@ static int env_stop(vps_handler *h, envid_t veid, const char *root,
if (stop_mode == M_KILL)
goto kill_vps;
- if (!is_vz_kernel(h)) {
+ if (!is_vz_kernel(h) && !h->can_join_pidns) {
logger(-1, 0, "Due to lack of proper support in this kernel, "
"container can't be cleanly\n"
"stopped from the host system. Please stop it from inside, "
--
1.7.11.7
More information about the Devel
mailing list