velero: Disk snapshots fail on GCP regional volumes

What steps did you take and what happened: When using regional volumes on GCP, backups fail with the error below. Here is a basic configuration for creating a PVC backed by a regional volume.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: regional-magnetic
provisioner: kubernetes.io/gce-pd
parameters:
  type: pd-standard
  replication-type: regional-pd
  zones: us-central1-b, us-central1-c
reclaimPolicy: Retain
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: regionalVol
  labels:
    app: foo
spec:
  storageClassName: regional-magnetic
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  gcePersistentDisk:
    fsType: ext4
    pdName: regionalVol
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: regionalPVC
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: regional-magnetic
  selector:
    matchLabels:
      app: foo
  resources:
    requests:
      storage: 10Gi

What did you expect to happen: I expected the snapshots to be created similarly as they are for non-regional volumes.

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

time="2018-08-14T05:56:14Z" level=error msg="backup failed" error="[error creating snapshot: rpc error: code = Unknown desc = googleapi: Error 400: Invalid value 'us-central1-f__us-central1-c'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', invalidParameter, error creating snapshot: rpc error: code = Unknown desc = googleapi: Error 400: Invalid value 'us-central1-b__us-central1-c'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', invalidParameter, error creating snapshot: rpc error: code = Unknown desc = googleapi: Error 400: Invalid value 'us-central1-f__us-central1-c'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', invalidParameter, error creating snapshot: rpc error: code = Unknown desc = googleapi: Error 400: Invalid value 'us-central1-b__us-central1-c'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', invalidParameter]" key=heptio-ark/my-backup logSource="pkg/controller/backup_controller.go:280"

Environment:

  • Ark version (use ark version): 0.9.3

  • Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-18T11:37:06Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.5-gke.4", GitCommit:"6265b9797fc8680c8395abeab12c1e3bad14069a", GitTreeState:"clean", BuildDate:"2018-08-04T03:47:40Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes installer & version: gke
  • Cloud provider or hardware configuration: gcp

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

@bartimar we have a PR in flight for this – look for it in an upcoming patch release (we do these every 2 weeks on thursdays)

Sounds like that will have to be the way forward, doesn’t it?