micahculpepper/dockerveth

VETH shows valid_lft forever preferred_lft forever

RyanRamchandar opened this issue · 3 comments

Some of the veths for my containers return odd results: valid_lft forever preferred_lft forever.
Notably: the containers with these have used the run flag --network=host whereas the other do not.

./dockerveth.sh
CONTAINER ID	VETH       	NAMES
7db0bdb50996	      valid_lft forever preferred_lft forever	plc-stats
1dd028ebd136	vethde39193	test1
94f7fb253c73	      valid_lft forever preferred_lft forever	plc-dash
31b4480a382b	veth12824da	test2
2aa0875d0949	veth9ddf10b	test3
4648d60375e8	veth3e8c797	test4

Facing the same issue here

Technically, containers with --network=host have no veth since they use the host interface. So I think the script could be modified to make this clear by showing the host interface name or just a placeholder.

Something like

./dockerveth.sh
CONTAINER ID	INTERFACE  	NAMES
7db0bdb50996	eth0	        plc-stats
1dd028ebd136	vethde39193	test1
94f7fb253c73	eth0	        plc-dash
31b4480a382b	veth12824da	test2
2aa0875d0949	veth9ddf10b	test3
4648d60375e8	veth3e8c797	test4

valid_lft forever preferred_lft forever shows up when the script doesn't find a veth like it's expecting. It's a parsing bug. I'll see if I can work out a fix.