From 9d778953b6916752bf1fe730c7f846450b783148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Mon, 26 Aug 2024 14:44:50 +0200 Subject: [PATCH] cmd/microcloudd: Remove secret and mDNS from daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- cmd/microcloudd/main.go | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/cmd/microcloudd/main.go b/cmd/microcloudd/main.go index 6cd0186e3..97c2a4346 100644 --- a/cmd/microcloudd/main.go +++ b/cmd/microcloudd/main.go @@ -85,14 +85,6 @@ func (c *cmdDaemon) Run(cmd *cobra.Command, args []string) error { // Periodically check if new services have been installed. go func() { for { - if s.AuthSecret == "" { - logger.Debug("Waiting for initial setup before checking for optional services") - time.Sleep(1 * time.Second) - - continue - } - - updated := false for serviceName, stateDir := range optionalServices { if service.Exists(serviceName, stateDir) { if s.Services[serviceName] != nil { @@ -105,24 +97,9 @@ func (c *cmdDaemon) Run(cmd *cobra.Command, args []string) error { break } - updated = true s.Services[serviceName] = newService.Services[serviceName] } else if s.Services[serviceName] != nil { delete(s.Services, serviceName) - updated = true - } - } - - if updated { - err = s.StopBroadcast() - if err != nil { - logger.Error("Failed to shutdown broadcast after detecting new services", logger.Ctx{"error": err}) - continue - } - - err = s.Broadcast() - if err != nil { - logger.Error("Failed to restart broadcast after detecting new services", logger.Ctx{"error": err}) } } @@ -134,6 +111,9 @@ func (c *cmdDaemon) Run(cmd *cobra.Command, args []string) error { api.ServicesCmd(s), api.ServiceTokensCmd(s), api.ServicesClusterCmd(s), + api.SessionJoinCmd(s), + api.SessionInitiatingCmd(s), + api.SessionJoiningCmd(s), api.LXDProxy(s), api.CephProxy(s), api.OVNProxy(s),