[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] DomU suspension/hibernation

  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Ian Murray <murrayie@xxxxxxxxxxx>
  • Date: Wed, 19 Jun 2013 14:39:22 +0100 (BST)
  • Cc: "xen-users@xxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxx>, David Sutton <kantras@xxxxxxxxx>, Joshua Tuttle <jtuttle@xxxxxxxxx>
  • Delivery-date: Wed, 19 Jun 2013 13:40:16 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XRVfiINfFECd7G1QPbSP6DThpuyZyTri0QqDO7LPJU5JR4svoma7wcUZ7AL+70nLwKKbRecmUOtzFnQ+rlqHN/4Yc3/vOo3zLmwCODbo+spbCzAkzGlgMRmgESKtJPnFOWoXyU82ctDOtQ2mTwT4mftwZQT+TEkx8WpEZPdamvM=;
  • List-id: Xen user discussion <xen-users.lists.xen.org>

----- Original Message -----
> From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> To: Ian Murray <murrayie@xxxxxxxxxxx>
> Cc: David Sutton <kantras@xxxxxxxxx>; "xen-users@xxxxxxxxxxxxx" 
> <xen-users@xxxxxxxxxxxxx>; Joshua Tuttle <jtuttle@xxxxxxxxx>
> Sent: Wednesday, 19 June 2013, 14:16
> Subject: Re: [Xen-users] DomU suspension/hibernation
> On Wed, 2013-06-19 at 13:57 +0100, Ian Murray wrote:
>>  I think I have this sorted now. The JSON "{" that is used to 
> signify
>>  the start of domain data is preceeded with 4 spaces in the xl list -l
>>  output. Add those four spaces into the regex (needs to be exact
>>  otherwise there will be more unwanted matches, I think) and put quotes
>>  around the variable in the grep statement(s) and it works for me... so
>>  a 5 line patch or so.
> Thanks, that sounds "good" (as in the best we can do within the 
> confines
> of parsing JSON In shell...)
> I don't think this commit went into 4.2:
>         commit ac963eb7895b8351017bb6005505c2b176202f0e
>         Author: Ian Campbell <ian.campbell@xxxxxxxxxx>
>         Date:   Thu Aug 23 19:12:28 2012 +0100
>             xl: make "xl list -l" proper JSON
>             Bastian Blank reports that the output of this command is just 
> multiple
>             JSON objects concatenated and is not a single properly formed JSON
>             object.
>             Fix this by wrapping in an array. This turned out to be a bit more
>             intrusive than I was expecting due to the requirement to keep
>             supporting the SXP output mode.
>             Python's json module is happy to parse the result...
>             Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>             Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> but it is in 4.3, I can't remember if it added any extra indentation or
> whatever but could you try it?

Okay, I can imagine that might make a difference, so needs to be done. Will add 
some delay as I had trouble with mixed versions when I tried to go to 4.3RC4 on 
Sunday and I am not there again til Friday. Might try again anyway as I have a 
KVM-over-IP attached to it, but y'know...

>>  I will do more testing tonight and get a patch together if you are
>>  comfortable with the above in principle.
>>  There is still an issue with xl list -l giving bogus domid's when
>>  using sxp format, but that's for another day. Maybe that is fixed in
>>  4.3 already.
> This is an odd one, this sort of thing is sometimes down to a tools vs.
> hypervisor mismatch but if other stuff is working (like
> starting/stopping/suspending domains) then that doesn't seem very
> likely.

This is happening on both my main Xen machines and they have both been upgraded 
from previous versions. One of them is quite new, so possibly only 4.2.1 

This is also happening to the original poster as he is getting the "invalid 
option 1" error which is xendomains trying to execute xl save -1 /file/name 

> Looking at the diff from 4.2 to 4.3 this line in 4.2 looks very
> suspicious:
>         if (default_output_format == OUTPUT_FORMAT_JSON)
>             s = printf_info_one_json(hand, info[i].domid, &d_config);
>         else
>             printf_info_sexp(domid, &d_config);
> (note domid in one case, info[i].domid in the other). This ties in
> slightly with this fix, which I think is post 4.2, in terms of the
> confusion arising from using the global domid (which is likely
> not-initialised in this context):
>         commit a73a7a0c647a9a5e30d8bc473c0a1e8648817183
>         Author: Ian Campbell <ian.campbell@xxxxxxxxxx>
>         Date:   Mon Sep 17 11:17:02 2012 +0100
>             xl: Remove global domid and enable -Wshadow
>             Lots of functions loop over a list of domain and others take a 
> domid 
> as
>             a parameter, shadowing the global one and leading to all sorts of
>             confusion.
>             Therefore remove the global domid and explicitly pass it around as
>             necessary.
>             Adds a domid to the parameters for many functions and switches 
> many
>             others from taking a char * domain specifier to taking a domid, 
> pushing
>             the domid lookup to the toplevel.
>             Replaces some open-coded domain_qualifier_to_domid error checking 
> with
>             find_domain.
>             Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>             Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
>             [ ijc -- annotate find_domain() with warn_unused_result and fix 
> the
>                      handful of errors. ]
>             Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> I don't think we want to backport that whole thing but the hunk:
>         @@ -2808,7 +2805,7 @@ static void list_domains_details(const 
> libxl_dominfo *inf
>                  if (default_output_format == OUTPUT_FORMAT_JSON)
>                      s = printf_info_one_json(hand, info[i].domid, 
> &d_config);
>                  else
>         -            printf_info_sexp(domid, &d_config);
>         +            printf_info_sexp(info[i].domid, &d_config);
>                  libxl_domain_config_dispose(&d_config);
>                  free(data);
>                  free(config_source);
> Looks like a good candidate. Can you give it a go?
> Ian.

Okay, will do.

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.