Skip to content

Commit

Permalink
fix: network unreachable when add egress qos for pod
Browse files Browse the repository at this point in the history
when add egress qos for pod, the pod network is unreachable.
through research, the container's virtual nic's qlen is 0 is
the root reason. so set the nic's qlen to 1000(default for linux)
when create pod.
  • Loading branch information
QIANSHUANGYANG [钱双洋] authored and QIANSHUANGYANG [钱双洋] committed Nov 13, 2019
1 parent 721c325 commit 20b2c83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/daemon/ovs.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ func configureHostNic(nicName string, macAddr net.HardwareAddr) error {
if err != nil {
return fmt.Errorf("can not set host nic %s up %v", nicName, err)
}
err = netlink.LinkSetTxQLen(hostLink, 1000)
if err != nil {
return fmt.Errorf("can not set host nic %s qlen %v", nicName, err)
}

return nil
}

Expand Down

0 comments on commit 20b2c83

Please sign in to comment.