GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — fix(postgres): restore from an archive with the access it was written with by scooby87 · Pull Request #5295 · cozystack/cozystack Conversation
Contributor
What this PR doesStacked on #5221; review that one first. Once it merges this PR retargets to A CNPG restore took the destination path and endpoint of the source from the Backup artifact, but the credentials Secret, its key names and the endpoint CA from the CNPG strategy as it reads at restore time. Once the strategy pointed at another bucket or endpoint, the restore combined the recorded location with access settings meant for a different one, and recovery failed after an in-place restore had already purged the target Cluster. The destination record that #5221 annotates on the
An unreadable record fails the RestoreJob, and an error reading a Secret is retried, both before the HelmRelease is suspended and the target is purged. Artifacts written before this change keep working: one that records only the Secret uses it with the strategy's key names and CA once the archive has moved, and one without any record uses the strategy. This narrows the behaviour the issue asks for ("the recorded Secret, key names and CA, falling back to the strategy only for artifacts that carry no record") in two places, points 1 and 3 above, so that rotating credentials for an archive that has not moved, and deleting the old Secret after a move, keep working as they did. One case remains uncovered: a recorded Secret that still exists but whose keys were revoked, after the archive moved, while the strategy's credentials could still read the old bucket. ScreenshotsNot applicable: no UI change. Downstream repositoriesThe diff touches only
Release note
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions… with A CNPG restore took the destination path and endpoint of the source from the Backup artifact but the credentials Secret, its key names and the endpoint CA from the strategy as it reads at restore time. Once the strategy pointed at another bucket or endpoint, the restore combined the recorded location with access settings meant for a different one, and recovery failed after an in-place restore had already purged the target Cluster. The destination record on the cnpg.io/Backup now also carries the key names and the CA, and the artifact copies them. A restore uses them once the strategy points elsewhere and their Secrets still hold the keys; otherwise it keeps the strategy's access, as before, which credentials wider than one bucket can still read the old archive with. While the strategy points at the same endpoint and bucket its own access is kept: WAL archiving keeps proving it against that archive, and it carries any rotation since the backup, after which the recorded Secret may already be revoked. The size probe reads the recorded access too. An unreadable record fails the restore before the purge instead of falling back. Assisted-by: LLM Signed-off-by: Alexey Artamonov <[email protected]>
|
There was an error while loading. Please reload this page.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.