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

Re: [libvirt] [PATCH] openvz: swap <source bridge=...> with <target dev=...>

2008/10/14 Anton Protopopov <aspsk2 gmail com>
2008/10/14 Daniel P. Berrange <berrange redhat com>
On Wed, Oct 08, 2008 at 01:02:44PM +0400, Anton Protopopov wrote:
> >
> > I do not undesrtand how it will simplify parsing: the iterator
> >> in parsing is an interface name, not bridge name. I attached a patch, so
> >> you will see how I do think about it :) (this patch includes all
> >> discussed changes)
> >>
> > My point of view is to use small count common methods to manipulate config
> > parameters. That is don't use array of differend methods for different types
> > of data. In current case we can transform format to be used common
> > functions.
> >
> > For example:
> > if we will use format
> > #BRIDGE-ifname=<>
> > we can drop openvzGetDefinedBridge and use one existing method
> > openvzReadConfigParam(veid, "#BRIDGE-ifname", value, sizeof(value));

This idea is not good - if someone starts the container outside of libvirt
using 'vzctl start 101', then the bridge config will not be activated.

The latest openvz code has explicit support in its configuration file
for setting the bridge device name, via a 'bridge=br0' attribute in
the NETIF= config setting. This can also be specified wehn invoking
the vzctl --netif_add command:


So, if using openvz > 3.0.22, we should use this config param to record
the bridge and not invent our own.
OK, I will try to implement this in libvirt
Oops, someone already did it.. :)


To make upgrades easy, we should also use this config syntax for version
of openvz <= 3.0.22, and simply document that they need to create a helper
script /usr/sbin/vznetaddbr  to make it work - they can even just grab
the helper script straight from newer openvz code. eg


|: 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]