xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Carsten Schiers <carsten@schiers.de>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: AW: Possible Compatibility Bug in xl create
Date: Tue, 24 May 2011 11:40:11 +0200	[thread overview]
Message-ID: <14318469.41306230011057.JavaMail.root@uhura> (raw)
In-Reply-To: <1306229277.20576.113.camel@zakaz.uk.xensource.com>

I'll check that tonight. Yep, I think modifying xendomains would be the
better way. Sorry that I overlooked your other day's question. 

BR,
Carsten.

----- Originalnachricht -----
Von: Ian Campbell <Ian.Campbell@citrix.com>
Gesendet: Die, 24.5.2011 11:27
An: Carsten Schiers <carsten@schiers.de>
Cc: xen-devel <xen-devel@lists.xensource.com> ; Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Betreff: Re: [Xen-devel] Possible Compatibility Bug in xl create

On Mon, 2011-05-23 at 21:01 +0100, Carsten Schiers wrote:
> Dear all,
> 
> there is a problem with xl that will still prevent it tob e a 
> replacement for xm in /etc/init.d/xendomains.
> 
> I tracked it down to the rdname function in the a.m. file, which is 
> expecting the command
> 
>   xm create --dryrun --quiet <config-file>
> 
> to create a Lisp-like structure, where the xendomain script will extract 
> the DomU name from.
> 
>   xl create --dryrun --quiet <config-file>
> 
> will not output such a structure. 
> 
>   xl -d -f <config-file> 
> 
> will do, but as soon as combined with -n, it will not.
> 
> My setting is starting/shutting down only DomUs mentioned in 
> /etc/xen/auto.

Thanks, I was just asking the other day who/what used that sxp output...

Personally think this behaviour of grepping the name out of the sxp is
pretty mad (I think an xl command to parse the configuration and output
a specific request field value would be far better) but in the interests
of xm compatibility does the following work for you?

8<--------------------------------------

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1306229164 -3600
# Node ID 29bd959c779a629def4de2cda7c1cc2eae291df5
# Parent  32d62506e3be95124097775dc79c42304a18084c
xl: print sxp on dry-run of create.

The help text for xm create's --dry-run says "Dry run - prints the resulting
configuration in SXP but does not create the domain." so update xl
implementation to match.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 32d62506e3be -r 29bd959c779a tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c    Tue May 24 10:14:10 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c    Tue May 24 10:26:04 2011 +0100
@@ -1470,10 +1470,6 @@ static int create_domain(struct domain_c
 
     parse_config_data(config_file, config_data, config_len, &d_config, &d_config.dm_info);
 
-    ret = 0;
-    if (dom_info->dryrun)
-        goto out;
-
     if (migrate_fd >= 0) {
         if (d_config.c_info.name) {
             /* when we receive a domain we get its name from the config
@@ -1492,9 +1488,13 @@ static int create_domain(struct domain_c
         }
     }
 
-    if (debug)
+    if (debug || dom_info->dryrun)
         printf_info(-1, &d_config, &d_config.dm_info);
 
+    ret = 0;
+    if (dom_info->dryrun)
+        goto out;
+
 start:
     domid = -1;

  reply	other threads:[~2011-05-24  9:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 21:27 RHEL6 xen and dom0 kernel to test M A Young
2011-05-23 19:16 ` [Xen-devel] " Pasi Kärkkäinen
2011-05-23 20:01   ` Possible Compatibility Bug in xl create Carsten Schiers
2011-05-24  9:27     ` Ian Campbell
2011-05-24  9:40       ` Carsten Schiers [this message]
2011-05-24  9:43         ` AW: " Ian Campbell
2011-05-24 20:19           ` AW: " Carsten Schiers
2011-05-25 18:47             ` Carsten Schiers
2011-05-25 19:07               ` Carsten Schiers
2011-05-25 20:36                 ` Carsten Schiers
2011-05-25 20:47                   ` Carsten Schiers
2011-05-26 14:31                     ` Ian Jackson
2011-05-27  8:58                       ` Carsten Schiers
2011-05-26 14:31                 ` Ian Jackson
2011-05-26 18:26       ` [PATCH 1 of 2] xl: improve compatibility with xm Carsten Schiers
2011-05-27  8:41         ` Ian Campbell
2011-06-02 16:29         ` Ian Jackson
2011-06-02 16:45           ` Stefano Stabellini
2011-06-02 16:58             ` Ian Jackson
2011-06-03  6:43             ` AW: " Carsten Schiers
2011-06-03  6:55               ` Ian Campbell
2011-07-14 19:39 ` RHEL6 xen and dom0 kernel to test Pasi Kärkkäinen
2011-07-29 14:01 ` Juergen Gotteswinter
2011-07-31 20:31   ` InterNetX - Juergen Gotteswinter

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=14318469.41306230011057.JavaMail.root@uhura \
    --to=carsten@schiers.de \
    --cc=Ian.Campbell@citrix.com \
    --cc=Stefano.Stabellini@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 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).