On Tue, Feb 24, 2009 at 11:06:02PM +0000, David Lutterkort wrote:
> On Tue, 2009-02-24 at 18:24 +0200, Dan Kenigsberg wrote:
> > I know I'm arriving very late to this discussion and should have read
> > it all before posting, but...
> >
> > The project I'm working on wanted to be able to setup network
> > configuration without making persistant changes to configuration files.
> > This would allow testing if everything works well, and reboot without
> > fear if things got broken. The greatest fear when configuring network
> > remotely, is being locked out of your host.
> >
> > Do you plan something like this feature in netcf?
>
> No, not for netcf or libvirt. The host interface mgmt uses the
> distribution's native network scripts, which implies that all config
> changes are changes to those scripts.
>
> The fundamental difficulty with providing some sort of rollback
> functionality at the libvirt level is that libvirt has no idea whether
> the new config is working or not, and doesn't know how to test it. So
> any (syntactically valid) configuration of a network interface is as
> good as any other from libvirt's POV.
>
> That means that this type of functionality really belongs in a layer
> above libvirt - the API (will) make it pretty easy though to implement
> that: if you know that the current config for an interface is
> good/working, just do something like
>
> goodConfig = virInterfaceGetXmlDesc(..);
> virInterfaceDefine(newConfig);
> virInterfaceRestart(ifaceName);
The real issue is, that in this stage, management may have lost
connectivity to the node.
> if (! newConfigIsWorking()) {
> virInterfaceDefine(goodConfig);
> virInterfaceRestart(ifaceName);
> }
How about having netcf/libvirt be aware of what is a goodConfig (with
additional API verb), and back it up somewhere? Any change to to network
configuration would have immediate effect, but unless explicitly set as
"good", reverted on next boot.
--
Libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list