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

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

 





2008/10/14 Anton Protopopov <aspsk2@xxxxxxxxx>
2008/10/14 Daniel P. Berrange <berrange@xxxxxxxxxx>
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:

http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_bridged_veth-device_persistent

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

http://git.openvz.org/?p=vzctl;a=blob;f=bin/vznetaddbr.in;h=81975b3275c7e60b229728ec500279b7ffca72d2;hb=41fb6973bc205c00e25ba73431110ac8e821d6c9

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


--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]