Skip to content

fix upgrade from fat container (bsc#1267980)#805

Merged
mcalmer merged 2 commits into
mainfrom
single_pg_hba_conf
Jun 15, 2026
Merged

fix upgrade from fat container (bsc#1267980)#805
mcalmer merged 2 commits into
mainfrom
single_pg_hba_conf

Conversation

@mbussolotto

@mbussolotto mbussolotto commented Jun 11, 2026

Copy link
Copy Markdown
Member

What does this PR change?

  • do not call uyuni-postgres-config.sh in mgradm
  • disable ssl during db split

Codespace

Check if you already have a running container clicking on Running CodeSpace

Create CodeSpace About billing for Github Codespaces CodeSpace Billing Summary CodeSpace Limit

Test coverage

  • No tests

  • DONE

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/30928

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Before you merge

Check How to branch and merge properly!

@mbussolotto mbussolotto changed the title do not call uyuni-postgres-config.sh in mgradm (bsc#12099) fix upgrade from fat container (bsc#12099) Jun 12, 2026
@mbussolotto
mbussolotto marked this pull request as ready for review June 12, 2026 11:51
@mbussolotto
mbussolotto requested review from aaannz, cbosdo, Copilot and nadvornik and removed request for cbosdo June 12, 2026 11:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the podman upgrade/install SSL handling to better support upgrades from “fat” containers (bsc#12099), and removes a DB-container configuration step from mgradm.

Changes:

  • Extend database certificate hostname/SAN validation and generation to include db and reportdb.
  • Update certificate reuse logic to validate multiple hostnames for DB certs during upgrades.
  • Stop invoking uyuni-postgres-config.sh from mgradm (removes the RunConfigPgsl path).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
uyuni-tools.changes.mbussolotto.single_pg_hba_conf Adds changelog entries for the upgrade/certificate behavior changes.
mgradm/shared/podman/ssl.go Updates DB cert preparation/reuse/generation to validate/include db and reportdb hostnames.
mgradm/shared/podman/podman.go Adjusts upgrade flow conditions for split-DB setup; removes postgres-config invocation path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mgradm/shared/podman/ssl.go
Comment thread mgradm/shared/podman/podman.go Outdated
Comment thread mgradm/shared/podman/ssl.go Outdated
return err
}

cnames := append([]string{fqdn, "db", "reportdb"}, sslFlags.Cnames...)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold on here. @nadvornik removed this just last month - #790

These should no longer be needed as internal connections should use non-ssl access and external reportdb needs proper FQDN anyway.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I saw the PR but I didn't investigate too much on it. It seems that's not working for the upgrade.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this was the intention, I might modify rhn.conf during the db split to set:

report_db_ssl_enabled = 0
db_ssl_enabled = 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that should fix the original bug as then there is no ssl name to check.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll give it a try

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works

@mbussolotto
mbussolotto requested a review from aaannz June 12, 2026 13:44
@mbussolotto

Copy link
Copy Markdown
Member Author

@uyuni-project/release-engineering this should be merge simultaneously with uyuni-project/uyuni#12099. Thanks!

@sonarqubecloud

Copy link
Copy Markdown

@mcalmer
mcalmer merged commit c938fad into main Jun 15, 2026
14 checks passed
@mbussolotto mbussolotto changed the title fix upgrade from fat container (bsc#12099) fix upgrade from fat container (bsc#1267980) Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants