-
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
velero restore completed with Warning: could not restore, Velero restore completed with warning ConfigMap "kube-root-ca.crt" already exists #6818
Comments
@lipingxue The existingResourcePolicy meanning is |
Based on my impression this is working as expected. |
I disagree kube-root-ca.crt is a cluster-admin managed configmap. User of velero who decided to backup the whole cluster including namespaces contianing kube-root-ca.crt should be knowledgeable enough to know and aware of if kube-root-ca.crt was restored or not. If an item is in the backup, and restore skips because it already exists, user should know about it. |
Velero warns any time it did not restore a resource that 1) already exists in the cluster and 2) backup version differs from in-cluster version. This warning is useful for users because it will point out to them that they may need to look at these items to see whether they want to re-attempt restore with an Update policy or modify them manually, or whether they can ignore the differences. It's a warning, not an error, which means Velero restored everything as expected, but the warnings indicate areas that a user may want to verify. If your use case does not require verifying these "already in the cluster but different" items, you can always ignore the warnings, but if we remove the warnings, then users who need to verify this will have no way of knowing what they need to look at. |
I have the same problem,and my |
cc @xing-yang |
|
@xiaozuo7 @lipingxue this is a feature, not a bug. If you wanna override what's exists in cluster with what's in the backup then you can set existingresourcepolicy to update. |
It is a warning and should not be muted. One needs to know that velero did not attempt to override/update if not set explicitly. |
If you don't wanna risk overriding them but still want it in backup then explicitly exclude them from restore. |
Thanks for the reply. BTW, I would like to ask if there is an additional parameter option to skip or ignore the warning if it already exists. |
@xiaozuo7 There is no paramter to suppress restore warnings. I don't think that would be a good idea. The reason it's a warning and not an error is that the restore is not considered failed. This is potentially useful information -- it's up to the user whether to ignore the warnings, or look at them to determine relevance. In most cases, I'd say that users will ignore them unless something goes wrong (problem with post-restore application, etc.), then looking at the warnings would be the first thing to do. |
that means you don't care that the item is restored.. so excluding known problematic items from restore would give similar result to "ignore the warning". |
This warning was observed with Velero vSphere Plugin when restoring a namespace. Since the kube-controller-manager automatically recreates the kube-root-ca.crt ConfigMap upon restoration of a namespace, Velero will fail to restore the resource and issue the warning. The warning is consistent between both plugins. |
Thanks @varunsrinivasan2 for verifying this. This issue can be closed now. |
Thanks! |
What steps did you take and what happened:
Env:
Velero: velero/velero:v1.12.0-rc.1
Velero Plugin for CSI: velero/velero-plugin-for-csi:v0.6.0-rc.1
Velero Plugin for AWS: harbor-repo.vmware.com/cnsdpvelero/velero-plugin-for-aws:v1.1.0
Kubernetes: v1.26.5
The velero restore completed with warning : could not restore, ConfigMap "kube-root-ca.crt" already exists. Warning: the in-cluster version is different than the backed-up version.
namespace and pvc have been restored successfully.
What did you expect to happen:
velero restore should completed without warning. The warning message may confuse the user.
The following information will help us better understand what's going on:
If you are using velero v1.7.0+:
Please use
velero debug --backup <backupname> --restore <restorename>
to generate the support bundle, and attach to this issue, more options please refer tovelero debug --help
If you are using earlier versions:
Please provide the output of the following commands (Pasting long output into a GitHub gist or other pastebin is fine.)
kubectl logs deployment/velero -n velero
velero backup describe <backupname>
orkubectl get backup/<backupname> -n velero -o yaml
velero backup logs <backupname>
velero restore describe <restorename>
orkubectl get restore/<restorename> -n velero -o yaml
velero restore logs <restorename>
Anything else you would like to add:
Environment:
velero version
):velero client config get features
):kubectl version
):/etc/os-release
):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.
The text was updated successfully, but these errors were encountered: