[libvirt] [PATCH 13/14] Add suspend info to Xen, LXC and UML hypervisor capabilities

Eric Blake eblake at redhat.com
Tue Nov 29 17:59:18 UTC 2011


On 11/29/2011 10:50 AM, Daniel P. Berrange wrote:
> On Tue, Nov 29, 2011 at 09:56:43AM -0700, Eric Blake wrote:
>> On 11/29/2011 08:44 AM, Daniel P. Berrange wrote:
>>> From: "Daniel P. Berrange" <berrange at redhat.com>
>>>
>>> * src/lxc/lxc_conf.c, src/uml/uml_conf.c,
>>>   src/xen/xen_hypervisor.c: Initialize suspend capabilities
>>> * tests/xencapsdata/*xml: Add empty powermgmt capabilities
>>
>> Do we need to fake anything in the tests directory to ensure that the
>> tests never probe the system, but always treat things as no power
>> management available?  I'm worried that running the testsuite as root on
>> a Dom0 host might cause spurious test failures, although I have not yet
>> tested that.  I guess we can deal with the fallout later if it turns out
>> to be a problem in practice.
> 
> Yes, I already made that mistake, and this patch ensures it does not
> get run during test suites :-)
> 
>>> @@ -71,6 +73,9 @@ virCapsPtr lxcCapsInit(void)
>>>          VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
>>>      }
>>>  
>>> +    if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
>>> +        VIR_WARN("Failed to get host power management capabilities");
>>> +
>>
>> For qemu, you skipped the warning for qemu:///session (ie. geteuid() was
>> non-zero).  Should we do the same for lxc and uml, or are these
>> hypervisors only ever useful as root?
> 
> Actually it doesn't fail for non-root - the commands for querying
> supported PM features are fine to run as non-root.

All right, then you've answered my questions, so for the record:

ACK.

I think that completes the series review, with only a few nits to fix
before you push.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111129/189796a9/attachment-0001.sig>


More information about the libvir-list mailing list