openebs-archive / device-localpv

CSI Driver for using Local Block Devices
Apache License 2.0
26 stars 17 forks source link

fix(crash): fixing the BDD failure #55

Closed pawanpraka1 closed 2 years ago

pawanpraka1 commented 2 years ago

fixing the parsing logic, it was failing for this kind of output

MAJ:MIN RM          SIZE RO TYPE MOUNTPOINTS
loop0       7:0    0      49233920  1 loop 
loop1       7:1    0      64933888  1 loop 
loop2       7:2    0      71106560  1 loop 
loop3       7:3    0 1099511627776  0 loop 
└─loop3p1 259:0    0       9437184  0 part 
sda         8:0    0   15032385536  0 disk 
└─sda1      8:1    0   15030288384  0 part 
sdb         8:16   0   92341796864  0 disk 
├─sdb1      8:17   0   92225388032  0 part /var/lib/kubelet
│                                          /etc/hosts
│                                          /etc/hostname
│                                          /etc/resolv.conf
│                                          /dev/termination-log
│                                          /plugin
├─sdb14     8:30   0       4194304  0 part 

extra mount points for sdb1 is coming in the new line and causing index out of range crash.

Signed-off-by: Pawan pawan@mayadata.io