From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH v2 09/10] libxl: revert 326a7b74
Date: Fri, 15 Nov 2013 18:22:06 +0000 [thread overview]
Message-ID: <5286664E.4000509@citrix.com> (raw)
In-Reply-To: <1384171831-21275-10-git-send-email-roger.pau@citrix.com>
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@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
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@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-11-15 18:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 12:10 [PATCH v2 00/10] libxl: add driver domain backend daemon Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 01/10] libxl: Introduce nested async operations (nested ao) Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 02/10] libxl: create a local xenstore libxl and device-model dir for guests Roger Pau Monne
2013-11-11 15:24 ` Ian Jackson
2013-11-11 16:36 ` Roger Pau Monné
2013-11-12 15:03 ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 03/10] libxl: don't remove device frontend path from driver domains Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 04/10] libxl: synchronize device removal when using " Roger Pau Monne
2013-11-11 17:02 ` Ian Jackson
2013-11-14 10:37 ` Roger Pau Monné
2013-11-14 12:42 ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 05/10] libxl: remove the Qemu bodge for driver domain devices Roger Pau Monne
2013-11-15 17:09 ` Ian Jackson
2013-11-18 10:07 ` Roger Pau Monné
2013-11-18 11:26 ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 06/10] libxl: don't launch Qemu on Dom0 for Qdisk devices on driver domains Roger Pau Monne
2013-11-15 17:11 ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 07/10] libxl: add Qdisk backend launch helper Roger Pau Monne
2013-11-15 17:34 ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 08/10] xl: put daemonize code in it's own function Roger Pau Monne
2013-11-15 17:36 ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 09/10] libxl: revert 326a7b74 Roger Pau Monne
2013-11-15 17:37 ` Ian Jackson
2013-11-15 18:16 ` Ian Jackson
2013-11-15 18:22 ` Andrew Cooper [this message]
2013-11-11 12:10 ` [PATCH v2 10/10] libxl: add device backend listener in order to launch backends Roger Pau Monne
2013-11-15 17:54 ` Ian Jackson
2013-11-18 11:47 ` Roger Pau Monné
2013-11-18 14:22 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5286664E.4000509@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).