Skip to content

Commit 8eda4d3

Browse files
committed
Disable SSL during DB split
1 parent 464fb47 commit 8eda4d3

3 files changed

Lines changed: 5 additions & 17 deletions

File tree

mgradm/shared/podman/podman.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -585,22 +585,6 @@ func RunSplitContainerSettings(serverImage string, dbHost string, reportDBHost s
585585
[]string{"bash", "-e", "-c", scriptBuilder.String()})
586586
}
587587

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-
604588
// CallCloudGuestRegistryAuth calls cloudguestregistryauth if it is available.
605589
func CallCloudGuestRegistryAuth() error {
606590
cloudguestregistryauth := "cloudguestregistryauth"
@@ -729,5 +713,5 @@ func configureDBContainer(
729713
db.Host,
730714
)
731715
}
732-
return RunConfigPgsl(pgsqlImage)
716+
return nil
733717
}

mgradm/shared/templates/pgsqlMigrateScriptTemplate.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ set -e -x
1515
1616
{{ if .ReportDBHost }}
1717
sed 's/^report_db_host = .*/report_db_host = {{ .ReportDBHost }}/' -i /etc/rhn/rhn.conf;
18+
sed 's/^report_db_ssl_enabled = .*/report_db_ssl_enabled = 0/' -i /etc/rhn/rhn.conf;
1819
{{ end }}
1920
2021
{{ if .DBHost }}
2122
sed 's/^db_host = .*/db_host = {{ .DBHost }}/' -i /etc/rhn/rhn.conf;
23+
sed 's/^db_ssl_enabled = .*/db_ssl_enabled = 0/' -i /etc/rhn/rhn.conf;
2224
{{ end }}
2325
2426
echo "DONE"`
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Disable SSL on db during split (bsc#12099).
2+
- Do not call uyuni-postgres-config.sh in mgradm (bsc#12099).

0 commit comments

Comments
 (0)