diff --git a/mgradm/shared/coco/coco.go b/mgradm/shared/coco/coco.go index 70f37929d..ad741c4df 100644 --- a/mgradm/shared/coco/coco.go +++ b/mgradm/shared/coco/coco.go @@ -39,6 +39,9 @@ func Upgrade( return err } + if !cocoFlags.IsChanged { + return systemd.RestartInstantiated(podman.ServerAttestationService) + } return systemd.ScaleService(cocoFlags.Replicas, podman.ServerAttestationService) } diff --git a/mgradm/shared/hub/xmlrpcapi.go b/mgradm/shared/hub/xmlrpcapi.go index e0792c030..771c804ee 100644 --- a/mgradm/shared/hub/xmlrpcapi.go +++ b/mgradm/shared/hub/xmlrpcapi.go @@ -72,8 +72,6 @@ func EnableHubXmlrpc(systemd podman.Systemd, replicas int) error { if err := systemd.ScaleService(replicas, podman.HubXmlrpcService); err != nil { return utils.Errorf(err, L("cannot enable service")) } - } else { - log.Info().Msg(L("Not starting Hub XML-RPC API service")) } return nil } @@ -99,7 +97,10 @@ func Upgrade( return err } - return systemd.RestartInstantiated(podman.HubXmlrpcService) + if !hubXmlrpcFlags.IsChanged { + return systemd.RestartInstantiated(podman.HubXmlrpcService) + } + return systemd.ScaleService(hubXmlrpcFlags.Replicas, podman.HubXmlrpcService) } // generateHubXmlrpcSystemdService creates the Hub XMLRPC systemd files. diff --git a/mgradm/shared/podman/podman.go b/mgradm/shared/podman/podman.go index 2e1b71c7d..12949c154 100644 --- a/mgradm/shared/podman/podman.go +++ b/mgradm/shared/podman/podman.go @@ -434,6 +434,10 @@ func Upgrade( return err } + if err := systemd.ReloadDaemon(false); err != nil { + return err + } + if err := updateServerSystemdService(); err != nil { return err } diff --git a/uyuni-tools.changes.cbosdo.upgrade-fix b/uyuni-tools.changes.cbosdo.upgrade-fix new file mode 100644 index 000000000..740108074 --- /dev/null +++ b/uyuni-tools.changes.cbosdo.upgrade-fix @@ -0,0 +1,2 @@ +- Run systemctl daemon-reload after changing the container image config (bsc#1233279) +- coco-replicas-upgrade