Skip to content

Conversation

@gkech
Copy link
Contributor

@gkech gkech commented Nov 12, 2025

K8SPG-894 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:

The major upgrade fails if the custom extensions are enabled with error:

  Warning  Failed     10m   kubelet            Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/opt/crunchy/bin/relocate-extensions.sh": stat /opt/crunchy/bin/relocate-extensions.sh: no such file or directory: unknown

The error is connected with changing /relocate-extensions.sh to CRUNCHY_BINDIR percona-postgresql-operator/percona/extensions/containers.go at 347501a9072afa4d8366099fc31b37af90afb158 · percona/percona-postgresql-operator

The solution is to run the database-init init container as part of the upgrade job. It should also be the first container to be executed from the set of init containers cause subsequent init-containers may require scripts that were installed by it e.g. custom extensions.

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
Short explanation of the solution we are providing with this PR.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

@gkech gkech marked this pull request as ready for review November 12, 2025 16:41
@hors hors merged commit 8290a40 into main Nov 12, 2025
17 of 18 checks passed
@hors hors deleted the K8SPG-894 branch November 12, 2025 18:38
eleo007 pushed a commit that referenced this pull request Nov 12, 2025
* K8SPG-894 upgrade job using the init container from primary sts

* update unit test

* configure custom container for the upgrade spec and ensure that everything is considered

* change order of init containers

* small refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants