openebs-archive / jiva

CAS Data Engine - iSCSI Distributed Block Storage Controller built-in Go
https://openebs.io
Apache License 2.0
142 stars 66 forks source link

jivavolume keep pending #366

Open 631068264 opened 1 year ago

631068264 commented 1 year ago

What steps did you take and what happened: [A clear and concise description of what the bug is, and what commands you ran.)

Use helm install openebs-3.3.1

helm install openebs openebs-3.3.1.tgz --set jiva.enabled=true -n openebs

install success

kubectl get pod -n openebs

NAME                                           READY   STATUS    RESTARTS   AGE
openebs-jiva-csi-controller-0                  5/5     Running   0          116s
openebs-jiva-csi-node-5zv5g                    3/3     Running   0          116s
openebs-jiva-csi-node-ccps8                    3/3     Running   0          116s
openebs-jiva-csi-node-fwtzf                    3/3     Running   0          116s
openebs-jiva-operator-f994f6868-hftwx          1/1     Running   0          116s
openebs-localpv-provisioner-77c9bcfd96-n2nf8   1/1     Running   0          116s
openebs-ndm-8dbzp                              1/1     Running   0          116s
openebs-ndm-operator-5d55748dfd-cmv6n          1/1     Running   0          116s
openebs-ndm-rvcr8                              1/1     Running   0          116s
openebs-ndm-ztwxn                              1/1     Running   0          116s

Then I use this to test

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: example-jiva-csi-pvc
spec:
  storageClassName: openebs-jiva-csi-default
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 4Gi
---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: busybox
  labels:
    app: busybox
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: busybox
  template:
    metadata:
      labels:
        app: busybox
    spec:
      containers:
      - resources:
          limits:
            cpu: 0.5
        name: busybox
        image: busybox
        command: ['sh', '-c', 'echo Container 1 is Running ; sleep 3600']
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 3306
          name: busybox
        volumeMounts:
        - mountPath: /var/lib/mysql
          name: demo-vol1
      volumes:
      - name: demo-vol1
        persistentVolumeClaim:
          claimName: example-jiva-csi-pvc

pod about pvc are running

pvc-7c04c4c0-8f23-44b2-b7d9-e5cb6a371922-jiva-ctrl-6c66f965hq5x   2/2     Running   0          17m
pvc-7c04c4c0-8f23-44b2-b7d9-e5cb6a371922-jiva-rep-0               1/1     Running   0          17m
pvc-7c04c4c0-8f23-44b2-b7d9-e5cb6a371922-jiva-rep-1               1/1     Running   1          17m
pvc-7c04c4c0-8f23-44b2-b7d9-e5cb6a371922-jiva-rep-2               1/1     Running   0          17m

the pvc create successfully

image

but pod cant't attach the volume

image

The jivavolume is pending not Ready

kubectl get jivavolume -n openebs

NAME                                       REPLICACOUNT   PHASE     STATUS
pvc-7c04c4c0-8f23-44b2-b7d9-e5cb6a371922                  Pending   

And I can't find any error log in jiva-ctl and jiva-rep

What did you expect to happen:

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.)

jiva-log.tar.gz

this contain jiva-ctrl and jiva-rep log

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

Environment:

631068264 commented 1 year ago

Finally found this in openebs-jiva-operator

level=error msg="failed to bootstrap volume pvc-3dfd0744-51bf-41fd-a719-e9ab4e48360d, due to error: failed to get the pod disruption budget details: pvc-3dfd0744-51bf-41fd-a719-e9ab4e48360d-pdb: no matches for kind \"PodDisruptionBudget\" in version \"policy/v1\""

k8s 1.19.16 is too old for jiva 3.3.0 but the doc told me 1.80 or higher is OK .