[Bug]: Empty WAL archive check is duplicated between the operator and the WAL-archiver plugin · Issue #11217 · cloudnative-pg/cloudnative-pg · GitHub
Skip to content

[Bug]: Empty WAL archive check is duplicated between the operator and the WAL-archiver plugin #11217

Description

@mnencia

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Version

trunk (main)

What version of Kubernetes are you using?

1.36

What is your Kubernetes environment?

Other

How did you install the operator?

Other

What happened?

The decision to verify that a WAL archive destination is empty before archiving into it (skipEmptyWalArchiveCheck annotation, .check-empty-wal-archive marker file) is Cluster state the operator already owns end to end: it reads the annotation and it owns the marker file's full lifecycle (reconcileCheckWalArchiveFile in internal/management/controller/instance_controller.go).

A CNPG-i WAL-archiver plugin, however, re-derives this same decision on its own: it reads the annotation directly off the Cluster and inspects the marker file itself, instead of receiving the operator's already-computed decision. This duplicates policy between the operator and the plugin. Any divergence in how the two sides resolve the annotation (for example, a distribution that renames the annotation, or a plugin and operator disagreeing on the marker file's state at a given instant) silently breaks the check on the plugin side while the operator's own in-tree archiving path keeps behaving correctly, with no error surfaced.

The fix is to have the operator compute the decision once and pass it explicitly to the plugin via CNPG-i, instead of letting the plugin re-derive it.

Cluster resource

N/A: this is an architectural issue in how the operator and WAL-archiver plugins communicate, not reproducible from a single Cluster manifest.

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added 2 commits that reference this issue on Jul 16, 2026
    2df54b6
    b00eb8e
  2. added theissue type on Jul 16, 2026
  3. removed theissue type on Jul 16, 2026
  4. added theissue type on Jul 16, 2026
  5. added a commit that references this issue on Jul 21, 2026
    73836fe
  6. added a commit that references this issue on Jul 21, 2026
    68df373
  7. added a commit that references this issue on Jul 21, 2026
    2af6cc5
  8. added 2 commits that reference this issue on Jul 21, 2026
    4888bb8
    0abf1c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions