Project

General

Profile

Anomalie #2090

Killer tous les processus avant de forcer l'arrêt du conteneur

Added by Emmanuel GARETTE (2) about 11 years ago. Updated almost 11 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
-
Category:
-
Start date:
09/21/2011
Due date:
% Done:

100%

Spent time:
Distribution:
EOLE 2.3

Description

Je ne sais pas bien pourquoi mais lxc-stop n'arrete pas toujours tous les processus. Je propose de faire un kill -9 sur tous les processus d'un conteneur avant de faire un lxc-stop.

--- lxc-halt    2011-09-21 20:58:48.000000000 +0200
+++ /usr/bin/lxc-halt    2011-09-21 23:34:08.000000000 +0200
@@ -55,6 +55,9 @@

         if [ $(( $curtime - $starttime )) -gt $TIMEOUT ]; then
             echo "Container has been stopping for longer than $TIMEOUT seconds, forcing shutdown" >&2
+            sort -r /cgroup/$CONTAINER/tasks | while read a; do
+                kill -9 $a 2> /dev/null
+            done
             lxc-stop -n $CONTAINER
             exit 0
         fi

Associated revisions

Revision 8d86b0c1 (diff)
Added by Joël Cuissinat about 11 years ago

lxc-halt : application du patch "Killer tous les processus avant de forcer l'arrêt du conteneur" (fixes #2090)

History

#1 Updated by Joël Cuissinat about 11 years ago

  • Target version set to Mises à jour 2.3 - 02 RC

#2 Updated by Joël Cuissinat about 11 years ago

  • Project changed from creole to eole-common

#3 Updated by Joël Cuissinat about 11 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100

#4 Updated by Fabrice Barconnière almost 11 years ago

  • Status changed from Résolu to Fermé
  • Distribution set to EOLE 2.3

Also available in: Atom PDF