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

Resource status restore doesn't work for resources which has been exist, even though existingResourcePolicy is set to update #7994

Closed
nfyxhan opened this issue Jul 10, 2024 · 11 comments

Comments

@nfyxhan
Copy link

nfyxhan commented Jul 10, 2024

What steps did you take and what happened:

a resource is exist in the cluster,edit its metadata and status, and then restore it, only metadata can be update, but status not

metadata:
    labels: 
       someunsync: true
status: 
    message: unsync

What did you expect to happen:
both of the metadata and status should be update

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@Lyndon-Li
Copy link
Contributor

Lyndon-Li commented Jul 10, 2024

Status restore is not controlled by the existingResourcePolicy.
Status restore is not enabled by default either, you should use --status-include-resources restore flag to enable it for the specified resources.

@Lyndon-Li
Copy link
Contributor

An open issue requesting the doc for --status-include-resources, #6237

@nfyxhan
Copy link
Author

nfyxhan commented Jul 10, 2024

#6237
--status-include-resources can work when the first time to restore, the second time can't work if I do not delete the resources which are the first time to restore .
when fromCluster is not nil, it will return

image

@Lyndon-Li
Copy link
Contributor

The existingResourcePolicy doesn't cover restore of status, if this is required in your case, just share more details of your scenarios, so that we can prioritize the requirement.

@nfyxhan
Copy link
Author

nfyxhan commented Jul 11, 2024

The existingResourcePolicy doesn't cover restore of status, if this is required in your case, just share more details of your scenarios, so that we can prioritize the requirement.

We've modified the code here to rebuild a binary package that bypasses both of these issues

image

@kaovilai
Copy link
Contributor

So perhaps call this update+status?

Or would this fit under existing update?

wdyt @shubham-pampattiwar

@shubham-pampattiwar
Copy link
Collaborator

@kaovilai I believe more details around the scenarios why we need this would help. The initial thought of ExistingResourcePolicy was around object's metadata and spec I believe. Also, IMO status of CR is something that is updated/patched by its controller.

@nfyxhan
Copy link
Author

nfyxhan commented Jul 15, 2024

I have two clusters A and B, the first time I restore the CRD of cluster A to cluster B, and then the controller runs in cluster B for a period of time, and then restore the CRD to cluster A, the status needs to be restored. @Lyndon-Li @shubham-pampattiwar

@Lyndon-Li
Copy link
Contributor

@nfyxhan
We agree that the status should be restored in order to make the behavior consistent with the metadata restore; however, we also think status restore is seldomly required.
Could you share your concrete requirement on status restore? Your requirement will help us to prioritize our tasks.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.

Copy link

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants