Skip to content

K8SPG-851 fix logcollector default - #1733

Open
oksana-grishchenko wants to merge 14 commits into
mainfrom
K8SPG-851-fix-enabled-race
Open

K8SPG-851 fix logcollector default#1733
oksana-grishchenko wants to merge 14 commits into
mainfrom
K8SPG-851-fix-enabled-race

Conversation

@oksana-grishchenko

@oksana-grishchenko oksana-grishchenko commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Fix logcollector default

Problem:

When removing logcollector.enabled=true option from CR of an existing cluster, log collection got disabled.

Cause:
Log collection was enabled by default only for new clusters, the case when the setting gets deleted for existing cluster wasn't handled properly.

Solution:

  • New clusters: log collector is enabled by default if the logcollector.enabled setting is missing in the CR
  • Existing clusters: when upgrading CR version, log collector is disabled
  • Existing clusters: when removing the logcollector.enabled setting for CR, log collector keeps whatever state it was (enabled/disabled)

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?

@egegunes egegunes left a comment

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.

would be great to cover resolveDefaultEnabled with unit tests

@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
backup-enable-disable passed 00:15:16
builtin-extensions passed 00:07:14
custom-extensions passed 00:16:51
cert-manager-tls passed 00:11:58
cert-management-policy failure 00:05:17
custom-envs passed 00:23:27
custom-tls passed 00:08:26
database-init-sql passed 00:03:22
demand-backup passed 00:28:15
demand-backup-offline-snapshot passed 00:14:49
dynamic-configuration passed 00:03:50
extra-volumes passed 00:04:15
finalizers passed 00:04:43
init-deploy passed 00:03:48
huge-pages passed 00:03:04
major-upgrade-14-to-15 passed 00:12:12
major-upgrade-15-to-16 passed 00:11:17
major-upgrade-16-to-17 passed 00:11:40
major-upgrade-17-to-18 passed 00:14:23
ldap passed 00:04:04
ldap-tls passed 00:05:46
logcollection passed 00:07:35
monitoring passed 00:10:31
one-pod passed 00:06:38
repo-host-autogrow passed 00:02:07
operator-self-healing passed 00:10:49
pgbouncer-mtls passed 00:03:42
pg-tde passed 00:12:42
pg-tde-wal-encrypt passed 00:16:37
pitr passed 00:13:51
scaling passed 00:05:38
scheduled-backup passed 00:28:57
self-healing passed 00:09:49
sidecars passed 00:02:56
standby-pgbackrest passed 00:18:48
standby-streaming passed 00:13:31
start-from-backup passed 00:13:10
tablespaces passed 00:10:21
telemetry-transfer passed 00:05:04
upgrade-consistency passed 00:08:19
upgrade-minor passed 00:09:32
users passed 00:04:54
migration-from-crunchy-standby passed 00:19:04
migration-from-crunchy-pv passed 00:09:11
migration-from-crunchy-backup-restore passed 00:16:47
Summary Value
Tests Run 45/45
Job Duration 01:43:33
Total Test Time 07:54:51

commit: 1e63659
image: perconalab/percona-postgresql-operator:PR-1733-1e6365939

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