Skip to content

Commit 7dcfedc

Browse files
committed
do not call uyuni-postgres-config.sh in mgradm (bsc#12099)
1 parent 464fb47 commit 7dcfedc

2 files changed

Lines changed: 4 additions & 18 deletions

File tree

mgradm/shared/podman/podman.go

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ func Upgrade(
444444
}
445445

446446
if inspectedValues.DBHost == "localhost" ||
447-
inspectedValues.ReportDBHost == "localhost" {
447+
inspectedValues.ReportDBHost == "localhost" ||
448+
!podman.HasSecret(podman.DBSSLCertSecret) {
448449
log.Info().Msgf(L("Configuring split PostgreSQL container"))
449450

450451
if err := PrepareSSLCertificates(preparedServerImage, &ssl, tz, fqdn); err != nil {
@@ -585,22 +586,6 @@ func RunSplitContainerSettings(serverImage string, dbHost string, reportDBHost s
585586
[]string{"bash", "-e", "-c", scriptBuilder.String()})
586587
}
587588

588-
// RunConfigPgsl setup postgres container.
589-
func RunConfigPgsl(pgsqlImage string) error {
590-
podmanArgs := []string{
591-
"--security-opt", "label=disable",
592-
"--secret", fmt.Sprintf("%s,type=mount,target=%s", podman.DBCASecret, ssl.DBCAContainerPath),
593-
"--secret", fmt.Sprintf("%s,type=mount,uid=999,mode=0400,target=%s", podman.DBSSLKeySecret, ssl.DBCertKeyPath),
594-
"--secret", fmt.Sprintf("%s,type=mount,target=%s", podman.DBSSLCertSecret, ssl.DBCertPath),
595-
"--entrypoint", "/docker-entrypoint-initdb.d/uyuni-postgres-config.sh",
596-
}
597-
if err := podman.RunContainer("uyuni-db-config", pgsqlImage, utils.PgsqlRequiredVolumeMounts,
598-
podmanArgs, []string{}); err != nil {
599-
return err
600-
}
601-
return systemd.RestartService(podman.DBService)
602-
}
603-
604589
// CallCloudGuestRegistryAuth calls cloudguestregistryauth if it is available.
605590
func CallCloudGuestRegistryAuth() error {
606591
cloudguestregistryauth := "cloudguestregistryauth"
@@ -729,5 +714,5 @@ func configureDBContainer(
729714
db.Host,
730715
)
731716
}
732-
return RunConfigPgsl(pgsqlImage)
717+
return nil
733718
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Do not call uyuni-postgres-config.sh in mgradm (bsc#12099).

0 commit comments

Comments
 (0)