debuggers.hg

changeset 22867:5ce41defa1fa

libxl: rename xenstored pid file on Linux

Changset 22806:eefb8e971be5 broke 'xl'.

After starting the xenstored, xenconsoled, xenbackendd and running xl
create I get this:
libxl: error: libxl.c:53:libxl_ctx_init Is xenstore daemon running?
failed to stat /var/run/xenstore.pid: No such file or directory
cannot init xl context

The reason for the failure is that the NetBSD startup script
creates the file
/var/run/xenstored.pid
but libxl checks for
/var/run/xenstore.pid

Attached patch makes this consistent across Linux and NetBSD by
changing the Linux name (to the more-conventional food.pid form).

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Christoph Egger <Christoph.Egger@amd.com>
date Wed Jan 26 16:11:41 2011 +0000 (2011-01-26)
parents 310cc33bfc81
children 7873885ec74d
files tools/hotplug/Linux/init.d/xencommons tools/libxl/libxl_internal.h
line diff
     1.1 --- a/tools/hotplug/Linux/init.d/xencommons	Wed Jan 26 16:05:09 2011 +0000
     1.2 +++ b/tools/hotplug/Linux/init.d/xencommons	Wed Jan 26 16:11:41 2011 +0000
     1.3 @@ -52,7 +52,7 @@ do_start () {
     1.4  		test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
     1.5  
     1.6  		echo -n Starting xenstored...
     1.7 -		xenstored --pid-file=/var/run/xenstore.pid $XENSTORED_ARGS
     1.8 +		xenstored --pid-file=/var/run/xenstored.pid $XENSTORED_ARGS
     1.9  
    1.10  		# Wait for xenstored to actually come up, timing out after 30 seconds
    1.11                  while [ $time -lt $timeout ] && ! `xenstore-read -s / >/dev/null 2>&1` ; do
     2.1 --- a/tools/libxl/libxl_internal.h	Wed Jan 26 16:05:09 2011 +0000
     2.2 +++ b/tools/libxl/libxl_internal.h	Wed Jan 26 16:11:41 2011 +0000
     2.3 @@ -110,7 +110,7 @@ typedef struct {
     2.4  #define AUTO_PHP_SLOT          0x100
     2.5  #define SYSFS_PCI_DEV          "/sys/bus/pci/devices"
     2.6  #define SYSFS_PCIBACK_DRIVER   "/sys/bus/pci/drivers/pciback"
     2.7 -#define XENSTORE_PID_FILE      "/var/run/xenstore.pid"
     2.8 +#define XENSTORE_PID_FILE      "/var/run/xenstored.pid"
     2.9  
    2.10  #define PROC_PCI_NUM_RESOURCES 7
    2.11  #define PCI_BAR_IO             0x01