<div dir="ltr"><br><br><div class="gmail_quote">2008/10/14 Anton Protopopov <span dir="ltr"><<a href="mailto:aspsk2@gmail.com" target="_blank">aspsk2@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div dir="ltr">2008/10/14 Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span><br><div class="gmail_quote"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div>On Wed, Oct 08, 2008 at 01:02:44PM +0400, Anton Protopopov wrote:<br>
> ><br>
> > I do not undesrtand how it will simplify parsing: the iterator<br>
> >> in parsing is an interface name, not bridge name. I attached a patch, so<br>
> >> you will see how I do think about it :) (this patch includes all<br>
> >> discussed changes)<br>
> >><br>
> > My point of view is to use small count common methods to manipulate config<br>
> > parameters. That is don't use array of differend methods for different types<br>
> > of data. In current case we can transform format to be used common<br>
> > functions.<br>
> ><br>
> > For example:<br>
> > if we will use format<br>
> > #BRIDGE-ifname=<><br>
> > we can drop openvzGetDefinedBridge and use one existing method<br>
> > openvzReadConfigParam(veid, "#BRIDGE-ifname", value, sizeof(value));<br>
<br>
</div>This idea is not good - if someone starts the container outside of libvirt<br>
using 'vzctl start 101', then the bridge config will not be activated.<br>
<br>
The latest openvz code has explicit support in its configuration file<br>
for setting the bridge device name, via a 'bridge=br0' attribute in<br>
the NETIF= config setting. This can also be specified wehn invoking<br>
the vzctl --netif_add command:<br>
<br>
<a href="http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_bridged_veth-device_persistent" target="_blank">http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_bridged_veth-device_persistent</a><br>
<br>
So, if using openvz > 3.0.22, we should use this config param to record<br>
the bridge and not invent our own.</blockquote></div><div>OK, I will try to implement this in libvirt</div></div></div></blockquote><div>Oops, someone already did it.. :)<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div dir="ltr"><div class="gmail_quote"><div><br> </div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
To make upgrades easy, we should also use this config syntax for version<br>
of openvz <= 3.0.22, and simply document that they need to create a helper<br>
script /usr/sbin/vznetaddbr  to make it work - they can even just grab<br>
the helper script straight from newer openvz code. eg<br>
<br>
<a href="http://git.openvz.org/?p=vzctl;a=blob;f=bin/vznetaddbr.in;h=81975b3275c7e60b229728ec500279b7ffca72d2;hb=41fb6973bc205c00e25ba73431110ac8e821d6c9" target="_blank">http://git.openvz.org/?p=vzctl;a=blob;f=bin/vznetaddbr.in;h=81975b3275c7e60b229728ec500279b7ffca72d2;hb=41fb6973bc205c00e25ba73431110ac8e821d6c9</a><br>



<div><br>
Daniel<br>
--<br>
|: Red Hat, Engineering, London   -o-   <a href="http://people.redhat.com/berrange/" target="_blank">http://people.redhat.com/berrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>  -o-  <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a>  -o-  <a href="http://ovirt.org" target="_blank">http://ovirt.org</a> :|<br>



</div>|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/%7Edanberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
<div><div></div><div>|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|<br>
</div></div></blockquote></div></div><br></div>
</blockquote></div><br></div>