Skip to content

fix(volumesnapshots,cnpg-i): ensure CheckEmptyWalArchive runs during WAL restore#9306

Merged
gbartolini merged 1 commit intomainfrom
dev/9305
Nov 27, 2025
Merged

fix(volumesnapshots,cnpg-i): ensure CheckEmptyWalArchive runs during WAL restore#9306
gbartolini merged 1 commit intomainfrom
dev/9305

Conversation

@mnencia
Copy link
Member

@mnencia mnencia commented Nov 24, 2025

The CheckEmptyWalArchive safeguard was not executed when restoring from a volume snapshot using a CNPG-I backup/WAL plugin (e.g. plugin-barman-cloud).
This was due to the operator skipping creation of the CheckEmptyWalArchiveFile marker and relying instead on an early direct call to the in-tree barman-cloud-check-wal-archive command—an approach incompatible with external plugins.

This patch ensures that the CheckEmptyWalArchive mechanism is triggered reliably for both in-tree and plugin-based WAL archive implementations during snapshot restore.

Closes #9305

@mnencia mnencia requested a review from a team as a code owner November 24, 2025 09:48
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 24, 2025
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.26 release-1.27 labels Nov 24, 2025
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@dosubot dosubot bot added bug 🐛 Something isn't working ok to merge 👌 This PR can be merged labels Nov 24, 2025
@mnencia
Copy link
Member Author

mnencia commented Nov 24, 2025

/test

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/19629998520

@mnencia mnencia force-pushed the dev/9305 branch 3 times, most recently from d743538 to 4444fbf Compare November 24, 2025 10:49
@mnencia mnencia changed the title fix(restore): ensure destination WAL archive path is empty on CNPG-I plugin restore fix(volumesnapshots): check empty wal archive on CNPG-I plugin restore Nov 24, 2025
@mnencia
Copy link
Member Author

mnencia commented Nov 24, 2025

/test

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/19633306693

@mnencia
Copy link
Member Author

mnencia commented Nov 24, 2025

/test

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/19640286425

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 25, 2025
@gbartolini gbartolini changed the title fix(volumesnapshots): check empty wal archive on CNPG-I plugin restore fix(volumesnapshots): ensure CheckEmptyWalArchive runs with CNPG-I plugin restore Nov 26, 2025
@gbartolini gbartolini changed the title fix(volumesnapshots): ensure CheckEmptyWalArchive runs with CNPG-I plugin restore fix(volumesnapshots,cnpg-i): ensure CheckEmptyWalArchive runs during WAL restore Nov 26, 2025
Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@gbartolini gbartolini merged commit 01e673d into main Nov 27, 2025
34 checks passed
@gbartolini gbartolini deleted the dev/9305 branch November 27, 2025 10:29
cnpg-bot pushed a commit that referenced this pull request Nov 27, 2025
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)
cnpg-bot pushed a commit that referenced this pull request Nov 27, 2025
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)
cnpg-bot pushed a commit that referenced this pull request Nov 27, 2025
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)
mnencia added a commit that referenced this pull request Jan 20, 2026
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases bug 🐛 Something isn't working lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.25 release-1.26 release-1.27 size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: CheckEmptyWalArchive doesn't run with volumesnapshots and CNPG-I plugin restores

5 participants