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

Re: [libvirt] Bridge interface and script



On Mon, Jan 12, 2009 at 09:38:42PM +0000, Daniel P. Berrange wrote:

> > > > With current libvirt, it's not possible to specify a script for
> > > > VIR_DOMAIN_NET_TYPE_BRIDGE. Is this just an oversight, or intentional?
> > > 
> > > That's intentional - if you want to use a generic network script then
> > > use the type=ethernet style of network config instead of type=bridge
> > 
> > OK, why? Is there a reason for this restriction?
> 
> Take Xen on Linux as an example. There are 3 scripts that ship
> with Xen
> 
>  - vif-bridge
>  - vif-route
>  - vif-nat
> 
> Only one of those scripts provides bridging of the VMs. There's no
> easy way for libvirt to determine which script is bridging the VM
> and which is doing something entirely different. So we have little
> practical choice but to determine type=ethernet vs type=bridge based
> on the name of the script.

I'm not complaining about that.  Although I would note that perhaps xend
needs fixing to store the type instead of this guessing based on a
script name.

I'm complaining about the other direction, where it is ignoring my
explicit XML:

    <interface type='bridge'>
...
      <script path='vif-vnic'/>
...
    </interface>

This change has broken backwards compatibility - all installed domains
are broken on Solaris!

> > Nope, since we have at least two standard scripts that are usable. Also,
> > this is a back-compat issue (presumably, even for Linux...) that I don't
> > think we can avoid.
> 
> What's the functional difference between the scripts ?

Different virtual NIC internals - one dedicates a NIC to the domain, the
other is similar to ethernet bridging.

> Converting from Xen -> SEXPR is the easy part - we can accept type=bridge

I think you mean XML not 'Xen' here?

> and an arbitrary script name without, but when we go back in the other
> direction we need to be accurate about what we generate in the XML. We
> don't want to report  type=bridge if the VM is in fact being setup with
> routed networking. Hence we have to check for certain known script names

First, you presumably have to default to bridged mode when you don't
know the script name, since otherwise you've broken compatibility. And
in that case, there shouldn't be anything wrong with allowing different
script names for the bridge type.

regards
john


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