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

restic restore failed for cstor volume #1689

Closed
mynktl opened this issue May 8, 2020 · 3 comments
Closed

restic restore failed for cstor volume #1689

mynktl opened this issue May 8, 2020 · 3 comments
Assignees
Milestone

Comments

@mynktl
Copy link
Contributor

mynktl commented May 8, 2020

What steps did you take and what happened:

  1. Created a backup, named A, of cstor volume, named V1, using velero-plugin
  2. Created restore of backup A which creates volume V2
  3. Created backup, named B, of volume V2 using restic instead of velero-plugin
  4. Created restore of backup B, which creates volume V3.

After creating restore, 4th step, restic is not able to restore the data and CVR are in error state.
[A clear and concise description of what the bug is, and what commands you ran.)

What did you expect to happen:
Restic restore should pass.

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 <maya-apiserver pod name> -n openebs (Optional)

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

root@k8s-virtual-machine:~# kubectl get pvc datadir-rd-0 -n redis -o yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    openebs.io/created-through: restore
    pv.kubernetes.io/bind-completed: "yes"
    pv.kubernetes.io/bound-by-controller: "yes"
    volume.beta.kubernetes.io/storage-provisioner: openebs.io/provisioner-iscsi
  creationTimestamp: "2020-04-10T09:19:51Z"
  finalizers:
  - kubernetes.io/pvc-protection
  labels:
    app: redis
  name: datadir-rd-0
  namespace: redis
  resourceVersion: "12039076"
  selfLink: /api/v1/namespaces/redis/persistentvolumeclaims/datadir-rd-0
  uid: 4a8fb625-1bab-464e-af39-9770577993bc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1G
  storageClassName: cstor-storage-class
  volumeMode: Filesystem
  volumeName: pvc-4a8fb625-1bab-464e-af39-9770577993bc
status:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 1G
  phase: Bound

Environment:

  • Maya version : 1.9
  • OpenEBS version : 1.9
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
@mynktl mynktl changed the title restic restore failed of cstor volume restic restore failed for cstor volume May 8, 2020
@mynktl mynktl self-assigned this May 8, 2020
@mynktl mynktl added this to the 1.10 milestone May 8, 2020
@mynktl
Copy link
Contributor Author

mynktl commented May 8, 2020

This happened because of annotation openebs.io/created-through: restore in PVC. Plugin or Maya-apiserver should remove this annotation once the PVC is bound.

@mynktl
Copy link
Contributor Author

mynktl commented May 12, 2020

velero-plugin apply the PVC, so better to handle PVC related operations from velero-plugin . Created an issue in velero-plugin for this openebs/velero-plugin#84

@mynktl
Copy link
Contributor Author

mynktl commented May 13, 2020

Fix is merged in openebs/velero-plugin#85 and release branch openebs/velero-plugin#86

@mynktl mynktl closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant