Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Platform] Need to fix small bug with backing up multiple ysql namespaces for encrypted at rest universe #7114

Closed
daniel-yb opened this issue Feb 5, 2021 · 0 comments
Assignees
Labels
area/platform Yugabyte Platform priority/high High Priority

Comments

@daniel-yb
Copy link
Contributor

We try to create the encryption key file for each namespace and throw an exception if the file already exists.

Original assumption was that this function should only be called once per backup but looks like this was modified at a later date.

@daniel-yb daniel-yb self-assigned this Feb 5, 2021
@daniel-yb daniel-yb added the area/platform Yugabyte Platform label Feb 5, 2021
daniel-yb added a commit that referenced this issue Feb 5, 2021
…ces for encrypted at rest universe

Summary:
backupUniverseKeyHistory gets called n times for n namespaces during a backup while the
original implementation assumed it would only be called once. This results in an exception being
thrown because it fails to create a file that already exists on subsequent calls to the function for the same backup. Long story short is that we should handle the
case that the file already exists and gracefully skip writing to the file.

Test Plan: Run a "all namespaces" YSQL backup

Reviewers: wesley, arnav, sb-yb, sanketh

Reviewed By: sanketh

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D10554
daniel-yb added a commit that referenced this issue Feb 8, 2021
…e ysql namespaces for encrypted at rest universe

Summary:
backupUniverseKeyHistory gets called n times for n namespaces during a backup while the
original implementation assumed it would only be called once. This results in an exception being
thrown because it fails to create a file that already exists on subsequent calls to the function for the same backup. Long story short is that we should handle the
case that the file already exists and gracefully skip writing to the file.

Test Plan: Run a "all namespaces" YSQL backup

Reviewers: sanketh

Reviewed By: sanketh

Differential Revision: https://phabricator.dev.yugabyte.com/D10574
polarweasel pushed a commit to lizayugabyte/yugabyte-db that referenced this issue Mar 9, 2021
… namespaces for encrypted at rest universe

Summary:
backupUniverseKeyHistory gets called n times for n namespaces during a backup while the
original implementation assumed it would only be called once. This results in an exception being
thrown because it fails to create a file that already exists on subsequent calls to the function for the same backup. Long story short is that we should handle the
case that the file already exists and gracefully skip writing to the file.

Test Plan: Run a "all namespaces" YSQL backup

Reviewers: wesley, arnav, sb-yb, sanketh

Reviewed By: sanketh

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D10554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform Yugabyte Platform priority/high High Priority
Projects
None yet
Development

No branches or pull requests

1 participant