Skip to content

MGMT-23340: upgrade assisted-service postgresql from 13 to 15#10096

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
zszabo-rh:MGMT-23340/upgrade-postgresql-13-to-15
Apr 8, 2026
Merged

MGMT-23340: upgrade assisted-service postgresql from 13 to 15#10096
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
zszabo-rh:MGMT-23340/upgrade-postgresql-13-to-15

Conversation

@zszabo-rh
Copy link
Copy Markdown
Contributor

@zszabo-rh zszabo-rh commented Apr 1, 2026

Summary

Upgrade PostgreSQL from 13 to 15 using sclorg's native upgrade mechanism.

Changes:

  • Update DATABASE_IMAGE to postgresql-15-c9s (PG15 on RHEL9) across all deployment manifests, test infrastructure, and documentation
  • Update docs/dev/postgresql-upgrade.md with current upgrade path info

How it works:
When the new image starts against existing PG13 data, the postgres_startup.sh wrapper (added in MGMT-16090) detects the version mismatch and sets POSTGRESQL_UPGRADE=hardlink. The sclorg container then runs pg_upgrade --link to migrate data in-place. Hardlink mode is fast (seconds) and requires no extra storage.

Why PG15 and not PG16:
Direct PG13→PG16 upgrade is not possible with stock sclorg images — postgresql-16-c9s only supports upgrading from PG15 data (POSTGRESQL_PREV_VERSION=15). RHEL 9 module streams skip PG14, so the upgrade path is 13→15→16. PG16 will follow in the next release.

Depends on: openshift/release#77242 (CI image mirroring — must merge first, otherwise disconnected CI tests fail because PG15 image is not mirrored)

