Wait for ethwe via netlink, not via polling or signals

('docker kill' breaks restart policy)
This commit is contained in:
Bryan Boreham committed 2015-08-27 15:03:41 +01:00
1 parent 42b64f826b
commit 6e89b036e2
5 files changed
+47 -39

No files matched your search

+2 -15
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"os"
"os/exec"
"os/signal"
"syscall"
weavenet "github.com/weaveworks/weave/net"
@@ -17,22 +16,10 @@ var (
func main() {
var (
args = os.Args[1:]
notInExec = true
args = os.Args[1:]
)
if len(args) > 0 && args[0] == "-s" {
notInExec = false
args = args[1:]
}
if notInExec {
usr2 := make(chan os.Signal)
signal.Notify(usr2, syscall.SIGUSR2)
<-usr2
}
_, err := weavenet.EnsureInterface("ethwe", -1)
_, err := weavenet.EnsureInterface("ethwe")
checkErr(err)
if len(args) == 0 {