velero: have problem when restoring crds

What steps did you take and what happened:

I have create 3 crds which named App,Component,Revision. every deployment i create have an ownerrefence field to relate it. when I delete the App object , the k8s gc will help to clean everything related to it. so I delete the crd I created to simulate a disaster. when i restore to the previous enviroment, I found the crds are not back. the log shows :

time="2020-06-16T15:06:38+08:00" level=info msg="Attempting to restore APIService: v1.neo.io" logSource="pkg/restore/restore.go:1070" restore=velero/velero-default-20200615144056-20200616150508
time="2020-06-16T15:06:41+08:00" level=info msg="Skipping restore of resource because it cannot be resolved via discovery" logSource="pkg/restore/restore.go:383" resource=apps.neo.io restore=velero/velero-default-20200615144056-20200616150508
time="2020-06-16T15:06:57+08:00" level=info msg="Skipping restore of resource because it cannot be resolved via discovery" logSource="pkg/restore/restore.go:383" resource=components.neo.io restore=velero/velero-default-20200615144056-20200616150508
time="2020-06-16T15:07:28+08:00" level=info msg="Skipping restore of resource because it cannot be resolved via discovery" logSource="pkg/restore/restore.go:383" resource=revisions.neo.io restore=velero/velero-default-20200615144056-20200616150508

What did you expect to happen:

I was expecting everything can be restored. but the crds is not. I checked the ownerrefence field , its empty now. I notice the log level is info, not error. I reacreate the crds manually and run restore again, then the app,component,revision object back , but the ownerrefence field is still empty. it seems the relationship between them are lost.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

@rnrsr and @sseago I am going to close this issue and follow this up in #2948 which has an associated PR as well. LMK if you disagree.

https://github.com/vmware-tanzu/velero/issues/2948 might explain why this is failing in 1.4.2 despite the fix.

@diemus This was fixed in v1.4.2 with PR https://github.com/vmware-tanzu/velero/pull/2683. Please upgrade to v1.4.2 to get the fix. I am going to close this issue. Please feel free to re-open if you are seeing this in v1.4.2