All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elliott Mitchell <ehem+xen@m5p.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: xen-devel@lists.xenproject.org, Wei Liu <wl@xen.org>
Subject: Re: [PATCH v2 3/3] tools/xl: Allow specifying JSON for domain configuration file format
Date: Tue, 31 May 2022 18:25:13 -0700	[thread overview]
Message-ID: <Ypa/+X7FQT2WaX12@mattapan.m5p.com> (raw)
In-Reply-To: <Yoeh3nMNW0AfcHr/@perard.uk.xensource.com>

On Fri, May 20, 2022 at 03:12:46PM +0100, Anthony PERARD wrote:
> On Tue, Apr 19, 2022 at 06:23:41PM -0700, Elliott Mitchell wrote:
> > JSON is currently used when saving domains to mass storage.  Being able
> > to use JSON as the normal input to `xl create` has potential to be
> > valuable.  Add the functionality.
> > 
> > Move the memset() earlier so to allow use of the structure sooner.
> > 
> > Signed-off-by: Elliott Mitchell <ehem+xen@m5p.com>
> 
> So, I gave this a try and creating a guest from a json config, and that
> fails very early with "Unknown guest type".
> 
> Have you actually tried to create a guest from config file written in
> json?
> 
> Also, this would need documentation about the new option, about the
> format. The man page need to be edited.
> 
> An example of a config file written in json would be nice as well.

I'll be trying for these at some point, but no timeframe yet.  This was
an idea which occurred to me when looking at things.  I'm wavering on
whether this is the way to go...

Real goal is I would like to generate a replacement for the `xendomains`
init script.  While functional the script is woefully inadaquate for
anything other than the tiniest installation.

Notably there can be ordering constraints for start/shutdown (worse,
those could be distinct).  One might also wish different strategies for
different domains (some get saved to disk on reboot, some might get
shutdown/restarted).


For some of the configuration for this, adding to domain.cfg files makes
sense.  This though ends up with the issue of what should the extra data
look like?

I'm oscillating between adding a section in something libxl's parser
takes as a comment, versus adding a configuration option to domain.cfg
(libxl's parser ignores unknown sections which is not entirely good!).
JSON's structure would be good for an addition, but JSON comes with its
own downsides.

Most likely such a thing would be implemented in Python.  Needs a bit
more math than shell is good for.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445




  reply	other threads:[~2022-06-01  1:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30  2:21 [PATCH v2 0/3] Allow use of JSON in domain configuration files Elliott Mitchell
2022-04-20  1:23 ` [PATCH v2 3/3] tools/xl: Allow specifying JSON for domain configuration file format Elliott Mitchell
2022-05-20 14:12   ` Anthony PERARD
2022-06-01  1:25     ` Elliott Mitchell [this message]
2022-06-10 14:00       ` Anthony PERARD
2022-04-20  1:56 ` [PATCH v2 1/3] tools/xl: Sort create command options Elliott Mitchell
2022-05-20 10:36   ` Anthony PERARD
2022-04-29 22:45 ` [PATCH v2 2/3] tools/xl: Use sparse init for dom_info, remove duplicate vars Elliott Mitchell
2022-05-20 13:48   ` Anthony PERARD

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=Ypa/+X7FQT2WaX12@mattapan.m5p.com \
    --to=ehem+xen@m5p.com \
    --cc=anthony.perard@citrix.com \
    --cc=wl@xen.org \
    --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 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.