Test plan

  • Unit tests pass against PG15 database (105 suites, 0 failures)
  • E2E upgrade on Beaker (MCE 2.8.4, OCP 4.18): PG13→PG15 upgrade via postgres_startup.sh wrapper — pg_upgrade completed successfully
  • Data integrity verified: InfraEnv record and events preserved identically after upgrade
  • Restart test (PG15→PG15): wrapper correctly skips pg_upgrade, normal startup, 0 restarts
  • CI tests (blocked on MGMT-23340: upgrade assisted-service postgresql from 13 to 15 release#77242 for image mirroring)

/hold

Update DATABASE_IMAGE to postgresql-15-c9s across all deployment
manifests, test infrastructure, and documentation.

The existing postgres_startup.sh wrapper automatically detects
the version mismatch and triggers pg_upgrade with hardlink mode.

See docs/dev/postgresql-upgrade.md for details.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 1, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 1, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 1, 2026

@zszabo-rh: This pull request references MGMT-23340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Upgrade PostgreSQL from 13 to 15 using sclorg's native upgrade mechanism.

Changes:

  • Update DATABASE_IMAGE to postgresql-15-c9s (PG15 on RHEL9) across all deployment manifests, test infrastructure, and documentation
  • Update docs/dev/postgresql-upgrade.md with current upgrade path info

How it works:
When the new image starts against existing PG13 data, the postgres_startup.sh wrapper (added in MGMT-16090) detects the version mismatch and sets POSTGRESQL_UPGRADE=hardlink. The sclorg container then runs pg_upgrade --link to migrate data in-place. Hardlink mode is fast (seconds) and requires no extra storage.

Why PG15 and not PG16:
Direct PG13→PG16 upgrade is not possible with stock sclorg images — postgresql-16-c9s only supports upgrading from PG15 data (POSTGRESQL_PREV_VERSION=15). RHEL 9 module streams skip PG14, so the upgrade path is 13→15→16. PG16 will follow in the next release.

Depends on: openshift/release PR for CI image mirroring (link TBD)

Test plan

  • Unit tests pass against PG15 database (105 suites, 0 failures)
  • Deploy on cluster with existing PG13 data, verify pg_upgrade completes
  • Verify assisted-service connects and operates normally after upgrade
  • Fresh install works as expected
  • Restart after upgrade (PG15→PG15) — no upgrade triggered

/hold

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85916824-7943-48ce-ba9d-962bfc3b7776

📥 Commits

Reviewing files that changed from the base of the PR and between ba89549 and 26e1d92.

📒 Files selected for processing (16)
  • Makefile
  • config/manager/manager.yaml
  • config/manifests/bases/assisted-service-operator.clusterserviceversion.yaml
  • deploy/olm-catalog/manifests/assisted-service-operator.clusterserviceversion.yaml
  • deploy/podman/pod-persistent-disconnected.yml
  • deploy/podman/pod-persistent.yml
  • deploy/podman/pod.yml
  • deploy/podman/pod_tls.yml
  • deploy/postgres/postgres-deployment-ephemeral.yaml
  • deploy/postgres/postgres-deployment.yaml
  • docs/dev/README.md
  • docs/dev/postgresql-upgrade.md
  • docs/dev/testing.md
  • internal/common/common_unitest_db.go
  • internal/common/testcontainers_db_context.go
  • internal/controller/controllers/images.go

Walkthrough

PostgreSQL container image version upgraded from 13 to 15 across build configuration, Kubernetes manifests, deployment files, Podman pod definitions, documentation, and Go source code. All references to quay.io/sclorg/postgresql-13-c9s updated to quay.io/sclorg/postgresql-15-c9s.

Changes

Cohort / File(s) Summary
Build & Runtime Configuration
Makefile, config/manager/manager.yaml, internal/controller/controllers/images.go
Updated PostgreSQL container image references from version 13 to version 15. Makefile default PSQL_IMAGE variable, Kubernetes Deployment DATABASE_IMAGE env var, and Go DatabaseImage() function default value all changed to use postgresql-15-c9s:latest.
Kubernetes Manifests
config/manifests/bases/assisted-service-operator.clusterserviceversion.yaml, deploy/olm-catalog/manifests/assisted-service-operator.clusterserviceversion.yaml
Updated PostgreSQL image in ClusterServiceVersion relatedImages and DATABASE_IMAGE environment variable from postgresql-13-c9s:latest to postgresql-15-c9s:latest in both base and deployed manifest versions.
Podman Pod Configurations
deploy/podman/pod.yml, deploy/podman/pod_persistent.yml, deploy/podman/pod_persistent_disconnected.yml, deploy/podman/pod_tls.yml
Updated db container image across all pod definitions from postgresql-13-c9s:latest to postgresql-15-c9s:latest with no other container configuration changes.
Postgres Deployments
deploy/postgres/postgres-deployment.yaml, deploy/postgres/postgres-deployment-ephemeral.yaml
Updated Deployment postgres container image from postgresql-13-c9s to postgresql-15-c9s in both standard and ephemeral deployment variants.
Documentation
docs/dev/README.md, docs/dev/testing.md, docs/dev/postgresql-upgrade.md
Updated PostgreSQL version references in documentation examples and test instructions. postgresql-upgrade.md also revised upgrade path notes to reflect RHEL 9 skips PostgreSQL 14 and updated version-skip-protection example boundaries.
Test Infrastructure
internal/common/common_unitest_db.go, internal/common/testcontainers_db_context.go
Updated PostgreSQL container image for Kubernetes-based and TestContainers-based unit test database contexts from postgresql-13-c9s to postgresql-15-c9s.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 1, 2026
@openshift-ci openshift-ci Bot requested review from gamli75 and jhernand April 1, 2026 13:08
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 1, 2026

@zszabo-rh: This pull request references MGMT-23340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Upgrade PostgreSQL from 13 to 15 using sclorg's native upgrade mechanism.

Changes:

  • Update DATABASE_IMAGE to postgresql-15-c9s (PG15 on RHEL9) across all deployment manifests, test infrastructure, and documentation
  • Update docs/dev/postgresql-upgrade.md with current upgrade path info

How it works:
When the new image starts against existing PG13 data, the postgres_startup.sh wrapper (added in MGMT-16090) detects the version mismatch and sets POSTGRESQL_UPGRADE=hardlink. The sclorg container then runs pg_upgrade --link to migrate data in-place. Hardlink mode is fast (seconds) and requires no extra storage.

Why PG15 and not PG16:
Direct PG13→PG16 upgrade is not possible with stock sclorg images — postgresql-16-c9s only supports upgrading from PG15 data (POSTGRESQL_PREV_VERSION=15). RHEL 9 module streams skip PG14, so the upgrade path is 13→15→16. PG16 will follow in the next release.

Depends on: openshift/release#77242 (CI image mirroring)

Test plan

  • Unit tests pass against PG15 database (105 suites, 0 failures)
  • Deploy on cluster with existing PG13 data, verify pg_upgrade completes
  • Verify assisted-service connects and operates normally after upgrade
  • Fresh install works as expected
  • Restart after upgrade (PG15→PG15) — no upgrade triggered

/hold

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

1 similar comment
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 1, 2026

@zszabo-rh: This pull request references MGMT-23340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Upgrade PostgreSQL from 13 to 15 using sclorg's native upgrade mechanism.

Changes:

  • Update DATABASE_IMAGE to postgresql-15-c9s (PG15 on RHEL9) across all deployment manifests, test infrastructure, and documentation
  • Update docs/dev/postgresql-upgrade.md with current upgrade path info

How it works:
When the new image starts against existing PG13 data, the postgres_startup.sh wrapper (added in MGMT-16090) detects the version mismatch and sets POSTGRESQL_UPGRADE=hardlink. The sclorg container then runs pg_upgrade --link to migrate data in-place. Hardlink mode is fast (seconds) and requires no extra storage.

Why PG15 and not PG16:
Direct PG13→PG16 upgrade is not possible with stock sclorg images — postgresql-16-c9s only supports upgrading from PG15 data (POSTGRESQL_PREV_VERSION=15). RHEL 9 module streams skip PG14, so the upgrade path is 13→15→16. PG16 will follow in the next release.

Depends on: openshift/release#77242 (CI image mirroring)

Test plan

  • Unit tests pass against PG15 database (105 suites, 0 failures)
  • Deploy on cluster with existing PG13 data, verify pg_upgrade completes
  • Verify assisted-service connects and operates normally after upgrade
  • Fresh install works as expected
  • Restart after upgrade (PG15→PG15) — no upgrade triggered

/hold

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.59%. Comparing base (ba89549) to head (26e1d92).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
internal/common/common_unitest_db.go 0.00% 1 Missing ⚠️
internal/common/testcontainers_db_context.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10096      +/-   ##
==========================================
+ Coverage   44.27%   44.59%   +0.31%     
==========================================
  Files         416      416              
  Lines       72549    73018     +469     
==========================================
+ Hits        32123    32560     +437     
- Misses      37521    37538      +17     
- Partials     2905     2920      +15     
Files with missing lines Coverage Δ
internal/controller/controllers/images.go 100.00% <100.00%> (ø)
internal/common/common_unitest_db.go 23.37% <0.00%> (ø)
internal/common/testcontainers_db_context.go 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 2, 2026

@zszabo-rh: This pull request references MGMT-23340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Upgrade PostgreSQL from 13 to 15 using sclorg's native upgrade mechanism.

Changes:

  • Update DATABASE_IMAGE to postgresql-15-c9s (PG15 on RHEL9) across all deployment manifests, test infrastructure, and documentation
  • Update docs/dev/postgresql-upgrade.md with current upgrade path info

How it works:
When the new image starts against existing PG13 data, the postgres_startup.sh wrapper (added in MGMT-16090) detects the version mismatch and sets POSTGRESQL_UPGRADE=hardlink. The sclorg container then runs pg_upgrade --link to migrate data in-place. Hardlink mode is fast (seconds) and requires no extra storage.

Why PG15 and not PG16:
Direct PG13→PG16 upgrade is not possible with stock sclorg images — postgresql-16-c9s only supports upgrading from PG15 data (POSTGRESQL_PREV_VERSION=15). RHEL 9 module streams skip PG14, so the upgrade path is 13→15→16. PG16 will follow in the next release.

Depends on: openshift/release#77242 (CI image mirroring — must merge first, otherwise disconnected CI tests fail because PG15 image is not mirrored)

Test plan

  • Unit tests pass against PG15 database (105 suites, 0 failures)
  • E2E upgrade on Beaker (MCE 2.8.4, OCP 4.18): PG13→PG15 upgrade via postgres_startup.sh wrapper — pg_upgrade completed successfully
  • Data integrity verified: InfraEnv record and events preserved identically after upgrade
  • Restart test (PG15→PG15): wrapper correctly skips pg_upgrade, normal startup, 0 restarts
  • CI tests (blocked on MGMT-23340: upgrade assisted-service postgresql from 13 to 15 release#77242 for image mirroring)

/hold

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rccrdpccl
Copy link
Copy Markdown
Contributor

/lgtm
/approve
/hold

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 2, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rccrdpccl, zszabo-rh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 2, 2026
@zszabo-rh
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@zszabo-rh
Copy link
Copy Markdown
Contributor Author

/retest

@rccrdpccl
Copy link
Copy Markdown
Contributor

/override ci/prow/edge-e2e-ai-operator-disconnected-capi

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 7, 2026

@rccrdpccl: Overrode contexts on behalf of rccrdpccl: ci/prow/edge-e2e-ai-operator-disconnected-capi

Details

In response to this:

/override ci/prow/edge-e2e-ai-operator-disconnected-capi

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@zszabo-rh
Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 7, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD c184c74 and 2 for PR HEAD 26e1d92 in total

@zszabo-rh
Copy link
Copy Markdown
Contributor Author

/retest

@rccrdpccl
Copy link
Copy Markdown
Contributor

/override ci/prow/edge-e2e-ai-operator-ztp-capi ci/prow/edge-e2e-ai-operator-disconnected-capi ci/prow/edge-e2e-ai-operator-ztp

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 8, 2026

@rccrdpccl: Overrode contexts on behalf of rccrdpccl: ci/prow/edge-e2e-ai-operator-disconnected-capi, ci/prow/edge-e2e-ai-operator-ztp, ci/prow/edge-e2e-ai-operator-ztp-capi

Details

In response to this:

/override ci/prow/edge-e2e-ai-operator-ztp-capi ci/prow/edge-e2e-ai-operator-disconnected-capi ci/prow/edge-e2e-ai-operator-ztp

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 8, 2026

@zszabo-rh: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit e807c36 into openshift:master Apr 8, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants