[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Xendomains was not correctly suspending domains when a STOP was issued.


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Ian Murray <murrayie@xxxxxxxxxxx>
  • Date: Thu, 27 Jun 2013 12:51:55 +0100 (BST)
  • Cc: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 27 Jun 2013 11:52:12 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=pLJYowIeBJlpVPp0+hiLzFmANzuBlSewiobFFmsfL0pHuBHwFc2c3bGA5m2TPJTLgmmCn9VdSvGujy0pcs+7qH/JVb/AIVAY7wdZshi8v2eWLSZ76VAcyDO1j0W7WJORWHNtIZa6X3h2dl3p4heVs5P0Ko17dwU9wkp1QvFs7co=;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>




----- Original Message -----
> From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> To: Ian Murray <murrayie@xxxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxx
> Sent: Thursday, 27 June 2013, 12:32
> Subject: Re: [Xen-devel] [PATCH] Xendomains was not correctly suspending
 domains when a STOP was issued.
> 
> On Sat, 2013-06-22 at 13:38 +0100, Ian Murray wrote:
>>  The regex was not selecting the { when parsing JSON output of xl list -l.
>>  It was also not selecting (domain when parsing xl list -l when SXP 
> selected.
>> 
>>  Pefixed { with 4 spaces, and removed an extra ( before domain in the regex
>>  string
>> 
>>  Added quotes around the grep strings so the spaces inserted into the string
>>  didn't not break the grepping.
>> 
>>  This has now been tested against 4.3RC5
> 
> I also tested on current staging with xl (json), xl (sxp) and xm (sxp)
> with two domains and it worked fine where previously the xl json case
> would try and suspend the same domain twice (I didn't bother testing the
> old case for the other two at that point).
> 

Thanks. BTW, the JSON output of 4.3 looked the same to me as 4.2.2 (i.e. badly 
formed), so I am not sure the patch you mentioned to make it well-formed was in 
as of 4.3 RC5.  if/when the well formed patch is introduced (if it isn't 
already), it may very well break this (xendomains) patch.

>>  Signed-off-by: Ian Murray <murrayie@xxxxxxxxxxx>
> 
> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> 
> And applied.
> 

Thanks. Have a good release. :)

>>  ---
>>   tools/hotplug/Linux/init.d/xendomains |   10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>> 
>>  diff --git a/tools/hotplug/Linux/init.d/xendomains 
> b/tools/hotplug/Linux/init.d/xendomains
>>  index 730541e..38371af 100644
>>  --- a/tools/hotplug/Linux/init.d/xendomains
>>  +++ b/tools/hotplug/Linux/init.d/xendomains
>>  @@ -206,7 +206,7 @@ rdnames()
>>       done
>>   }
>>   
>> 
> -LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":'
>>  +LIST_GREP='(domain\|(domid\|(name\|^    
> {$\|"name":\|"domid":'
>>   parseln()
>>   {
>>       if [[ "$1" =~ '(domain' ]] || [[ "$1" = 
> "{" ]]; then
>>  @@ -237,7 +237,7 @@ is_running()
>>           RC=0
>>           ;;
>>       esac
>>  -    done < <($CMD list -l | grep $LIST_GREP)
>>  +    done < <($CMD list -l | grep "$LIST_GREP")
>>       return $RC
>>   }
>>   
>>  @@ -319,7 +319,7 @@ all_zombies()
>>       if test "$state" != "-b---d" -a "$state" 
> != "-----d"; then
>>           return 1;
>>       fi
>>  -    done < <($CMD list -l | grep $LIST_GREP)
>>  +    done < <($CMD list -l | grep "$LIST_GREP")
>>       return 0
>>   }
>>   
>>  @@ -450,7 +450,7 @@ stop()
>>           fi
>>           kill $WDOG_PID >/dev/null 2>&1
>>       fi
>>  -    done < <($CMD list -l | grep $LIST_GREP)
>>  +    done < <($CMD list -l | grep "$LIST_GREP")
>>   
>>       # NB. this shuts down ALL Xen domains (politely), not just the ones in
>>       # AUTODIR/*
>>  @@ -487,7 +487,7 @@ check_domain_up()
>>           return 0
>>           ;;
>>       esac
>>  -    done < <($CMD list -l | grep $LIST_GREP)
>>  +    done < <($CMD list -l | grep "$LIST_GREP")
>>       return 1
>>   }
>>   
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.