>>eval { 
>>ovs-vsctl add-port $bridge vlan$port tag=$port -- set interface 
>>vlan$port type=internal 
>>};

internal interface can have a random name.


also, we need to manage update. (ip modification for example).
we could do down, up . But it's not optimal.



----- Mail original -----
De: "datanom.net" <m...@datanom.net>
À: "pve-devel" <pve-devel@pve.proxmox.com>
Envoyé: Lundi 27 Juillet 2015 19:46:23
Objet: Re: [pve-devel] Network configuration

On Wed, 22 Jul 2015 01:25:14 +0200 
Michael Rasmussen <m...@datanom.net> wrote: 

> Hi all, 
> 
> I have installed a proxmox 4.0 to test openvswitch and IMHO the current 
> network GUI config is not suited for the task since every time you need 
> to create or delete an OVSint Port a reboot of the node is required. I 
> will therefore propose a change in the GUI which allows creating or 
> deleting of OVSint Port without the need for a reboot of the node. 
> Creating OVS Bonds and OVS Bridges IMHO should still require a reboot 
> of the node since changes here is something rarely done after initial 
> configuration and changing configuration of this will break basic 
> networking on the node. 
> 
For the above I have decided on the following implementation: 

OVS: 
eval { 
ovs-vsctl add-port $bridge vlan$port tag=$port -- set interface 
vlan$port type=internal 
}; 
die "vlan$port: Could not add to bridge $bridge" if ($@); 
eval { 
if ($ip and $mask) ? ifconfig vlan$port $ip netmask $mask up : 
ifconfig vlan$port $ip up; 
}; 
if ($@) { 
ovs-vsctl del-port $bridge $port; 
die "vlan$port: Could not bring up interface"; 
} 
eval { 
update /etc/network/interfaces 
}; 
if ($@) { 
ifconfig vlan$port down; 
ovs-vsctl del-port $bridge $port; 
die "vlan$port: Could not update network config"; 
}; 

Something missing above? 



-- 
Hilsen/Regards 
Michael Rasmussen 

Get my public GnuPG keys: 
michael <at> rasmussen <dot> cc 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E 
mir <at> datanom <dot> net 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C 
mir <at> miras <dot> org 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 
-------------------------------------------------------------- 
/usr/games/fortune -es says: 
He hath eaten me out of house and home. 
-- William Shakespeare, "Henry IV" 

_______________________________________________ 
pve-devel mailing list 
pve-devel@pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to