mirror of https://github.com/k3s-io/k3s
Fix initial start of etcd only nodes (#3748)
* Fix initial start of etcd only nodes Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * more fixes Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * more fixes Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>pull/3755/head
parent
429af17e4d
commit
2069cdf4ee
|
@ -366,6 +366,8 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont
|
|||
|
||||
logrus.Info("Starting " + version.Program + " " + app.App.Version)
|
||||
|
||||
notifySocket := os.Getenv("NOTIFY_SOCKET")
|
||||
|
||||
ctx := signals.SetupSignalHandler(context.Background())
|
||||
|
||||
if err := server.StartServer(ctx, &serverConfig, cfg); err != nil {
|
||||
|
@ -382,7 +384,8 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont
|
|||
}
|
||||
|
||||
logrus.Info(version.Program + " is up and running")
|
||||
if (cfg.DisableAgent || cfg.DisableAPIServer) && os.Getenv("NOTIFY_SOCKET") != "" {
|
||||
if (cfg.DisableAgent || cfg.DisableAPIServer) && notifySocket != "" {
|
||||
os.Setenv("NOTIFY_SOCKET", notifySocket)
|
||||
systemd.SdNotify(true, "READY=1\n")
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue