All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Re: [PATCH] libxl: check for early failures of qemu-dm (v2)
Date: Mon, 16 Nov 2009 14:52:56 +0000	[thread overview]
Message-ID: <4B016748.8050904@eu.citrix.com> (raw)
In-Reply-To: <19201.16668.970391.316245@mariner.uk.xensource.com>

Ian Jackson wrote:
> 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.
>
> More specifically:
>
>  * libxl_create_device_model forks twice rather than once so that the
>    process which calls libxl does not end up being the actual parent
>    of qemu.  That avoids the need for the qemu-dm process to be reaped
>    at some indefinite time in the future.
>
>  * The first fork generates an intermediate process which is
>    responsible for writing the qemu-dm pid to xenstore and then merely
>    waits to collect and report on qemu-dm's exit status during
>    startup.  New arguments to libxl_create_device_model allow the
>    preservation of its pid so that a later call can check whether the
>    startup is successful.
>   
Did you have the qemu-dm ready patch in qemu ?
>  * xl.c's create_domain checks for errors in its libxl calls.
>
> Consequential changes:
>
>  * libxl_wait_for_device_model now takes a callback function parameter
>    which is called repeatedly in the loop iteration and allows the
>    caller to abort the wait.
>
>  * libxl_exec no longer calls fork; there is a new libxl_fork.
>   
this is not libxl goal to provide wrapper for syscalls.
the exec should do the double fork+exec itself, no need to have a fork 
function.
>  * osdep.[ch] new use #define _GNU_SOURCE.  The provided asprintf
>    declarations are suppressed when not needed (currently, always).
>
>  * There is a hook to override waitpid, which will be necessary for
>    some callers.
>   
why ?

> Remaining problems and other issues I noticed or we found:
>
>  * The error handling is rather inconsistent still and lacking in
>    places.
>   
>  * xl_logv is declared but not defined.
>  * _GNU_SOURCE should be used throughout.  The asprintf implementation
>    should be disabled in favour of the system one.
>   
osdeps was just suppose to be available for netbsd. not sure why the 
contrary happens on christoph's patch.

>  * XL_LOG_ERROR_ERRNO needs to actually print the errno value.
>   
there shouldn't be a LOG_ERROR_ERRNO value. what you want is the 
different log function
that will embedd an errno automatically in the fmt, not a different 
logging level. not sure what you meant later by "remove new error level, 
should be in future patch".

>  * destroy_device_model can kill random dom0 processes (!)
>   
>  * struct libxl_ctx should be defined in libxl_internal.h.
>   
no, otherwise the init ctx need to allocate itself the memory of the 
context, instead of having
the caller "allocate it" itself on the fct stack.
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
>
> (Changes since v1:
>  * Remove new error log level; should be in a future patch
>  * Properly fixed the asprintf problem
>  * Indentation no uses literal tabs

-- 
Vincent

  reply	other threads:[~2009-11-16 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 12:10 [PATCH] libxl: check for early failures of qemu-dm (v2) Ian Jackson
2009-11-16 14:52 ` Vincent Hanquez [this message]
2009-11-16 15:13   ` Ian Jackson
2009-11-16 15:59     ` Vincent Hanquez

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=4B016748.8050904@eu.citrix.com \
    --to=vincent.hanquez@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.