Re: [PATCH] SNMP: include inactive domains in guest table

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

 



On 05/30/2012 04:04 PM, Jonathan Daugherty wrote:
> Hi,
> 
> I've written a patch to include inactive domains in the guest table
> available via the libvirt-snmp subagent.  This makes it possible to
> start domains via SNMP (a state transition which AFAICT was previously
> impossible, because inactive domains never appeared in the SNMP
> result).

Sounds like a worthwhile change at the high level.

> 
> The code now collects the IDs of running domains along with the names
> of declared (but not running) domains and normalizes them into a list
> of domain pointers, which is then processed by the preexisting SNMP
> container row allocation code.  The change was fairly straightforward,
> but certainly there might be Good Reasons it wasn't already
> implemented.

Even better would be to require libvirt 0.9.13 and use the proposed
virConnectListAllDomains() API to get all domains in one shot, as the
approach you have used is inherently racy due to the flaws in the older
APIs (which reminds me, Peter is still working on posting a v2 of that
series).

>   - This will be a breaking change for anyone who assumes that the old
>     behavior is still in place (i.e., that the guest table only
>     includes non-shutdown domains).  However, it might not be *that*
>     bad because the domain rows already included a 'state' that one
>     could already filter on.

I'm not familiar enough with libvirt-snmp to say whether this is
important, or to even know how the current bindings work.  Is this
something where you might be better served by instead adding new
libvirt-snmp bindings to the existing virConnectListDefinedDomains and
upcoming virConnectListAllDomains, instead of changing the behavior of
the existing query method which is currently bound to virConnectListDomains?

> Please let me know if there is anything further I need to do to make
> the patch acceptable.

I'll have to defer that to people more familiar with libvirt-snmp.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]