Blame SOURCES/Notify-systemd-service-when-server-is-ready-to-liste.patch

5aa948
From c623d5666ef076de1b79c7b86d72a9d68847f672 Mon Sep 17 00:00:00 2001
5aa948
From: Jan Chaloupka <jchaloup@redhat.com>
5aa948
Date: Wed, 23 Sep 2015 09:40:46 +0200
5aa948
Subject: [PATCH] Notify systemd service when server is ready to listen
5aa948
5aa948
---
5aa948
 remote/server.go | 3 +++
5aa948
 1 file changed, 3 insertions(+)
5aa948
5aa948
diff --git a/remote/server.go b/remote/server.go
5aa948
index a39f80c..6d6fb05 100644
5aa948
--- a/remote/server.go
5aa948
+++ b/remote/server.go
5aa948
@@ -26,6 +26,7 @@ import (
5aa948
 
5aa948
 	"github.com/coreos/flannel/Godeps/_workspace/src/github.com/coreos/etcd/pkg/transport"
5aa948
 	"github.com/coreos/flannel/Godeps/_workspace/src/github.com/coreos/go-systemd/activation"
5aa948
+	"github.com/coreos/flannel/Godeps/_workspace/src/github.com/coreos/go-systemd/daemon"
5aa948
 	log "github.com/coreos/flannel/Godeps/_workspace/src/github.com/golang/glog"
5aa948
 	"github.com/coreos/flannel/Godeps/_workspace/src/github.com/gorilla/mux"
5aa948
 	"github.com/coreos/flannel/Godeps/_workspace/src/golang.org/x/net/context"
5aa948
@@ -276,6 +277,8 @@ func RunServer(ctx context.Context, sm subnet.Manager, listenAddr, cafile, certf
5aa948
 		c <- http.Serve(l, httpLogger(r))
5aa948
 	}()
5aa948
 
5aa948
+	daemon.SdNotify("READY=1")
5aa948
+
5aa948
 	select {
5aa948
 	case <-ctx.Done():
5aa948
 		l.Close()
5aa948
-- 
5aa948
1.9.3
5aa948