From f1a1935e967bbcfffff01cdf988544111fd2d7a9 Mon Sep 17 00:00:00 2001 From: mbussolotto Date: Wed, 1 Jul 2026 17:17:13 +0200 Subject: [PATCH 1/2] Allow diskcheck env vars into containers (bsc#1270033) --- mgradm/shared/templates/pgsqlServiceTemplate.go | 2 +- mgradm/shared/templates/serviceTemplate.go | 1 + mgradm/shared/templates/templates_test.go | 2 ++ uyuni-tools.changes.mbussolotto.diskcheck_fix | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 uyuni-tools.changes.mbussolotto.diskcheck_fix diff --git a/mgradm/shared/templates/pgsqlServiceTemplate.go b/mgradm/shared/templates/pgsqlServiceTemplate.go index ceee8117cd0..6ff44b6c246 100644 --- a/mgradm/shared/templates/pgsqlServiceTemplate.go +++ b/mgradm/shared/templates/pgsqlServiceTemplate.go @@ -56,7 +56,7 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \ {{- end }} --network {{ .Network }} \ --health-on-failure=stop \ - ${UYUNI_BACKUP_VOLUME} ${PODMAN_EXTRA_ARGS} ${UYUNI_IMAGE}' + ${PODMAN_EXTRA_ENV_VAR} ${UYUNI_BACKUP_VOLUME} ${PODMAN_EXTRA_ARGS} ${UYUNI_IMAGE}' ExecStop=/usr/bin/podman stop \ --ignore -t 10 \ --cidfile=%t/%n.ctr-id diff --git a/mgradm/shared/templates/serviceTemplate.go b/mgradm/shared/templates/serviceTemplate.go index c8744f4fd90..e8c2e184fdb 100644 --- a/mgradm/shared/templates/serviceTemplate.go +++ b/mgradm/shared/templates/serviceTemplate.go @@ -43,6 +43,7 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \ {{- range .Volumes }} -v {{ .Name }}:{{ .MountPath }} \ {{- end }} + ${PODMAN_EXTRA_ENV_VAR} \ --env-file={{ .ServerEnvFile }} \ --network {{ .Network }} \ {{- if .DBUserSecret }} diff --git a/mgradm/shared/templates/templates_test.go b/mgradm/shared/templates/templates_test.go index 0bdc3808b1b..fe208364b22 100644 --- a/mgradm/shared/templates/templates_test.go +++ b/mgradm/shared/templates/templates_test.go @@ -123,6 +123,7 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \ --arg value \ -p 80:80 \ -v var-spacewalk:/var/spacewalk \ + ${PODMAN_EXTRA_ENV_VAR} \ --env-file=/etc/systemd/system/uyuni-server.conf.d/server.env \ --network uyuni-network \ --secret uyuni-db-user,type=env,target=MANAGER_USER \ @@ -211,6 +212,7 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \ --arg value \ -p 80:80 \ -v var-spacewalk:/var/spacewalk \ + ${PODMAN_EXTRA_ENV_VAR} \ --env-file=/etc/systemd/system/uyuni-server.conf.d/server.env \ --network uyuni-network \ --secret ca-secret,type=mount,target=/etc/pki/ca.crt \ diff --git a/uyuni-tools.changes.mbussolotto.diskcheck_fix b/uyuni-tools.changes.mbussolotto.diskcheck_fix new file mode 100644 index 00000000000..f2db9331fdf --- /dev/null +++ b/uyuni-tools.changes.mbussolotto.diskcheck_fix @@ -0,0 +1 @@ +- Allow diskcheck env vars into containers (bsc#1270033) From 2f1c0305683f15d9ae018ec8b320953097ef1a83 Mon Sep 17 00:00:00 2001 From: mbussolotto Date: Fri, 3 Jul 2026 10:14:25 +0200 Subject: [PATCH 2/2] reload daemon on restart --- mgradm/cmd/restart/podman.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mgradm/cmd/restart/podman.go b/mgradm/cmd/restart/podman.go index 367e22cfde2..632e85eb9d1 100644 --- a/mgradm/cmd/restart/podman.go +++ b/mgradm/cmd/restart/podman.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2025 SUSE LLC +// SPDX-FileCopyrightText: 2026 SUSE LLC // // SPDX-License-Identifier: Apache-2.0 @@ -20,6 +20,7 @@ func podmanRestart( _ []string, ) error { return utils.JoinErrors( + systemd.ReloadDaemon(false), systemd.RestartService(podman.DBService), systemd.RestartService(podman.ServerService), systemd.RestartInstantiated(podman.ServerAttestationService),