Kees van Vloten
2006-Dec-13 22:37 UTC
[Pkg-xen-devel] Bug#402974: xen-utils-common: xen domain do not always shutdown
Package: xen-utils-common Version: 3.0.3-0-2 Severity: normal Tags: patch When shutting down xen domains with '/etc/init.d/xendomains stop' most of the time not all domains are stopped when the script finishes. As it turns out the xendomains-script queries running domains by executing 'xm list', this command replies its usage info sometimes instead of giving proper output. I suspect this happens when xen is busy (e.g. with shutting down domains). I have patched xendomains with a wrapper around 'xm list', in order to retry when it returns 'Usage ...' instead of the normal list of running domains. The other thing included in the patch is to allow longer domain names (up to 40 chars) to be handled properly (solves bug #395305). --- xendomains.org 2006-11-28 11:45:39.000000000 +0100 +++ xendomains 2006-12-09 01:01:06.000000000 +0100 @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash ### BEGIN INIT INFO # Provides: xendomains # Required-Start: $syslog $remote_fs xend @@ -128,9 +128,9 @@ parseln() { - name=`echo "$1" | cut -c0-17` + name=`echo "$1" | cut -c0-40` name=${name%% *} - rest=`echo "$1" | cut -c18- ` + rest=`echo "$1" | cut -c41- ` read id mem cpu vcpu state tm < <(echo "$rest") } @@ -204,15 +204,31 @@ fi } +xm_list() +{ + OK=0 + while [ $OK -eq 0 ]; do + OUT=`xm list` + echo "$OUT" | grep -q "^Usage" + if [ $? -eq 1 ]; then + OK=1 + else + sleep 1s + fi + done + echo "$OUT" + return 0 +} + all_zombies() { while read LN; do parseln "$LN" if test $id = 0; then continue; fi if test "$state" != "-b---d" -a "$state" != "-----d"; then return 1; fi - done < <(xm list | grep -v '^Name') + done < <(xm_list | grep -v '^Name') return 0 } @@ -316,14 +332,14 @@ echo -n "(shut)" watchdog_xm shutdown & WDOG_PID=$! - xm shutdown $id $XENDOMAINS_SHUTDOWN + xm shutdown $id $XENDOMAINS_SHUTDOWN > /dev/null if test $? -ne 0; then rc_failed $? echo -n '!' fi kill $WDOG_PIG >/dev/null 2>&1 fi - done < <(xm list | grep -v '^Name') + done < <(xm_list | grep -v '^Name') # NB. this shuts down ALL Xen domains (politely), not just the ones in # AUTODIR/* -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-2-xen-k7 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages xen-utils-common depends on: ii lsb-base 3.1-22 Linux Standard Base 3.1 init scrip ii udev 0.103-1 /dev/ and hotplug management daemo xen-utils-common recommends no packages. -- no debconf information
Debian Bug Tracking System
2012-May-06 15:57 UTC
[Pkg-xen-devel] Bug#402974: marked as done (xen-utils-common: xen domain do not always shutdown)
Your message dated Sun, 6 May 2012 17:53:04 +0200 with message-id <20120506155304.GB13846 at wavehammer.waldi.eu.org> and subject line fixed has caused the Debian Bug report #402974, regarding xen-utils-common: xen domain do not always shutdown to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 402974: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402974 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Kees van Vloten <kvv at chopin.demon.nl> Subject: xen-utils-common: xen domain do not always shutdown Date: Wed, 13 Dec 2006 22:33:58 +0100 Size: 4178 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120506/6f249cbc/attachment.mht> -------------- next part -------------- An embedded message was scrubbed... From: Bastian Blank <waldi at debian.org> Subject: fixed Date: Sun, 6 May 2012 17:53:04 +0200 Size: 1582 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120506/6f249cbc/attachment-0001.mht>
Possibly Parallel Threads
- Bug#772274: xen-utils-common: when upgrading package: insserv: Service xenstored has to be enabled to start service xendomains
- Bug#395305: /etc/init.d/xendomains parseln() and long domU names
- Bug#408739: xen-utils-common: xendomans script sets WDOG_PID and then references WDOG_PIG
- Bug#402974: additional info
- Bug#414294: xen-utils-common: /etc/init.d/xendomains fail to save domains with "long" names