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

Re: [Xen-devel] [PATCH v2 09/10] libxl: revert 326a7b74



On 11/11/13 12:10, Roger Pau Monne wrote:
> When running libxl from a driver domain there's no xenstore pid file
> (because xenstore is not running on the driver domain). Also, at that
> point in libxl initialization there's no way to know wether libxl is
> running on a domain different than Dom0, so just revert the change in
> order to allow libxl to work on driver domains.
>
> Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

With this change, I can get rid of my skanky "touch
/var/run/xenstored.pid" hack to get things like "xl info" to work in the
XenServer installer and early boot environments where xenstored is
really not running.

In fact, I nominate this change for backport.

~Andrew

> ---
>  tools/libxl/libxl.c          |    7 -------
>  tools/libxl/libxl_internal.h |    1 -
>  2 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 0f0f56c..92a6ef7 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -25,7 +25,6 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
>                      unsigned flags, xentoollog_logger * lg)
>  {
>      libxl_ctx *ctx = NULL;
> -    struct stat stat_buf;
>      int rc;
>  
>      if (version != LIBXL_VERSION) { rc = ERROR_VERSION; goto out; }
> @@ -82,12 +81,6 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
>      rc = libxl__poller_init(ctx, &ctx->poller_app);
>      if (rc) goto out;
>  
> -    if ( stat(XENSTORE_PID_FILE, &stat_buf) != 0 ) {
> -        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Is xenstore daemon 
> running?\n"
> -                     "failed to stat %s", XENSTORE_PID_FILE);
> -        rc = ERROR_FAIL; goto out;
> -    }
> -
>      ctx->xch = xc_interface_open(lg,lg,0);
>      if (!ctx->xch) {
>          LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, errno,
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 2fdfaef..77039f4 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -378,7 +378,6 @@ typedef struct {
>  #define PCI_SLOT(devfn)         (((devfn) >> 3) & 0x1f)
>  #define PCI_FUNC(devfn)         ((devfn) & 0x07)
>  #define AUTO_PHP_SLOT          0x100
> -#define XENSTORE_PID_FILE      "/var/run/xenstored.pid"
>  
>  #define PROC_PCI_NUM_RESOURCES 7
>  #define PCI_BAR_IO             0x01


_______________________________________________
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®.