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

Re: [libvirt] RFC: configuring host interfaces with libvirt



On Fri, Jan 16, 2009 at 09:00:16AM +0000, Mark McLoughlin wrote:
> Hi David,
> 
> On Fri, 2009-01-16 at 01:13 +0000, David Lutterkort wrote:
> > 3. Implementation
> > =================
> > 
> > Configuring network interfaces is highly OS and OS-variant/distro
> > dependant. There are at least two different ways how libvirt can go about
> > modifying the host to create interfaces:
> > 
> >   1. Modify the system's network setup scripts (ifcfg-XXX on RH)
> > 
> >   2. Directly use the system's network utilities like ifconfig
> > 
> >   3. Rely on NetworkManager (not an option right now, as NM doesn't know
> >     about bridges and the like)
> 
> It has to be an option - even if it only supports a subset of what the
> other options support.
> 
> I really wouldn't like to see us push ahead with this until we have a
> plan for how this will work with NetworkManager (and a rough agreement
> for how future support for bonding etc. in NetworkManager might be
> configured)

Absolutely - NetworkManager is a fundamental requirement for this to be
viable, since it is the default mgmt backend for  Linux desktop deployments,
and potentially even for Server deployments in future.

Also need to take into account the network mgmt capabilities of other
virt APIs such as VMWare / XenAPI, since it is very desirable to be able
to target these as a backend impl when using those hypervisor drivers

> > Option (1) saves us from replicating every bit of network setup
> > functionality that those scripts already have - besides configuring the
> > interface, we also might have to setup routes, run dhclient etc.

The important benefit of (1), is that libvirt plays nicely with 
distro scripts, rather than fighting/racing with them. 

> > Option (2) would require far fewer backend implementations than (1) - we
> > should be able to get away with one implementation for Linux, rather than
> > one for Fedora/RHEL, one for Debian, one for SuSe, three for gentoo
> > etc.
> 
> The thing is, this has to integrate with existing configuration -
> there's no point in futzing about with "ip link set eth0 ..." if the
> user has configured eth0 with NetworkManager or the distro's networking
> scripts.

Yes, I think option 2 is pretty much doomed to fail. If you don't
integrate with the native distro mgmt scripts, or with NetworkManager
then you are forever going to have a fight between who's managing
what. You can already see this with Xen's network-bridge script
which cna be considered option 2. If you restart your network using
the distro scripts, after Xen's network-bridge script has run, then
you end up wwith a completely trashed host network.

> > All in all, option (1) seems more attractive, since it should save us from
> > dealing with a lot of low-level details of network setup, and the distro
> > scripts should be much better integrated with the rest of the system than
> > what we come up with for libvirt.
> 
> IMHO, (1) and (3) are requirements and we'll probably end up doing (2)
> too in the long run.

I think (2) should really be avoided - integration with the OS
is of primary importance to avoid getting things into a total
mess.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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