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

Re: [Xen-users] DomU suspension/hibernation


On Tue, Jun 18, 2013 at 7:29 PM, Ian Murray <murrayie@xxxxxxxxxxx> wrote:


Glad you can make tomorrow. I can't alas. I believe the reason why xendomains is failing for sxp format is because under 4.2.2 it appears that  xl list -l is returning domid of -1 for all domU's for some bizarre reason. I have a 4.1.x system and that is working correctly so that would appear as a regression.

In terms of it running under JSON, I just think the regex needs a bit of a tweak, although it's not happening (the tweak!) for me right now. It looks to me like it's not properly picking up the { which is equivalent to the (domain part in sxp format. So I think it's not clearing the name and id at the start of the domain data, so you briefly end up with previous domain name and the current domID combination which causes the foul-up.

If it is just a regex tweak and there was to be another RC for 4.3 it would be nice to get this in. Xendomains seems to have been broken for so long now at least for xl, it would have been nice to have it working in a release and that's were I thought we were, alas.

A re-write would also be nice but tbh the only metadata it seems to need is name and id (and probably actually only needs id). Being dependant on formats of other commands isn't great though, IMHO.


Ian M.

Thanks for the information. I decided to have another look over xendomains on xen-4.2.2 this evening, as I decided I wanted it to work. There were a few interesting things broken in there - for example, I can't see how the zombie testing code would work as neither formats of "xl list -l" give the state (and I couldn't see how it would be trying to get that, even if it were)

I managed to patch it so it was working for me. I rewrote most of the functions which had been using "xl list -l" to use "xenstore-list /local/domain" instead (which pulls a list of all the domain ids) and then replaced the call to parseln with a shell call to "xenstore-read /local/domain/$id/name". The one instance I didn't change that in was the all_zombies function, which I just returned 0 since it would never be working right now anyway. I've attached a patch in case anyone else wants to see what I did, or make use of it. The other part of it, that i'm not completely happy with, is the assumption that xm == sxp and xl == json. I'm tempted to rewrite that part so that I capture the results to a variable, test for the presence of '"name":' then parse the variable through either sed (if sxp) or perl (if json - perl is being used as sed didn't appear to have good support for the non-greedy regex modifier).



Attachment: xendomains.patch
Description: Binary data

Xen-users mailing list



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