Browse Source

etcdmain: print out error and suggestion for fixing notify issue

Xiang Li 10 năm trước cách đây
mục cha
commit
51043830d4
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      etcdmain/etcd.go

+ 4 - 1
etcdmain/etcd.go

@@ -181,7 +181,10 @@ func Main() {
 		// for less than one second.
 		err := daemon.SdNotify("READY=1")
 		if err != nil {
-			plog.Errorf("failed to notify systemd for readiness")
+			plog.Errorf("failed to notify systemd for readiness: %v", err)
+			if err == daemon.SdNotifyNoSocket {
+				plog.Errorf("forgot to set Type=notify in systemd service file?")
+			}
 		}
 	}