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
Design doc for RestoreItemAction wait for AdditionalItems to be ready #2867
Conversation
93611bb
to
b330fa9
Compare
design/wait-for-additional-items.md
Outdated
|
||
## Background | ||
|
||
Because Velero does not wait after restoring additoonal items to |
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.
s/additioonal/additional
I'm going to update this shortly with a third implementation option which should get rid of the need for making interface changes. Instead of adding a new func to either an existing or new interface, we could replace the |
Thanks @sseago! I know you're working on this, so I'm likely to review after the v1.5.0 release and you're a little further along. I'll also be on vacation from Sept 4 to Sept 14th, so it's probably going to be after that, just to set expectations. One question I do have - are you/your team able to sign up for implementation of this once approved? |
@nrb Yes, my plan was to put together a PR to implement this once we got sign-off on the design. I expect one more update to the design before it's ready to review -- to propose a third alternative which I think will eliminate both the backwards-compatibilty problem and the need to define a new optional interface, as I mention in the above comment. I may get to it today, or tomorrow at the latest. Either way I assume your current priority is getting 1.5.0 out the door. |
a294d15
to
19d83ad
Compare
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.
So far I think this is reasonable.
I like the idea of making the AdditionalItemsReadyFunc
a pointer so that not all RestoreItemAction plugins have to implement it.
I do still have a few questions on specific areas, and would like to hear from the rest of @vmware-tanzu/velero-maintainers
19d83ad
to
76ec924
Compare
Updated with the |
@vmware-tanzu/velero-maintainers Please give this a review. |
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.
@sseago Thanks for this proposal and apologies for not looking at this sooner.
I added a couple of comments. PTAL. Happy to discuss further either in the PR or in a separate design meeting. I can schedule a design meeting if that is preferred.
design/wait-for-additional-items.md
Outdated
https://github.com/vmware-tanzu/velero/blob/main/pkg/restore/restore.go#L623 | ||
This func should also be defined within restore.go | ||
|
||
Instead of the one minute CRD timeout, we'll use |
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.
resourceTerminatingTimeout
is not meant to be used for this purpose. Suggest creating a different constant/config for this.
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.
I agree that a different method of determining it would be better. I didn't include that in the design as I wasn't sure what made more sense. We can include it as a restore option as suggested above, although we'll need to provide a sensible default (perhaps via a new const). We could also allow plugin-level overriding, but it's not obvious whether or not we need that additional complexity and if we add it, what the priority would be for using. Perhaps first priority is to use the value set on the restore CR, if provided. Then plugin-level value (in the plugin RestoreItemExecuteOutput
struct), and if both are empty, use something defined in a const.
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.
I think I'm missing something but what would it look like for the timeout value to be configurable at the plugin level? Is it possible under the current plugin model for specific configuration to be passed in when the plugins are being added? Or did you mean that different plugins would define how long they would wait but it would be a fixed duration?
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.
So one way to do it which avoids having to change any existing plugins that don't need the new functionality is to add an additional (optional) timeout field to the RestoreItemActionExecuteOutput
struct. When the Execute
func returns, it could add this from a const defined within the plugin implementation. We already have one field we're adding to this struct to define the "wait for ready" func, and based on recent review comments, we may be adding another bool field which velero will use to decide whether to wait at all for this plugin (instead of overloading the func return value for this, to allow for a default "does Get
return it?" implementation. That's what I was considering for the next update.
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.
Adding a timeout field in the RestoreItemActionExecuteOutput
with a new const for a default seems reasonable to me.
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 LGTM.
The only pending comment is about adding a timeout field in the RestoreItemActionExecuteOutput
struct.
design/wait-for-additional-items.md
Outdated
https://github.com/vmware-tanzu/velero/blob/main/pkg/restore/restore.go#L623 | ||
This func should also be defined within restore.go | ||
|
||
Instead of the one minute CRD timeout, we'll use |
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.
Adding a timeout field in the RestoreItemActionExecuteOutput
with a new const for a default seems reasonable to me.
76ec924
to
f1cf1d8
Compare
@ashish-amarnath I've updated the timeout section to include a new server-wide value specified in |
f1cf1d8
to
0a0a2a7
Compare
Signed-off-by: Scott Seago <sseago@redhat.com>
0a0a2a7
to
d11ce50
Compare
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.
Thanks for your time and effort on this, @sseago! I think this proposed design looks good and I don't have any additional questions or comments. Thanks for addressing them all! 👍
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 LGTM! Thanks for addressing the comments.
Leaving the merge to @nrb
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 lgtm. Deferring to @nrb.
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.
Thanks for your effort and patience on this @sseago!
…vmware-tanzu#2867) Signed-off-by: Scott Seago <sseago@redhat.com>
…vmware-tanzu#2867) Signed-off-by: Scott Seago <sseago@redhat.com>
…vmware-tanzu#2867) Signed-off-by: Scott Seago <sseago@redhat.com>
…vmware-tanzu#2867) Signed-off-by: Scott Seago <sseago@redhat.com>
…vmware-tanzu#2867) Signed-off-by: Scott Seago <sseago@redhat.com>
…vmware-tanzu#2867) Signed-off-by: Scott Seago <sseago@redhat.com>
Design for #1350