vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.79k stars 1.41k forks source link

Can not set to default when creating or modifying snapshot location #4493

Open danfengliu opened 2 years ago

danfengliu commented 2 years ago

Describe the problem/challenge you have Backup will fail if with no snapshot location parameters in backup cli, and there a number of snapshot locations from the same provider configured in Velero. According the message from backup, one of snapshot location should be as default, but can not find parameter in velero create snapshot location for this.

Logs:

Backup request "backup-test" submitted successfully.
Waiting for backup to complete. You may safely press ctrl-c to stop waiting - your backup will continue in the background.

Backup completed with status: FailedValidation. You may check for more information using the commands `velero backup describe backup-test` and `velero backup logs backup-test`.
velero backup describe backup-test
Name:         backup-test
Namespace:    velero
Labels:       velero.io/storage-location=default
Annotations:  velero.io/source-cluster-k8s-gitversion=v1.21.2+vmware.1
              velero.io/source-cluster-k8s-major-version=1
              velero.io/source-cluster-k8s-minor-version=21

Phase:  FailedValidation

Validation errors:  provider aws has more than one possible volume snapshot location, and none were specified explicitly or as a default

Errors:    0
Warnings:  0

Namespaces:
  Included:  kibishii
  Excluded:  <none>

Resources:
  Included:        *
  Excluded:        <none>
  Cluster-scoped:  auto

Label selector:  <none>

Storage Location:  default

Velero-Native Snapshot PVs:  true

Describe the solution you'd like

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

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.

reasonerjt commented 2 years ago

dup of #2426 ?

reasonerjt commented 2 years ago

Also noticed that https://github.com/vmware-tanzu/velero/pull/3561/ which reverted a change the commit message says

We are no longer adding the Credentials field to the VSL...

@zubron could you clarify what's the reason for this decision?

zubron commented 2 years ago

@reasonerjt This decision was made during the multiple credentials work for 1.6. It was initially proposed that we would allow the users to specify credentials for both storage location types but after discussion, it seemed to make less sense for the VSLs. For most cloud providers, it's not possible to take snapshots in different accounts so there isn't really a need to support multiple locations with unique credentials. This is different from the BSL case where it's possible to store the serialized contents of a backup in many storage locations.

This is something that will need to be addressed as part of the data movement work as the contents of snapshots may be moved to other storage locations and credentials will be needed to access both the source and the destination.

Adding support for the multiple VSLs credentials was proposed again in #4115.

qiuming-best commented 2 years ago

We have one workaround when doing backup & restore with multiply bsl & vsl is specify bsl and vsl in backup command, which will pass the backup validation. Here is a command example when backup: velero --namespace velero create backup restic-kibishii-test --include-namespaces kibishii --storage-location=bsl-additional --volume-snapshot-locations=vsl-additional --default-volumes-to-restic --wait