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

Static provision (dory) & patch command resulting PV in failed status after removing PVC #50

Open
prablr79 opened this issue Apr 10, 2019 · 0 comments

Comments

@prablr79
Copy link

Static provisioning showed failed status of PV after executing patch command to change reclaim policy and deleting respective POD & PVC.

Steps performed:-

  1. Created PV,PVC & POD.
  2. changed default reclaim policy to delete by executing command "kubectl patch pv -p '{"spec":{"persistentVolumeReclaimPolicy":"Delete"}}'".
  3. Deleted POD & PVC.
  4. Checked status of PV, it went in "failed" status.
  5. Checked created volume, it was still present.

Observation:-

  1. Patch command to change reclaim policy is not properly supported in static provision.
  2. After changing reclaim policy through patch command and deleting POD & PVC, PV goes in failed state.
  3. If we do not execute patch command then PV status going in "Released" state after deleting POD & PVC.
  4. In case of PV status in "Released", if I create PVC again then PVC stucks at "Pending" status.
  5. Volume still exist after removing POD,PVC & PV. (after changing reclaim policy as delete too in static provision).
  6. If we inspect corresponding volume, it shows "No such volume" error but still can see volume entry in "docker volume ls" command.

Note:- No log getting generated for dory service, didn't get any log for above use case.

YAML's:

PV-IMPORTVOL.yml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-importvol
spec:
    capacity:
      storage: 35Gi
    accessModes:
    - ReadWriteOnce
    flexVolume:
      driver: hpe.com/hpe
      options:
        name: VOLUME1
        backend: 3PAR1

pvc.yml

apiVersion: v1
metadata:
  name: pvc-import
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 16Gi

pod.yml

apiVersion: v1
kind: Pod
metadata:
  name: pod-import
spec:
  containers:
  - name: minio
    image: minio/minio:latest
    args:
    - server
    - /export
    env:
    - name: MINIO_ACCESS_KEY
      value: minio
    - name: MINIO_SECRET_KEY
      value: doryspeakswhale
    ports:
    - containerPort: 9000
    volumeMounts:
    - name: export
      mountPath: /export
  volumes:
    - name: export
      persistentVolumeClaim:
        claimName: pvc-import

Note:- I have checked same setup with old dory binary (Version=1.1.0-ba064b80), able to reproduce same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant