openshift / openshift-velero-plugin

General Velero plugin for backup and restore of openshift workloads.
Apache License 2.0
48 stars 38 forks source link

Backup of SCC is failing #98

Closed pradeep288 closed 3 years ago

pradeep288 commented 3 years ago

Steps followed:

  1. Create a namespace called test-ns1 on openShift Cluster.
  2. Create new Service Account useroot and add it to the anyuid SCC
    $ oc create serviceaccount useroot -n test-ns1
    $ oc adm policy add-scc-to-user anyuid -z useroot -n test-ns1
  3. Create a DeploymentConfig running with Service Account useroot
  4. Take the backup of the namespace test-ns1 using velero

Backup of SCC fails with the error

level=error msg="the server could not find the requested resource (get securitycontextconstraints.security.openshift.io)" backup=velero-openshift/migration-copy-sample cmd=/plugins/velero-plugins logSource="/opt/app-root/src/github.com/konveyor/openshift-velero-plugin/velero-plugins/serviceaccount/backup.go:90" pluginName=velero-plugins

time="2021-08-04T12:07:25Z" level=error msg="Error backing up item" backup=velero-openshift/migration-copy-sample error="error executing custom action (groupResource=serviceaccounts, namespace=test-ns, name=builder): rpc error: code = Unknown desc = the server could not find the requested resource (get securitycontextconstraints.security.openshift.io)" error.file="/go/src/github.com/vmware-tanzu/velero/pkg/backup/item_backupper.go:331" error.function="github.com/vmware-tanzu/velero/pkg/backup.(*itemBackupper).executeActions" logSource="pkg/backup/backup.go:441" name=builder

Am I missing anything here?

pradeep288 commented 3 years ago

closing this issue, as i had wrongly configured velero