Skip to content

K8SPG-803 specify log level info when pgbackrest is executed through cli - GetInfo #1186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 27, 2025

Conversation

gkech
Copy link
Contributor

@gkech gkech commented Jun 26, 2025

K8SPG-803 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:

When the following is configured

  backups:
    pgbackrest:
      global:
        log-level-console: debug

Then we observed this log

2025-06-26T10:13:16.149Z        ERROR   failed to cleanup outdated backups      {"controller": "perconapgcluster", "controllerGroup": "pgv2.percona.com", "controllerKind": "PerconaPGCluster", "PerconaPGCluster": {"name":"cluster1","namespace":"nofix"}, "namespace": "nofix", "name": "cluster1", "reconcileID": "aaa07465-e2a8-4a21-bf8c-65b3cd077996", "error": "get pgBackRest info: failed to unmarshal pgBackRest info output: invalid character '-' after top-level value", "errorVerbose": "invalid character '-' after top-level value\nfailed to unmarshal pgBackRest info output\ngithub.com/percona/percona-postgresql-operator/percona/pgbackrest.GetInfo\n\t/go/src/github.com/percona/percona-postgresql-operator/percona/pgbackrest/pgbackrest.go:67

And the pg-backup resource remains in running stateforever. New backups are not started.

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

Solution:

	// Setting --log-level-console=info is needed because if the --log-level-console=debug is configured
	// through `backups.pgbackrest.global`, the stdout output contains additional text output that
	// cannot be unmarshalled to InfoOutput without further processing.

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 June 26, 2025 12:35
@JNKPercona
Copy link
Collaborator

Test name Status
backup-enable-disable passed
custom-extensions passed
custom-tls passed
demand-backup passed
finalizers passed
init-deploy passed
monitoring passed
monitoring-pmm3 passed
one-pod passed
operator-self-healing passed
pitr passed
scaling passed
scheduled-backup passed
self-healing passed
sidecars passed
start-from-backup passed
tablespaces passed
telemetry-transfer passed
upgrade-consistency passed
upgrade-minor passed
users passed
We run 21 out of 21

commit: 789513c
image: perconalab/percona-postgresql-operator:PR-1186-789513c52

@gkech gkech merged commit 001be49 into main Jun 27, 2025
18 of 19 checks passed
@gkech gkech deleted the K8SPG-803 branch June 27, 2025 13:01
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