openebs-archive / node-disk-manager

Kubernetes Storage Device Management
https://openebs.io/docs
Apache License 2.0
182 stars 113 forks source link

NDM constantly modify blockdevice in cstor #684

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 the sequence of operations performed / commands you ran.] helm install 3.3.1

kubectl get bd -n openebs
NAME                                           NODENAME       SIZE            CLAIMSTATE   STATUS     AGE
blockdevice-102253af77d45d264eaac2e2d5ba230b   A   2147482582528   Unclaimed    Active     28h
blockdevice-8dd07a04e59af42d034d81f4a20516ab   B    2147482582528   Unclaimed    Inactive   50s

in B

lsblk 
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0    4G  0 disk 
sr0     11:0    1  492K  0 rom  
vda    253:0    0  200G  0 disk 
└─vda1 253:1    0  200G  0 part /
vdb    253:16   0    2T  0 disk 
└─vdb1 253:17   0    2T  0 part 

Follow this https://openebs.io/docs/troubleshooting/ndm I have wipe the disk, restart ndm pod on Node B

wipefs -fa /dev/vdb1
wipefs -fa /dev/vdb

but the block device still Inactive

kubectl get bd -n openebs
NAME                                           NODENAME       SIZE            CLAIMSTATE   STATUS     AGE
blockdevice-102253af77d45d264eaac2e2d5ba230b   A   2147482582528   Unclaimed    Active     29h
blockdevice-a2368ea3ef3a21d2b67d18109f41c6cb  B    2147482582528   Unclaimed    Inactive   107s

I compare the pod log on between A and B

 eventcode=ndm.blockdevice.create.success msg=Created blockdevice object in etcd rname=xxxxx

On A log after success the probe will stop but in B log ndm.blockdevice.deactivate.success or ndm.blockdevice.update.success constantly appear

ndm pod on Node B log openebs-ndm-vl694.log.zip

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

NAME READY STATUS RESTARTS AGE openebs-cstor-admission-server-664d6d5865-lpq5q 1/1 Running 0 44m openebs-cstor-csi-controller-0 6/6 Running 0 44m openebs-cstor-csi-node-2lkvm 2/2 Running 0 44m openebs-cstor-csi-node-8t54j 2/2 Running 0 44m openebs-cstor-csi-node-t6l2w 2/2 Running 0 44m openebs-cstor-cspc-operator-697b44b857-h7kld 1/1 Running 0 44m openebs-cstor-cvc-operator-668485f848-lg82n 1/1 Running 0 44m openebs-localpv-provisioner-5646cc6748-thc4b 1/1 Running 0 44m openebs-ndm-6j8cl 1/1 Running 0 44m openebs-ndm-jqblp 1/1 Running 0 44m openebs-ndm-operator-65fdff8c8d-nqv6d 1/1 Running 0 44m openebs-ndm-xpsk5 1/1 Running 0 44m

apiVersion: v1 items:

Environment: