[pve-devel] [PATCH manager] fix #871: netstat: include veth devices

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jan 19 11:34:35 CET 2016


> On January 19, 2016 at 10:21 AM Stefan Priebe - Profihost AG <s.priebe at profihost.ag> wrote:
> 
> 
> Am 19.01.2016 um 09:45 schrieb Wolfgang Bumiller:
> > Include container's veth devices in /nodes/{node}/netstat
> > ---
> > 
> >  @Stefan Priebe:
> >  As the implementation came from you with commit 72eb5b9f and I don't
> >  see other references to this netstat function in the code I'd like
> >  to ask if you agree with this change?
> 
> ACK. Just to know - is veth still in use? I thought OpenVZ is dropped.

veth != venet, veth is the standard linux two-port virtual ethernet link
and used with LXC containers with the same naming scheme
'veth${vmid}i${netid}'

> Stefan
> 
> > 
> >  PVE/API2/Nodes.pm | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
> > index 311d874..b48478d 100644
> > --- a/PVE/API2/Nodes.pm
> > +++ b/PVE/API2/Nodes.pm
> > @@ -290,7 +290,7 @@ __PACKAGE__->register_method({
> >  
> >  	my $netdev = PVE::ProcFSTools::read_proc_net_dev();
> >  	foreach my $dev (keys %$netdev) {
> > -		next if $dev !~ m/^tap([1-9]\d*)i(\d+)$/;
> > +		next if $dev !~ m/^(?:tap|veth)([1-9]\d*)i(\d+)$/;
> >  	        my $vmid = $1;
> >  	        my $netid = $2;
> >  
> > 
>




More information about the pve-devel mailing list