[pve-devel] applied: [PATCH common] fix #1232: cleanup bridges on veth_delete

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jan 20 10:08:33 CET 2017


On Wed, Jan 18, 2017 at 10:48:11AM +0100, Wolfgang Bumiller wrote:
> When a container stops or hotplug changes are applied we
> do a veth_delete() which does not cleanup the firewall
> bridges or OVS ports. This is problematic at the next
> startup. When creating a network device we usually want to
> copy the MTU of the bridge we intend to put it on, however,
> with OVS still having the old port lying around the
> recreated device gets associated with the bridge before we
> read its MTU, potentially reducing it to that of the newly
> created device.
> 
> This cleanup also gets rid of stale fwbr/fwln devices from
> stopped containers.
> ---
>  src/PVE/Network.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
> index 1c03770..27492b5 100644
> --- a/src/PVE/Network.pm
> +++ b/src/PVE/Network.pm
> @@ -277,7 +277,7 @@ sub veth_delete {
>      if (-d "/sys/class/net/$veth") {
>  	run_command("/sbin/ip link delete dev $veth", outfunc => sub {}, errfunc => sub {});
>      }
> -
> +    eval { tap_unplug($veth) };
>  }
>  
>  my $create_firewall_bridge_linux = sub {
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list