On Thu, May 19, 2011 at 05:14:54PM -0500, Christian Benvenuti (benve) wrote:
I have one generic question.
I know it is not a new problem, and it is not necessarily something
worth investing time and code on, but what if the admin
(directly or indirectly by activating some features)
changes the interface configuration in between a BEGIN and
a ROLLBACK with commands that do not go through virsh/libvirtd?
Would ROLLBACK rollback those changes too?
IMHO that would result in 'undefined behaviour'. It may or may
not get rolled back. libvirt can only guarantee that changes
made via its APIs are rolled back, for the very simple reason
that there may be functional changes the admin makes which
libvirt has absolutely no understanding or knowledge of, and
thus would not be aware of the neeed to roll back.
Does it make sense for libvirtd to subscribe to the relevant
Netlink multicast groups to listen for such changes and flag
an interface as "tainted" in such case? This way it may
be able to generate a log or ask for a sort of extra "--force"
parameter for the ROLLBACK case.
There are two scenarios here
a. Functionality that libvirt already understands. We could
potentially roll it back
b. Functionality that libvirt does not understand. libvirt
can't roll it back, since it is likely not even aware
that it exists.
c. Functionality that libvirt partially understands. Due to
option 'a' we would try to rollback the bits we understand
but not do anything with the bits we don't understand. The
result being a broken mess.
Primarily due to 'c', I think trying to rollback changes made
outside the scope of the APIs, would be giving a somewhat
false sense of security/usability & quite possibly even create
worse problems for the users.
Thus I think the rollback behaviour should be left 'undefined'
if the admin changes stuff outside libvirt.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|