diff -Nru xen-common-4.1.2/debian/changelog xen-common-4.1.2/debian/changelog --- xen-common-4.1.2/debian/changelog 2012-02-06 15:49:46.000000000 +0000 +++ xen-common-4.1.2/debian/changelog 2012-02-07 10:30:33.000000000 +0000 @@ -1,3 +1,18 @@ +xen-common (4.1.2-1ubuntu2) precise; urgency=low + + [ Stefan Bader ] + * debian/xen-utils-common.xendomains.init: + - Fix parseln to return domain id 0 for inactive managed (xm) + domains. + - Fix parseln to not expect a cpu field in "xm list". + - Fix stop to not kill the watchdog. It either has killed the + command and returned or will end itself automatically. The + runtime advantage should not be huge compared to the ugly + kill messages that appear despite redirecting output. + (LP: #928182) + + -- Stefan Bader Tue, 07 Feb 2012 10:03:25 +0000 + xen-common (4.1.2-1ubuntu1) precise; urgency=low * Merge from Debian testing. Remaining changes: diff -Nru xen-common-4.1.2/debian/xen-utils-common.xendomains.init xen-common-4.1.2/debian/xen-utils-common.xendomains.init --- xen-common-4.1.2/debian/xen-utils-common.xendomains.init 2011-12-07 16:01:00.000000000 +0000 +++ xen-common-4.1.2/debian/xen-utils-common.xendomains.init 2012-02-07 10:33:40.000000000 +0000 @@ -128,10 +128,17 @@ parseln() { - name=`echo $1 | cut -d\ -f1` - name=${name%% *} - rest=`echo $1 | cut -d\ -f2-` - read id mem cpu vcpu state tm < <(echo "$rest") + set -- $1 + name=$1 + # Inactive managed domains have no ID and State field present. Since + # dom0 is skipped for save/restore it is ok to return id=0 for those. + if test $# -lt 6; then + id=0 + else + shift + # Do not see CPU field in Xen-4.1.2+, only VCPUs + read id mem vcpu state tm < <(echo $*) + fi } is_running() @@ -287,12 +294,13 @@ watchdog_xm migrate & WDOG_PID=$! xm migrate $id $XENDOMAINS_MIGRATE - if test $? -ne 0; then + RC=$? + wait $WDOG_PID + if test $RC -ne 0; then rc_failed $? echo -n '!' - kill $WDOG_PID >/dev/null 2>&1 else - kill $WDOG_PID >/dev/null 2>&1 + echo continue fi fi @@ -302,12 +310,13 @@ WDOG_PID=$! mkdir -p "$XENDOMAINS_SAVE" xm save $id $XENDOMAINS_SAVE/$name - if test $? -ne 0; then + RC=$? + wait $WDOG_PID + if test $RC -ne 0; then rc_failed $? echo -n '!' - kill $WDOG_PID >/dev/null 2>&1 else - kill $WDOG_PID >/dev/null 2>&1 + echo continue fi fi @@ -317,11 +326,12 @@ watchdog_xm shutdown & WDOG_PID=$! xm shutdown $id $XENDOMAINS_SHUTDOWN - if test $? -ne 0; then + RC=$? + wait $WDOG_PID + if test $RC -ne 0; then rc_failed $? echo -n '!' fi - kill $WDOG_PID >/dev/null 2>&1 fi done < <(xm list | tail -n +2)