-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
#4067 Initial design of the new plugins - pre-post backup and restore #4083
Conversation
… and restore Signed-off-by: Rafael Brito <rbrito@vmware.com>
Let's review individually and discuss in the next community meeting before merging. |
|
||
Other examples of plugins that can use the proposed plugin hooks are | ||
|
||
- PostBackupAction: trigger a Velero Restore after a successful Velero backup (and complete the migration operation). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not be early enough to trigger a restore. We would want to hold off on triggering a restore until the backup was written to the backup store, since in a migration use case the restore would be run in a different cluster, and it can only reference the backup after the backup is written to the backup store and the destination cluster's velero instance syncs the backup. If PostBackupActiions are run after recordBackupMetrics but before persistBackup, this is probably the wrong place for triggering a migration restore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note from what we discussed during the 2021-09-14 community meeting: it is better for the postback plugins to run after the upload of the backup on the BSL. Why? We want to be positive the backup is really completed before doing any further operation. We want to have separate backup/restore phases for these plugins. Let's have their logs persisted separately as well. On the pre restore actions, run proactive sync on the BSL to make sure the latest backup is there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the changes on the design as per feedback from the last call. Will go for another round of feedback.
Signed-off-by: Rafael Brito <rbrito@vmware.com>
Signed-off-by: Rafael Brito <rbrito@vmware.com>
Would love to participate in discussions on this. Our team has a use case for this workflow, where currently we are asking users to run through a two step restore process, and using a post-restore/backup hook would enable us to abstract away the step for them. |
Please take a look here at this code: this is a functional implementation of this design, without the plugins logging - https://github.com/cschaefer-vmw/velero For the design, the only thing missing is defining how the logging of post-backup and post-restore plugins will act behind the scenes (the plan is expanding existent interfaces). |
Signed-off-by: Rafael Brito <rbrito@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Today, Velero's Restic integration is the response for such use cases, but there are some limitations: | ||
|
||
- Quiesce/unquiesce workloads: Pod hooks are useful for quiescing/unquiescing workloads, but platform engineers often do not have the luxury/visibility/time/knowledge to go through each pod in order to add specific commands to quiesce/unquiesce workloads. | ||
- Orphan PVC/PV pairs: PVCs/PVs that do not have associated running pods are not backed up and consequently, are not migrated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems more like a bug in Velero rather than something to work around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I thought there was already an issue about this topic, but if so I cannot find it now due to community/community#6403.
… and restore (vmware-tanzu#4083) * vmware-tanzu#4067 Initial design of the new plugins - pre-post backup and restore Signed-off-by: Rafael Brito <rbrito@vmware.com> * Update new-prepost-backuprestore-plugin-hooks.md * Updated design doc as per feedback Signed-off-by: Rafael Brito <rbrito@vmware.com> * Adding design changes as per feedback * Update design on prepost-backup-restore plugins * More color on how to call plugins Signed-off-by: Rafael Brito <rbrito@vmware.com> * Proposing annotations to skip plugin execution Signed-off-by: Rafael Brito <rbrito@vmware.com>
… and restore (vmware-tanzu#4083) * vmware-tanzu#4067 Initial design of the new plugins - pre-post backup and restore Signed-off-by: Rafael Brito <rbrito@vmware.com> * Update new-prepost-backuprestore-plugin-hooks.md * Updated design doc as per feedback Signed-off-by: Rafael Brito <rbrito@vmware.com> * Adding design changes as per feedback * Update design on prepost-backup-restore plugins * More color on how to call plugins Signed-off-by: Rafael Brito <rbrito@vmware.com> * Proposing annotations to skip plugin execution Signed-off-by: Rafael Brito <rbrito@vmware.com>
Signed-off-by: Rafael Brito rbrito@vmware.com
Thank you for contributing to Velero!
Please add a summary of your change
Velero should provide a way to trigger actions before and after each backup and restore.
Important: These proposed plugin hooks are fundamentally different from the existing plugin hooks, BackupItemAction and RestoreItemAction, which are triggered per item during backup and restore, respectively.
The proposed plugin hooks are to be executed only once.
Does your change fix a particular issue?
Fixes #(issue)
#4067
Please indicate you've done the following:
/kind changelog-not-required
.site/content/docs/main
.