You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Empty WAL archive check is duplicated between the operator and the WAL-archiver plugin #11217
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.
Activity
feat: pass the check_empty_wal_archive decision to plugins
feat: pass the check_empty_wal_archive decision to plugins
feat: pass the check_empty_wal_archive decision to plugins
feat: pass the check_empty_wal_archive decision to plugins (#11216)
feat: pass the check_empty_wal_archive decision to plugins (cloudnati…
feat: pass the check_empty_wal_archive decision to plugins (#11216)
feat: pass the check_empty_wal_archive decision to plugins (#11216)