On Mon, Mar 01, 2010 at 11:24:07AM -0500, Bill Nottingham wrote:
Dan Kenigsberg (danken(a)redhat.com) said:
> When logging into a remote machine to play with its network
> configurations there the fear of locking yourself out always lurks.
> If this happens, you can walk to the remote machine and fix it, but it
> would be easier to reboot the machine, and have it rolled back to a
> known-good network configuration when it starts up.
>
> With this patch, you can use snapshot_config() to copy the current
> network configuration before changing it. The network service will use
> rollback_config() when the machine is rebooted. Use commit_config() when
> the current configuration is known to be good.
>
> Comments are welcome. Specifically, what should we copy but ifcfg-* and
> rule-* ?
You'd want route-* and keys-* as well, at a minimum.
Thanks, I will add them. If anyone recalls anything else, pls let me know.
What consumers do you see of 'snapshot_config()'? I'd wonder whether
this shouldn't be part of whatever other configuration management
the admin uses, rather than its own special thing.
I had libvirt in mind - I already do something like that in vdsm
internally. But this patch should be useful to the casual administrator,
wanting to add a network interface while ssh'ing from home. Using power
fencing or asking someone to press the reset button is so much easier
than driving to site to access the local console...
Having rollback_config() in the initscripts level also has the benefit
of not starting broken network first, waiting till higher configuration
management (that usu relies on networking) starts, and trying to fix the
problem later.
Regards,
Dan.