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

Re: [Xen-devel] [PATCH v3 3/4] tools: use pidfile for test if xenstored is running



On 02/08/16 12:23, Wei Liu wrote:
> On Fri, Jul 22, 2016 at 05:09:30PM +0200, Juergen Gross wrote:
>> Instead of trying to read xenstore via xenstore-read use the pidfile
>> of xenstored for the test whether xenstored is running. This prepares
>> support of xenstore domain, as trying to read xenstore will block
>> for ever in case xenstore domain is started after trying to read.
>>
>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>> ---
>>  tools/hotplug/Linux/init.d/xencommons.in |  2 +-
>>  tools/hotplug/Linux/launch-xenstore.in   | 58 
>> +++++++++++++++++++-------------
>>  2 files changed, 35 insertions(+), 25 deletions(-)
>>
>> diff --git a/tools/hotplug/Linux/init.d/xencommons.in 
>> b/tools/hotplug/Linux/init.d/xencommons.in
>> index a32608c..a6a40d6 100644
>> --- a/tools/hotplug/Linux/init.d/xencommons.in
>> +++ b/tools/hotplug/Linux/init.d/xencommons.in
>> @@ -96,7 +96,7 @@ case "$1" in
>>      do_start
>>      ;;
>>    status)
>> -        ${bindir}/xenstore-read -s /
>> +        test -f @XEN_RUN_DIR@/xenstored.pid
>>      ;;
>>    stop)
>>      do_stop
>> diff --git a/tools/hotplug/Linux/launch-xenstore.in 
>> b/tools/hotplug/Linux/launch-xenstore.in
>> index a0cbfd3..2bd9f64 100644
>> --- a/tools/hotplug/Linux/launch-xenstore.in
>> +++ b/tools/hotplug/Linux/launch-xenstore.in
>> @@ -18,38 +18,48 @@
>>  XENSTORED=@XENSTORED@
>>  
>>  . @XEN_SCRIPT_DIR@/hotplugpath.sh
>> -test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons && . 
>> @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons
>>  
>> -time=0
>> -timeout=30
>> +test_xenstore () {
>> +    test -f /var/run/xenstored.pid
> 
> You need to change this to @XEN_RUN_DIR@ as well.

Indeed. Thanks for noticing.


Juergen

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

 


Rackspace

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