Ver código fonte

Merge pull request #1569 from aboch/ipm

Fix xtables_lock message probe
Madhu Venugopal 8 anos atrás
pai
commit
8a0563ec61
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      libnetwork/iptables/iptables.go

+ 2 - 1
libnetwork/iptables/iptables.go

@@ -45,6 +45,7 @@ var (
 	iptablesPath  string
 	supportsXlock = false
 	supportsCOpt  = false
+	xLockWaitMsg  = "Another app is currently holding the xtables lock; waiting"
 	// used to lock iptables commands if xtables lock is not supported
 	bestEffortLock sync.Mutex
 	// ErrIptablesNotFound is returned when the rule is not found.
@@ -402,7 +403,7 @@ func raw(args ...string) ([]byte, error) {
 	}
 
 	// ignore iptables' message about xtables lock
-	if strings.Contains(string(output), "waiting for it to exit") {
+	if strings.Contains(string(output), xLockWaitMsg) {
 		output = []byte("")
 	}