[pve-devel] [PATCH container] Fix #929: delete veths in the post-stop hook

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Apr 13 10:55:53 CEST 2016


On Wed, Apr 13, 2016 at 10:47:55AM +0200, Dietmar Maurer wrote:
> applied, but removed unused $name variable
> 
> > +
> > +	# Because netlink is not a reliable protocol it can happen that lxc's
> > +	# link-deletion messages get lost (or end up being too early?)
> > +	for my $k (keys %$conf) {
> > +	    next if $k !~ /^net(\d+)/;
> > +	    my $ind = $1;
> > +	    my $net = PVE::LXC::Config->parse_lxc_network($conf->{$k});
> > +	    next if $net->{type} ne 'veth';
> > +	    my $name = "veth${vmid}i${ind}";
> 
> this is dead code

Sorry, forgot to remove it with one of my changes.

> 
> > +	    # veth_delete tests with '-d /sys/class/net/$name' before running the
> > command
> > +	    PVE::Network::veth_delete("veth${vmid}i$ind");
> > +	}
> > +
> >  	return undef;
> >      }});
> >  
> > -- 
> > 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