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

Restoring GCP Regional pv error #1183

Closed
christianlafleur opened this issue Feb 5, 2019 · 3 comments
Closed

Restoring GCP Regional pv error #1183

christianlafleur opened this issue Feb 5, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@christianlafleur
Copy link

christianlafleur commented Feb 5, 2019

Description

Restore for regional storage class on GCP fail with this error : Invalid value for field 'resource.replicaZones[0]': ''. Exactly 2 replica zones must be set for regional disks

Standard storage class restore is working.

The output of the following commands will help us better understand what's going on:

ark create restore test2 --from-backup full01-20190204180049 --include-namespaces chris-test
Restore request "test2" submitted successfully.

ark describe restore test2
Name: test2
Namespace: heptio-ark
Labels:
Annotations:

Backup: full01-20190204180049

Namespaces:
Included: chris-test
Excluded:

Resources:
Included: persistentvolumes
Excluded: nodes, events, events.events.k8s.io, backups.ark.heptio.com, restores.ark.heptio.com
Cluster-scoped: auto

Namespace mappings:

Label selector:

Restore PVs: auto

Phase: Completed

Validation errors:

Warnings:
Ark:
Cluster:
Namespaces:

Errors:
Ark:
Cluster: error executing PVAction for /tmp/878522100/resources/persistentvolumes/cluster/pvc-0c5099ee-289f-11e9-bbb9-42010aa20034.json: rpc error: code = Unknown desc = googleapi: Error
400: Invalid value for field 'resource.replicaZones[0]': ''. Exactly 2 replica zones must be set for regional disks., invalid
Namespaces:

Anything else you would like to add:

kubectl get pv pvc-5d8cb4c0-28bf-11e9-bbb9-42010aa20034 --show-labels

NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE LABELS
pvc-5d8cb4c0-28bf-11e9-bbb9-42010aa20034 10Gi RWO Delete Bound chris-test/pvc-regional regional 56s failure-domain.beta.kubernetes.io/region=northamerica-northeast1,failure-domain.beta.kubernetes.io/zone=northamerica-northeast1-a__northamerica-northeast1-b

Environment:

  • Ark version (use ark version): 0.10.1
  • Kubernetes version (use kubectl version): v1.10.7
  • Kubernetes installer & version: "v1.10.11-gke.1"
  • Cloud provider or hardware configuration: GKE
@nrb
Copy link
Contributor

nrb commented Feb 5, 2019

Thanks for the bug report! Would you mind also providing the output of kubectl get pv kubectl get pv pvc-5d8cb4c0-28bf-11e9-bbb9-42010aa20034 -o yaml?

@christianlafleur
Copy link
Author

apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
kubernetes.io/createdby: gce-pd-dynamic-provisioner
pv.kubernetes.io/bound-by-controller: "yes"
pv.kubernetes.io/provisioned-by: kubernetes.io/gce-pd
creationTimestamp: 2019-02-04T20:56:42Z
finalizers:

  • kubernetes.io/pv-protection
    labels:
    failure-domain.beta.kubernetes.io/region: northamerica-northeast1
    failure-domain.beta.kubernetes.io/zone: northamerica-northeast1-a__northamerica-northeast1-b
    name: pvc-5d8cb4c0-28bf-11e9-bbb9-42010aa20034
    resourceVersion: "146304170"
    selfLink: /api/v1/persistentvolumes/pvc-5d8cb4c0-28bf-11e9-bbb9-42010aa20034
    uid: 5fc9b00d-28bf-11e9-bbb9-42010aa20034
    spec:
    accessModes:
  • ReadWriteOnce
    capacity:
    storage: 10Gi
    claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: pvc-regional
    namespace: chris-test
    resourceVersion: "146304136"
    uid: 5d8cb4c0-28bf-11e9-bbb9-42010aa20034
    gcePersistentDisk:
    fsType: ext4
    pdName: gke-devl01-671c7607-dy-pvc-5d8cb4c0-28bf-11e9-bbb9-42010aa20034
    persistentVolumeReclaimPolicy: Delete
    storageClassName: regional
    status:
    phase: Bound

@nrb
Copy link
Contributor

nrb commented Feb 7, 2019

Thanks for that, @christianlafleur. I've managed to replicate the issue and have a fixed that I've tested locally. I'm going to clean up the code, add some tests, then push up a PR.

@nrb nrb self-assigned this Feb 7, 2019
@nrb nrb added the Bug label Feb 7, 2019
nrb added a commit to nrb/velero that referenced this issue Feb 7, 2019
To create a regional disk, the URLs for the zones in which the disk is
replicated must be provided to the GCP API.A

Fixes vmware-tanzu#1183

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
nrb added a commit to nrb/velero that referenced this issue Feb 7, 2019
To create a regional disk, the URLs for the zones in which the disk is
replicated must be provided to the GCP API.

Fixes vmware-tanzu#1183

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
@skriss skriss added this to the v0.11.0 milestone Feb 11, 2019
nrb added a commit to nrb/velero that referenced this issue Feb 12, 2019
To create a regional disk, the URLs for the zones in which the disk is
replicated must be provided to the GCP API.

Fixes vmware-tanzu#1183

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants