[libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

Eric Blake eblake at redhat.com
Fri Jul 15 14:29:27 UTC 2011

On 07/15/2011 07:58 AM, Michal Privoznik wrote:
> Right now it is possible to undefine an active interface, or
> destroy inactive. This patch add some checking to these operations
> to prevent this. Also fix test driver.

I'm inclined to NACK this on design principles (I haven't read the patch
itself, though).  Given the discussion about domains and undefine, the
ability to undefine an active interface is a feature, provided we
support the concept of a transient interface like we do for transient

That is, we have the following transitions:

nothing -> transient/running via Create
nothing -> persistent/inactive via Define

persistent/inactive -> persistent/active via Start
persistent/inactive -> gone via Undefine

persistent/running -> persistent/inactive via Destroy
persistent/running -> transient/running via Undefine

transient/running -> gone via Destroy
transient/running -> persistent/running via Define

and rejecting Undefine on a running interface would prevent the ability
to transistion a persistent over to a transient interface.

On the other hand, if we don't support transient interfaces, then the
above analysis which works for domains would have to be adjusted for
interfaces, so you may have something to patch after all.

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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

More information about the libvir-list mailing list