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]: CheckEmptyWalArchive doesn't run with volumesnapshots and CNPG-I plugin restores #9305
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.
Contact Details
No response
Version
trunk (main)
What version of Kubernetes are you using?
1.34
What is your Kubernetes environment?
Self-managed: kind (evaluation)
How did you install the operator?
YAML manifest
What happened?
The CheckEmptyWalArchive feature does not work on volume snapshot restores if using a CNPG-I plugin (e.g., plugin-barman-cloud) for WALS. During restore, the code does not create the CheckEmptyWalArchiveFile file and instead calls the "barman-cloud-check-wal-archive" command directly, but only when using in-tree backup. This direct call is made before the restore begins as an early error detection, but it cannot function when an external plugin is handling the backup. As a result, restore doesn't run the check for setups using external plugins for WAL.
This is a known limitation with plugin-based restores in CloudNativePG: the CheckEmptyWalArchive feature does not run when using CNPG-I plugins like plugin-barman-cloud. The restore workflow bypasses the creation of the sentinel file and the early WAL archive check, delegating restore logic directly to the plugin, which does not trigger the same safety check as the built-in backup/restore path. This means the empty WAL archive check is not executed, and the annotation cnpg.io/skipEmptyWalArchiveCheck is not reliably supported in plugin-based restore flows due to operator webhook and bootstrap logic. As a result, restores can fail with "Expected empty archive" errors if the archive path is not empty, and skipping the check is not recommended due to the risk of data loss [source].
Safe workarounds are to ensure the storage bucket/path for restore is empty or to use a unique serverName in your plugin parameters to isolate the restore path [source]. Recent plugin releases have fixed other restore bugs, but do not address this limitation. There is no official documentation or release note directly about this, but maintainers have acknowledged it as confusing for users.
Let me know if you need help with a specific restore scenario or error log.
changed the title [-][Bug]: CheckEmptyWalArchive doesn't run with CNPG-I plugin restores[/-][+][Bug]: CheckEmptyWalArchive doesn't run with volumesnapshots and CNPG-I plugin restores[/+]on Nov 24, 2025
The check had never functioned for this specific combination of volume-snapshot and backup plugin. Since it was a safety check, no one realized it wasn't being executed until it became the only operation in the barman-cloud commands that could create the destination when it was missing. This issue is similar to what we resolved in #8895, but it is more challenging to identify because it only affects the CNPG-I plugins, not the in-tree barman-cloud backup.
The check had never functioned for this specific combination of volume-snapshot and backup plugin. Since it was a safety check, no one realized it wasn't being executed until it became the only operation in the barman-cloud commands that could create the destination when it was missing. This issue is similar to what we resolved in #8895, but it is more challenging to identify because it only affects the CNPG-I plugins, not the in-tree barman-cloud backup.
So, is this due to the sudden behaviour change introduced by the last version of Barman?
Activity
dosubot commentedon Nov 24, 2025
This is a known limitation with plugin-based restores in CloudNativePG: the CheckEmptyWalArchive feature does not run when using CNPG-I plugins like plugin-barman-cloud. The restore workflow bypasses the creation of the sentinel file and the early WAL archive check, delegating restore logic directly to the plugin, which does not trigger the same safety check as the built-in backup/restore path. This means the empty WAL archive check is not executed, and the annotation
cnpg.io/skipEmptyWalArchiveCheckis not reliably supported in plugin-based restore flows due to operator webhook and bootstrap logic. As a result, restores can fail with "Expected empty archive" errors if the archive path is not empty, and skipping the check is not recommended due to the risk of data loss [source].Safe workarounds are to ensure the storage bucket/path for restore is empty or to use a unique
serverNamein your plugin parameters to isolate the restore path [source]. Recent plugin releases have fixed other restore bugs, but do not address this limitation. There is no official documentation or release note directly about this, but maintainers have acknowledged it as confusing for users.Let me know if you need help with a specific restore scenario or error log.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
[-][Bug]: CheckEmptyWalArchive doesn't run with CNPG-I plugin restores[/-][+][Bug]: CheckEmptyWalArchive doesn't run with volumesnapshots and CNPG-I plugin restores[/+]gbartolini commentedon Nov 24, 2025
How come it stopped working all of a sudden?
mnencia commentedon Nov 24, 2025
The check had never functioned for this specific combination of volume-snapshot and backup plugin. Since it was a safety check, no one realized it wasn't being executed until it became the only operation in the barman-cloud commands that could create the destination when it was missing. This issue is similar to what we resolved in #8895, but it is more challenging to identify because it only affects the CNPG-I plugins, not the in-tree barman-cloud backup.
gbartolini commentedon Nov 25, 2025
So, is this due to the sudden behaviour change introduced by the last version of Barman?
fix(volumesnapshots): check empty wal archive on CNPG-I plugin restore
fix(volumesnapshots,cnpg-i): ensure `CheckEmptyWalArchive` runs durin…
fix(volumesnapshots,cnpg-i): ensure `CheckEmptyWalArchive` runs durin…
fix(volumesnapshots,cnpg-i): ensure `CheckEmptyWalArchive` runs durin…
fix(volumesnapshots,cnpg-i): ensure `CheckEmptyWalArchive` runs durin…
fix(volumesnapshots,cnpg-i): ensure `CheckEmptyWalArchive` runs durin…