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

Incorrect Backup CR config for CSI backup causes backup to fail due to runtime error #5400

Closed
shubham-pampattiwar opened this issue Sep 26, 2022 · 0 comments · Fixed by #5401 or #5429
Assignees
Labels
Area/CSI Related to Container Storage Interface support

Comments

@shubham-pampattiwar
Copy link
Collaborator

shubham-pampattiwar commented Sep 26, 2022

What steps did you take and what happened:
When we try to use Velero backup for CSI volumes via incorrect Backup CR config, the backup fails due to nil pointer dereference and velero pod restarts. For example:

apiVersion: velero.io/v1
kind: Backup
metadata:
  name: cluster-pvcs
  namespace: openshift-adp
spec:
  csiSnapshotTimeout: 10m0s
  defaultVolumesToRestic: false
  includedNamespaces:
    - '*'
  includedResources:
    - PersistentVolumeClaim
  labelSelector:
    matchLabels:
      oadp-backup: 'true'
  storageLocation: openshift-backups-1
  ttl: 24h0m0s

This backup CR will cause incomplete execution of the velero-plugin-for-csi as the includedResources only consists of PVC and thus excluded VolumeSnapshots, VolumeSnapshotContents etc.

Error logs in velero pod as velero tries to delete resources that do not exist:

2022/09/15 02:23:35  info Waiting for CSI driver to reconcile volumesnapshot mssql-persistent/velero-mssql-pvc-f7x6j. Retrying in 5s
2022/09/15 02:23:40  info Waiting for CSI driver to reconcile volumesnapshot mssql-persistent/velero-mssql-pvc-f7x6j. Retrying in 5s
2022/09/15 02:23:45  info Waiting for CSI driver to reconcile volumesnapshot mssql-persistent/velero-mssql-pvc-f7x6j. Retrying in 5s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1a8b3cd]

goroutine 2372 [running]:
github.com/vmware-tanzu/velero/pkg/controller.(*backupController).deleteVolumeSnapshot.func1(0xc000d5e140)
        /remote-source/src/github.com/vmware-tanzu/velero/pkg/controller/backup_controller.go:949 +0xad
created by github.com/vmware-tanzu/velero/pkg/controller.(*backupController).deleteVolumeSnapshot
        /remote-source/src/github.com/vmware-tanzu/velero/pkg/controller/backup_controller.go:945 +0xf7

What did you expect to happen:
Backup to complete successfully

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CSI Related to Container Storage Interface support
Projects
None yet
3 participants