Skip to content

K8SPG-732 pgbackrest debug logs streamed to stderr/stdout and logged #1126

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
Apr 14, 2025

Conversation

gkech
Copy link
Contributor

@gkech gkech commented Apr 10, 2025

K8SPG-732 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:

If we enable debug logs with --log-level-console=debug, stderr and stdout are logged in a single line which makes understanding and reasoning very difficult.

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

Solution:
Stream the stdout and stderr and log them properly.

example configuration used:

apiVersion: pgv2.percona.com/v2
kind: PerconaPGBackup
metadata:
  name: backup123
spec:
  pgCluster: cluster1
  repoName: repo1
  options:
    - --type=full
    - --log-level-console=debug

Operator image used: perconalab/percona-postgresql-operator:K8SPG-732-3

Example logs of the backup pod:

Screenshot 2025-04-10 at 11 26 50 AM

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 changed the title K8SPG-732 pgbackrest debug logs streamed to stderr/stdout K8SPG-732 pgbackrest debug logs streamed to stderr/stdout and logged Apr 10, 2025
@gkech gkech marked this pull request as ready for review April 10, 2025 08:15
@gkech gkech added this to the 2.7.0 milestone Apr 10, 2025
@JNKPercona
Copy link
Collaborator

Test name Status
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 failure
sidecars passed
start-from-backup passed
tablespaces passed
telemetry-transfer passed
upgrade-consistency passed
upgrade-minor passed
users passed
We run 20 out of 20

commit: 0f43cb0
image: perconalab/percona-postgresql-operator:PR-1126-0f43cb009

@hors hors merged commit 39ad349 into main Apr 14, 2025
11 of 13 checks passed
@hors hors deleted the K8SPG-732 branch April 14, 2025 12:25
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.

6 participants