Parcourir la source

Merge pull request #43670 from evol262/ipvs-module-idempotency

Ensure performance tuning is always applied
Sebastiaan van Stijn il y a 3 ans
Parent
commit
5a8304c9c5
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      libnetwork/service_linux.go

+ 4 - 0
libnetwork/service_linux.go

@@ -167,6 +167,10 @@ func (n *network) addLBBackend(ip net.IP, lb *loadBalancer) {
 	if err := i.NewDestination(s, d); err != nil && err != syscall.EEXIST {
 		logrus.Errorf("Failed to create real server %s for vip %s fwmark %d in sbox %.7s (%.7s): %v", ip, lb.vip, lb.fwMark, sb.ID(), sb.ContainerID(), err)
 	}
+
+	// Ensure that kernel tweaks are applied in case this is the first time
+	// we've initialized ip_vs
+	sb.osSbox.ApplyOSTweaks(sb.oslTypes)
 }
 
 // Remove loadbalancer backend the load balancing endpoint for this