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

Anton Protopopov aspsk2 at gmail.com
Tue Oct 14 16:57:37 UTC 2008


2008/10/14 Anton Protopopov <aspsk2 at gmail.com>

> 2008/10/14 Daniel P. Berrange <berrange at 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:
>>
>>
>> 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/ <http://search.cpan.org/%7Edanberr/> :|
>> |: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505
>> :|
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081014/f5ca2ce6/attachment-0001.htm>


More information about the libvir-list mailing list