Is there a particular reason behind the lack of blktap2 support in xen-4.1 packages? I remember there was license issues when packaging xen-4.0 but they had been solved since a long time. Cheers, Darkbasic
> On Wed, 27 Apr 2011 16:42:00 +0200 <darkbasic4 at gmail.com> wrote: > > Is there a particular reason behind the lack of blktap2 support in > xen-4.1 packages? > I remember there was license issues when packaging xen-4.0 but they had > been solved since a long time. >The change-log shows that blktap2 has been enabled in Debian xen 4.1 packages since 4.1.0~rc6-1. If the enabled blktap2 support differs from the upstream blktap2, I am not sure. [snip] xen (4.1.0~rc6-1) unstable; urgency=low ?? * New upstream release candidate. ?? * Build documentation using pdflatex. ?? * Use python 2.6. (closes: #596545) ?? * Fix lintian override. ?? * Install new tools: xl, xenpaging. ?? * Enable blktap2. ???? - Use own md5 implementation. ???? - Fix includes. ???? - Fix linking of blktap2 binaries. ???? - Remove optimization setting. ?? * Temporarily disable hvmloader, wants to download ipxe. ?? * Remove xenstored pid check from xl. ?-- Bastian Blank <waldi at debian.org>? Thu, 17 Mar 2011 16:12:45 +0100 [/snip] -M
----- Original message -----> I found why it hanged without any kind of output: I had > bootloader="/usr/lib/xen-4.0/bin/pygrub" instead of 4.1 -.-because you have Xen to set: /etc/alternatives/xen-default I often manually set a symlink in /usr/lib/xen. This avoids such mistakes and enable smooth upgrades.> Anyway I still have problems: > 1) If module blktap is loaded the vm does not load and I get this error: > failed to run bootloader: -3 > 2) Networking (routed) does not work > > Darkbasicplease paste your full config file for your domU. Thomas
On Wed, Apr 27, 2011 at 04:42:00PM +0200, Niccol? Belli wrote:> Is there a particular reason behind the lack of blktap2 support in > xen-4.1 packages?I never needed it and never got to test it. The current state is as follows: - blktap2 is built and anything is linked correctly. - The tapdisk2 binary is missing and the library is not able to find it properly if installed. Bastian -- Love sometimes expresses itself in sacrifice. -- Kirk, "Metamorphosis", stardate 3220.3
Ian Campbell
2011-May-04 14:51 UTC
[Xen-devel] [PATCH 1 of 4] libxl: check that device model binary is executable
# HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1304499810 -3600 # Node ID 1e3a986b6d298628c6ef8839448860fd41771b2a # Parent 4d0e906543dc115b5b2f90e0cb44f6affb3f1f99 libxl: check that device model binary is executable. This causes us to fail more quickly in more obvious failure case of not having the right binary installed. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r 4d0e906543dc -r 1e3a986b6d29 tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Tue May 03 16:53:22 2011 +0100 +++ b/tools/libxl/libxl_dm.c Wed May 04 10:03:30 2011 +0100 @@ -762,7 +762,12 @@ int libxl__create_device_model(libxl__gc rc = ERROR_FAIL; goto out; } - + if (access(dm, X_OK) < 0) { + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, + "device model %s is not executable", dm); + rc = ERROR_FAIL; + goto out; + } args = libxl__build_device_model_args(gc, dm, info, disks, num_disks, vifs, num_vifs); if (!args) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-04 14:51 UTC
[Xen-devel] [PATCH 2 of 4] libxl: remove redundant call to libxl_domain_device_model
# HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1304516240 -3600 # Node ID cba88f487f7c5a2d08b0dd5a484c0895c6dee17f # Parent 1e3a986b6d298628c6ef8839448860fd41771b2a libxl: remove redundant call to libxl_domain_device_model Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r 1e3a986b6d29 -r cba88f487f7c tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Wed May 04 10:03:30 2011 +0100 +++ b/tools/libxl/libxl_dm.c Wed May 04 14:37:20 2011 +0100 @@ -830,9 +830,7 @@ retry_transaction: goto out_close; if (!rc) { /* inner child */ setsid(); - libxl__exec(null, logfile_w, logfile_w, - libxl__domain_device_model(gc, info), - args); + libxl__exec(null, logfile_w, logfile_w, dm, args); } rc = 0; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-04 14:51 UTC
[Xen-devel] [PATCH 3 of 4] libxl: pass libxl__spawn_starting to libxl__spawn_spawn
# HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1304516241 -3600 # Node ID ec008dc43727191f472cd4bd5e59d9d35d9d36c2 # Parent cba88f487f7c5a2d08b0dd5a484c0895c6dee17f libxl: pass libxl__spawn_starting to libxl__spawn_spawn. Passing a libxl__device_model_starting to a generic function and expecting it to scrobble inside for the generic data structure is a strange interface. Instead pass in a libxl__spawn_starting and an opaque hook data pointer. The for_spawn member of libxl__device_model_starting was annotated with "first!", suggesting that someone intended to use pointer casting tricks to move between the outer and inner struct. However the field is a pointer not a inline struct so this doesn''t work (and it isn''t used this way anyhow). Remove the comment, and move the field away from the front for good measure. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r cba88f487f7c -r ec008dc43727 tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Wed May 04 14:37:20 2011 +0100 +++ b/tools/libxl/libxl_dm.c Wed May 04 14:37:21 2011 +0100 @@ -825,7 +825,8 @@ retry_transaction: } } - rc = libxl__spawn_spawn(gc, p, "device model", dm_xenstore_record_pid); + rc = libxl__spawn_spawn(gc, p->for_spawn, "device model", + dm_xenstore_record_pid, p); if (rc < 0) goto out_close; if (!rc) { /* inner child */ diff -r cba88f487f7c -r ec008dc43727 tools/libxl/libxl_exec.c --- a/tools/libxl/libxl_exec.c Wed May 04 14:37:20 2011 +0100 +++ b/tools/libxl/libxl_exec.c Wed May 04 14:37:21 2011 +0100 @@ -92,16 +92,16 @@ void libxl_report_child_exitstatus(libxl } int libxl__spawn_spawn(libxl__gc *gc, - libxl__device_model_starting *starting, + libxl__spawn_starting *for_spawn, const char *what, void (*intermediate_hook)(void *for_spawn, - pid_t innerchild)) + pid_t innerchild), + void *hook_data) { libxl_ctx *ctx = libxl__gc_owner(gc); pid_t child, got; int status; pid_t intermediate; - libxl__spawn_starting *for_spawn = starting->for_spawn; if (for_spawn) { for_spawn->what = strdup(what); @@ -127,7 +127,7 @@ int libxl__spawn_spawn(libxl__gc *gc, if (!child) return 0; /* caller runs child code */ - intermediate_hook(starting, child); + intermediate_hook(hook_data, child); if (!for_spawn) _exit(0); /* just detach then */ diff -r cba88f487f7c -r ec008dc43727 tools/libxl/libxl_internal.h --- a/tools/libxl/libxl_internal.h Wed May 04 14:37:20 2011 +0100 +++ b/tools/libxl/libxl_internal.h Wed May 04 14:37:21 2011 +0100 @@ -237,9 +237,9 @@ typedef struct { } libxl__spawn_starting; typedef struct { - libxl__spawn_starting *for_spawn; /* first! */ char *dom_path; /* from libxl_malloc, only for dm_xenstore_record_pid */ int domid; + libxl__spawn_starting *for_spawn; } libxl__device_model_starting; /* from xl_create */ @@ -277,9 +277,10 @@ _hidden int libxl__wait_for_device_model void *check_callback_userdata); _hidden int libxl__spawn_spawn(libxl__gc *gc, - libxl__device_model_starting *starting, + libxl__spawn_starting *starting, const char *what, - void (*intermediate_hook)(void *for_spawn, pid_t innerchild)); + void (*intermediate_hook)(void *for_spawn, pid_t innerchild), + void *hook_data); _hidden int libxl__destroy_device_model(libxl__gc *gc, uint32_t domid); /* Logs errors. A copy of "what" is taken. Return values: _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-04 14:51 UTC
[Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_for_device_model
# HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1304516515 -3600 # Node ID 36871b37a9bd286d6ef291b41513c33325db9719 # Parent ec008dc43727191f472cd4bd5e59d9d35d9d36c2 libxl: add statup checks to libxl__wait_for_device_model When the device model is starting up push checks for spawn failure down into libxl__wait_for_device_model, allowing us to fail more quickly when the device model fails to start (e.g. due to a missing library or an early setup error etc). In order to allow the select loop in libxl__wait_for_device_model to wake when the child dies add pipe between the parent and the intermediate process which the intermediate process can use to signal the parent. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r ec008dc43727 -r 36871b37a9bd tools/libxl/libxl.c --- a/tools/libxl/libxl.c Wed May 04 14:37:21 2011 +0100 +++ b/tools/libxl/libxl.c Wed May 04 14:41:55 2011 +0100 @@ -522,7 +522,7 @@ int libxl_domain_unpause(libxl_ctx *ctx, state = libxl__xs_read(&gc, XBT_NULL, path); if (state != NULL && !strcmp(state, "paused")) { libxl__xs_write(&gc, XBT_NULL, libxl__sprintf(&gc, "/local/domain/0/device-model/%d/command", domid), "continue"); - libxl__wait_for_device_model(&gc, domid, "running", NULL, NULL); + libxl__wait_for_device_model(&gc, domid, "running", NULL, NULL, NULL); } } ret = xc_domain_unpause(ctx->xch, domid); diff -r ec008dc43727 -r 36871b37a9bd tools/libxl/libxl_device.c --- a/tools/libxl/libxl_device.c Wed May 04 14:37:21 2011 +0100 +++ b/tools/libxl/libxl_device.c Wed May 04 14:41:55 2011 +0100 @@ -410,6 +410,7 @@ out: int libxl__wait_for_device_model(libxl__gc *gc, uint32_t domid, char *state, + libxl__device_model_starting *starting, int (*check_callback)(libxl__gc *gc, uint32_t domid, const char *state, @@ -439,7 +440,17 @@ int libxl__wait_for_device_model(libxl__ tv.tv_sec = LIBXL_DEVICE_MODEL_START_TIMEOUT; tv.tv_usec = 0; nfds = xs_fileno(xsh) + 1; + if (starting && starting->for_spawn->fd > xs_fileno(xsh)) + nfds = starting->for_spawn->fd + 1; + while (rc > 0 || (!rc && tv.tv_sec > 0)) { + if ( starting ) { + rc = libxl__spawn_check(gc, starting->for_spawn); + if ( rc ) { + rc = -1; + goto err_died; + } + } p = xs_read(xsh, XBT_NULL, path, &len); if ( NULL == p ) goto again; @@ -461,15 +472,24 @@ again: free(p); FD_ZERO(&rfds); FD_SET(xs_fileno(xsh), &rfds); + if (starting) + FD_SET(starting->for_spawn->fd, &rfds); rc = select(nfds, &rfds, NULL, NULL, &tv); if (rc > 0) { - l = xs_read_watch(xsh, &num); - if (l != NULL) - free(l); - else - goto again; + if (FD_ISSET(xs_fileno(xsh), &rfds)) { + l = xs_read_watch(xsh, &num); + if (l != NULL) + free(l); + else + goto again; + } + if (starting && FD_ISSET(starting->for_spawn->fd, &rfds)) { + unsigned char dummy; + read(starting->for_spawn->fd, &dummy, sizeof(dummy)); + } } } +err_died: xs_unwatch(xsh, path, path); xs_daemon_close(xsh); LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready"); diff -r ec008dc43727 -r 36871b37a9bd tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Wed May 04 14:37:21 2011 +0100 +++ b/tools/libxl/libxl_dm.c Wed May 04 14:41:55 2011 +0100 @@ -855,14 +855,12 @@ static int detach_device_model(libxl__gc return rc; } - int libxl__confirm_device_model_startup(libxl__gc *gc, libxl__device_model_starting *starting) { - int problem = libxl__wait_for_device_model(gc, starting->domid, "running", NULL, NULL); int detach; - if ( !problem ) - problem = libxl__spawn_check(gc, starting->for_spawn); + int problem = libxl__wait_for_device_model(gc, starting->domid, "running", + starting, NULL, NULL); detach = detach_device_model(gc, starting); return problem ? problem : detach; } diff -r ec008dc43727 -r 36871b37a9bd tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Wed May 04 14:37:21 2011 +0100 +++ b/tools/libxl/libxl_dom.c Wed May 04 14:41:55 2011 +0100 @@ -543,7 +543,7 @@ int libxl__domain_save_device_model(libx LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Saving device model state to %s", filename); libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "/local/domain/0/device-model/%d/command", domid), "save"); - libxl__wait_for_device_model(gc, domid, "paused", NULL, NULL); + libxl__wait_for_device_model(gc, domid, "paused", NULL, NULL, NULL); if (stat(filename, &st) < 0) { diff -r ec008dc43727 -r 36871b37a9bd tools/libxl/libxl_exec.c --- a/tools/libxl/libxl_exec.c Wed May 04 14:37:21 2011 +0100 +++ b/tools/libxl/libxl_exec.c Wed May 04 14:41:55 2011 +0100 @@ -26,6 +26,7 @@ #include <sys/types.h> #include <sys/wait.h> #include <signal.h> /* for SIGKILL */ +#include <fcntl.h> #include "libxl.h" #include "libxl_internal.h" @@ -91,6 +92,22 @@ void libxl_report_child_exitstatus(libxl } } +static int libxl__set_fd_flag(libxl__gc *gc, int fd, int flag) +{ + int flags; + + flags = fcntl(fd, F_GETFL); + if (flags == -1) + return ERROR_FAIL; + + flags |= flag; + + if (fcntl(fd, F_SETFL, flags) == -1) + return ERROR_FAIL; + + return 0; +} + int libxl__spawn_spawn(libxl__gc *gc, libxl__spawn_starting *for_spawn, const char *what, @@ -100,22 +117,33 @@ int libxl__spawn_spawn(libxl__gc *gc, { libxl_ctx *ctx = libxl__gc_owner(gc); pid_t child, got; - int status; + int status, rc; pid_t intermediate; + int pipes[2]; + unsigned char dummy = 0; if (for_spawn) { for_spawn->what = strdup(what); if (!for_spawn->what) return ERROR_NOMEM; + + if (libxl_pipe(ctx, pipes) < 0) + goto err_parent; + if (libxl__set_fd_flag(gc, pipes[0], O_NONBLOCK) < 0 || + libxl__set_fd_flag(gc, pipes[1], O_NONBLOCK) < 0) + goto err_parent_pipes; } intermediate = libxl_fork(ctx); - if (intermediate ==-1) { - if (for_spawn) free(for_spawn->what); - return ERROR_FAIL; - } + if (intermediate ==-1) + goto err_parent_pipes; + if (intermediate) { /* parent */ - if (for_spawn) for_spawn->intermediate = intermediate; + if (for_spawn) { + for_spawn->intermediate = intermediate; + for_spawn->fd = pipes[0]; + close(pipes[1]); + } return 1; } @@ -124,8 +152,10 @@ int libxl__spawn_spawn(libxl__gc *gc, child = fork(); if (child == -1) exit(255); - if (!child) + if (!child) { + if (for_spawn) close(pipes[1]); return 0; /* caller runs child code */ + } intermediate_hook(hook_data, child); @@ -134,9 +164,23 @@ int libxl__spawn_spawn(libxl__gc *gc, got = call_waitpid(ctx->waitpid_instead, child, &status, 0); assert(got == child); - _exit(WIFEXITED(status) ? WEXITSTATUS(status) : + rc = (WIFEXITED(status) ? WEXITSTATUS(status) : WIFSIGNALED(status) && WTERMSIG(status) < 127 ? WTERMSIG(status)+128 : -1); + if (for_spawn) + write(pipes[1], &dummy, sizeof(dummy)); + _exit(rc); + + err_parent_pipes: + if (for_spawn) { + close(pipes[0]); + close(pipes[1]); + } + + err_parent: + if (for_spawn) free(for_spawn->what); + + return ERROR_FAIL; } static void report_spawn_intermediate_status(libxl__gc *gc, diff -r ec008dc43727 -r 36871b37a9bd tools/libxl/libxl_internal.h --- a/tools/libxl/libxl_internal.h Wed May 04 14:37:21 2011 +0100 +++ b/tools/libxl/libxl_internal.h Wed May 04 14:41:55 2011 +0100 @@ -233,6 +233,7 @@ typedef struct { /* put this in your own status structure as returned to application */ /* all fields are private to libxl_spawn_... */ pid_t intermediate; + int fd; char *what; /* malloc''d in spawn_spawn */ } libxl__spawn_starting; @@ -270,6 +271,7 @@ _hidden int libxl__confirm_device_model_ _hidden int libxl__detach_device_model(libxl__gc *gc, libxl__device_model_starting *starting); _hidden int libxl__wait_for_device_model(libxl__gc *gc, uint32_t domid, char *state, + libxl__device_model_starting *starting, int (*check_callback)(libxl__gc *gc, uint32_t domid, const char *state, diff -r ec008dc43727 -r 36871b37a9bd tools/libxl/libxl_pci.c --- a/tools/libxl/libxl_pci.c Wed May 04 14:37:21 2011 +0100 +++ b/tools/libxl/libxl_pci.c Wed May 04 14:41:55 2011 +0100 @@ -612,7 +612,8 @@ static int do_pci_add(libxl__gc *gc, uin hvm = libxl__domain_is_hvm(gc, domid); if (hvm) { - if (libxl__wait_for_device_model(gc, domid, "running", NULL, NULL) < 0) { + if (libxl__wait_for_device_model(gc, domid, "running", + NULL, NULL, NULL) < 0) { return ERROR_FAIL; } path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/state", domid); @@ -626,7 +627,8 @@ static int do_pci_add(libxl__gc *gc, uin pcidev->bus, pcidev->dev, pcidev->func); path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/command", domid); xs_write(ctx->xsh, XBT_NULL, path, "pci-ins", strlen("pci-ins")); - rc = libxl__wait_for_device_model(gc, domid, NULL, pci_ins_check, state); + rc = libxl__wait_for_device_model(gc, domid, NULL, NULL, + pci_ins_check, state); path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/parameter", domid); vdevfn = libxl__xs_read(gc, XBT_NULL, path); path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/state", domid); @@ -843,7 +845,8 @@ static int do_pci_remove(libxl__gc *gc, hvm = libxl__domain_is_hvm(gc, domid); if (hvm) { - if (libxl__wait_for_device_model(gc, domid, "running", NULL, NULL) < 0) { + if (libxl__wait_for_device_model(gc, domid, "running", + NULL, NULL, NULL) < 0) { return ERROR_FAIL; } path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/state", domid); @@ -857,7 +860,8 @@ static int do_pci_remove(libxl__gc *gc, * device-model for function 0 */ if ( !force && (pcidev->vdevfn & 0x7) == 0 ) { xs_write(ctx->xsh, XBT_NULL, path, "pci-rem", strlen("pci-rem")); - if (libxl__wait_for_device_model(gc, domid, "pci-removed", NULL, NULL) < 0) { + if (libxl__wait_for_device_model(gc, domid, "pci-removed", + NULL, NULL, NULL) < 0) { LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model didn''t respond in time"); /* This depends on guest operating system acknowledging the * SCI, if it doesn''t respond in time then we may wish to _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-04 16:23 UTC
Re: [Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_for_device_model
On Wed, 2011-05-04 at 15:51 +0100, Ian Campbell wrote:> # HG changeset patch > # User Ian Campbell <ian.campbell@citrix.com> > # Date 1304516515 -3600 > # Node ID 36871b37a9bd286d6ef291b41513c33325db9719 > # Parent ec008dc43727191f472cd4bd5e59d9d35d9d36c2 > libxl: add statup checks to libxl__wait_for_device_model > > When the device model is starting up push checks for spawn failure down into > libxl__wait_for_device_model, allowing us to fail more quickly when the device > model fails to start (e.g. due to a missing library or an early setup error > etc). > > In order to allow the select loop in libxl__wait_for_device_model to wake when > the child dies add pipe between the parent and the intermediate process which > the intermediate process can use to signal the parent. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>I accidentally removed the close of the read side of the pipes from the intermediate process while refactoring. So this incremental fix is needed: --- a/tools/libxl/libxl_exec.c Wed May 04 17:03:14 2011 +0100 +++ b/tools/libxl/libxl_exec.c Wed May 04 17:22:05 2011 +0100 @@ -144,6 +144,7 @@ int libxl__spawn_spawn(libxl__gc *gc, } /* we are now the intermediate process */ + if (for_spawn) close(pipes[0]); child = fork(); if (child == -1) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-May-19 16:04 UTC
Re: [Xen-devel] [PATCH 0 of 4] libxl: improve error handling when device model fails to start early on
Ian Campbell writes ("[Xen-devel] [PATCH 0 of 4] libxl: improve error handling when device model fails to start early on"):> Currently when the device model fails to start there is a delay until > we timeout and report error, some users have misinterpretted this > delay as a hang.This is disappointing. I fixed exactly this problem about 6 months ago.> Secondly we can propagate child failures to the parent much quicker by > adding a pipe between the intermediate process (which blocks in > waitpid() on the child until libxl__spawn_detach is called or the > child exits) to allow failure to be reported immediately and with a > slightly more specific error message.And this is what I thought I''d done. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-20 07:08 UTC
Re: [Xen-devel] [PATCH 0 of 4] libxl: improve error handling when device model fails to start early on
On Thu, 2011-05-19 at 17:04 +0100, Ian Jackson wrote:> Ian Campbell writes ("[Xen-devel] [PATCH 0 of 4] libxl: improve error handling when device model fails to start early on"): > > Currently when the device model fails to start there is a delay until > > we timeout and report error, some users have misinterpretted this > > delay as a hang. > > This is disappointing. I fixed exactly this problem about 6 months > ago.Hmm, now you mention it that does sound familiar. And indeed: changeset: 20468:2f7cb671ef38 user: Keir Fraser <keir.fraser@citrix.com> date: Mon Nov 23 07:01:51 2009 +0000 description: libxenlight: check for early failures of qemu-dm This patch makes xl create check whether qemu-dm has started correctly, and causes it to fail immediately with appropriate errors if not. There are other bugfixes too. [...] Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> So more like 18 months ago? (or I found another different attempt ;-))> > Secondly we can propagate child failures to the parent much quicker by > > adding a pipe between the intermediate process (which blocks in > > waitpid() on the child until libxl__spawn_detach is called or the > > child exits) to allow failure to be reported immediately and with a > > slightly more specific error message. > > And this is what I thought I''d done.Either way, it appears to be broken now. You can confirm by removing one of the libraries that qemu-dm needs, or by chmod -x. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-May-24 14:59 UTC
Re: [Xen-devel] [PATCH 1 of 4] libxl: check that device model binary is executable
Ian Campbell writes ("[Xen-devel] [PATCH 1 of 4] libxl: check that device model binary is executable"):> libxl: check that device model binary is executable.Thanks, acked and applied all four. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-May-24 15:57 UTC
Re: [Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_for_device_model
Ian Campbell writes ("Re: [Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_for_device_model"):> I accidentally removed the close of the read side of the pipes from the > intermediate process while refactoring. So this incremental fix is > needed:This hunk was in your O_CLOEXEC patch so is now in the tree, although not part of the changeset for libxl startup checks. Ian.> --- a/tools/libxl/libxl_exec.c Wed May 04 17:03:14 2011 +0100 > +++ b/tools/libxl/libxl_exec.c Wed May 04 17:22:05 2011 +0100 > @@ -144,6 +144,7 @@ int libxl__spawn_spawn(libxl__gc *gc, > } > > /* we are now the intermediate process */ > + if (for_spawn) close(pipes[0]); > > child = fork(); > if (child == -1)_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-24 16:08 UTC
Re: [Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_for_device_model
On Tue, 2011-05-24 at 16:57 +0100, Ian Jackson wrote:> Ian Campbell writes ("Re: [Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_for_device_model"): > > I accidentally removed the close of the read side of the pipes from the > > intermediate process while refactoring. So this incremental fix is > > needed: > > This hunk was in your O_CLOEXEC patch so is now in the tree, although > not part of the changeset for libxl startup checks.Either way is fine with me. Thanks, Ian.> > Ian. > > > --- a/tools/libxl/libxl_exec.c Wed May 04 17:03:14 2011 +0100 > > +++ b/tools/libxl/libxl_exec.c Wed May 04 17:22:05 2011 +0100 > > @@ -144,6 +144,7 @@ int libxl__spawn_spawn(libxl__gc *gc, > > } > > > > /* we are now the intermediate process */ > > + if (for_spawn) close(pipes[0]); > > > > child = fork(); > > if (child == -1)_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel