Velero: No cli option to delete a backup location (Velero 1.1.0)

Created on 27 Dec 2019  路  5Comments  路  Source: vmware-tanzu/velero

What steps did you take and what happened:

  • create backup location as follows:
velero backup-location create source-cluster --provider azure --bucket mycontainer --access-mode=ReadOnly
  • locations are created:
[aks-velero]$ velero get backup-locations
NAME             PROVIDER   BUCKET/PREFIX     ACCESS MODE
default          azure      hercontainer   ReadWrite
source-cluster   azure      mycontainer   ReadOnly
  • Try to delete the backup location
[ aks-velero]$ velero backup-location delete source-cluster
Work with backup storage locations

Usage:
  velero backup-location [command]
....

What did you expect to happen:

  • backup location metadata/configuration is deleted.

The output of the following commands will help us better understand what's going on:
(Pasting long output into a GitHub gist or other pastebin is fine.)

  • kubectl logs deployment/velero -n velero
time="2019-12-27T05:33:55Z" level=info msg="setting log-level to INFO" logSource="pkg/cmd/server/server.go:168"
time="2019-12-27T05:33:55Z" level=info msg="Starting Velero server v1.1.0 (a357f21aec6b39a8244dd23e469cc4519f1fe608)" logSource="pkg/cmd/server/server.go:170"
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=BackupItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/pod
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=BackupItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/pv
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=BackupItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/service-account
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=VolumeSnapshotter logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/aws
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=VolumeSnapshotter logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/azure
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=VolumeSnapshotter logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/gcp
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=ObjectStore logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/aws
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=ObjectStore logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/azure
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=ObjectStore logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/gcp
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/add-pv-from-pvc
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/add-pvc-from-pod
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/change-storage-class
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/job
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/pod
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/restic
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/service
time="2019-12-27T05:33:55Z" level=info msg="registering plugin" command=/velero kind=RestoreItemAction logSource="pkg/plugin/clientmgmt/registry.go:100" name=velero.io/service-account
time="2019-12-27T05:33:55Z" level=info msg="Checking existence of namespace" logSource="pkg/cmd/server/server.go:336" namespace=velero
time="2019-12-27T05:33:55Z" level=info msg="Namespace exists" logSource="pkg/cmd/server/server.go:342" namespace=velero
time="2019-12-27T05:33:58Z" level=info msg="Checking existence of Velero custom resource definitions" logSource="pkg/cmd/server/server.go:371"
time="2019-12-27T05:33:58Z" level=info msg="All Velero custom resource definitions exist" logSource="pkg/cmd/server/server.go:405"
time="2019-12-27T05:33:58Z" level=info msg="Checking that all backup storage locations are valid" logSource="pkg/cmd/server/server.go:412"
An error occurred: some backup storage locations are invalid: error getting backup store for location "source-cluster": rpc error: code = Unknown desc = unable to get all required config values: the following keys do not have values: resourceGroup, storageAccount

Anything else you would like to add:

  • I'd like to update the configuration for the backup location but it's unclear how to do so without the ability to delete and re-create it ...

Environment:

  • Velero version (use velero version):
[$ velero version
Client:
        Version: v1.1.0
        Git commit: a357f21aec6b39a8244dd23e469cc4519f1fe608

  • Velero features (use velero client config get features):
[ aks-velero]$ velero client config get features
features: <NOT SET>
  • Kubernetes version (use kubectl version):
kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:44:30Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.8", GitCommit:"1da9875156ba0ad48e7d09a5d00e41489507f592", GitTreeState:"clean", BuildDate:"2019-11-14T05:19:20Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes installer & version:

Azure AKS

  • Cloud provider or hardware configuration:

Azure

  • OS (e.g. from /etc/os-release):

CentOS 7

AreCLI EnhancemenUser Good first issue Help wanted P3 - Wouldn't it be nice if...

Most helpful comment

@archmangler for now, you can either kubectl -n velero delete backupstoragelocation.velero.io <NAME> to delete your BSL, or kubectl -n velero edit backupstoragelocation.velero.io <NAME> to update its config.

Agree that we should at least add the delete CLI command to velero, and possibly an edit command as well.

All 5 comments

@archmangler for now, you can either kubectl -n velero delete backupstoragelocation.velero.io <NAME> to delete your BSL, or kubectl -n velero edit backupstoragelocation.velero.io <NAME> to update its config.

Agree that we should at least add the delete CLI command to velero, and possibly an edit command as well.

Hello, I'm very new to open source community. For the last few weeks I'm attending to weekly meetings as well. If it's ok, I want to work on this issue.

Hello, I'm very new to open source community. For the last few weeks I'm attending to weekly meetings as well. If it's ok, I want to work on this issue.

There is already a PR https://github.com/vmware-tanzu/velero/pull/2845 for this, maybe you could consider work with @davidboxboro.

Hi @ramazankilimci apologies for the delay in responding. There was no activity on PR #2845, so please let me know if you'd like to get started on this and I'll assign it to you.

Hi @carlisia thank you for your comment. I really want to work on it. Please assign it to me.

Was this page helpful?
0 / 5 - 0 ratings