Huawei / eSDK_K8S_Plugin

Container-Storage-Interface (CSI) for Huawei storage
https://huawei.github.io/css-docs/
Apache License 2.0
85 stars 47 forks source link

driver crashes when doing volume clone #27

Closed sun7927 closed 1 year ago

sun7927 commented 3 years ago

When create a new volume from an existing pvc on Dorado 6.1, it will do the volume clone. However, the CSI driver will crash because of a code bug. The crash log is as following:

panic: interface conversion: interface {} is nil, not bool

goroutine 66 [running]: storage/oceanstor/volume.(SAN).waitCloneFinish(0xc00022f350, 0xc00049a000, 0xc00047a030, 0xc00049a000, 0x0) /root/compile-csi/src/storage/oceanstor/volume/san.go:756 +0x1d1 storage/oceanstor/volume.(SAN).createLocalLun(0xc00022f350, 0xc00022f320, 0xc00047a030, 0x7000104, 0x0, 0xffffffffffffffff) /root/compile-csi/src/storage/oceanstor/volume/san.go:244 +0x205 storage/oceanstor/volume.(SAN).createLocalLun-fm(0xc00022f320, 0xc00047a030, 0x2, 0xc00047a030, 0x0) /root/compile-csi/src/storage/oceanstor/volume/san.go:88 +0x3e utils/taskflow.(TaskFlow).Run(0xc0002e9768, 0xc00022f320, 0x4, 0x4, 0x5) /root/compile-csi/src/utils/taskflow/taskflow.go:44 +0x111 storage/oceanstor/volume.(SAN).Create(0xc00022f350, 0xc00022f320, 0x28, 0xc00022f2c0) /root/compile-csi/src/storage/oceanstor/volume/san.go:101 +0x45f csi/backend/plugin.(OceanstorSanPlugin).CreateVolume(0xc0000e8840, 0xc0002382d0, 0x28, 0xc00022f2c0, 0xc000258568, 0x0, 0xc000256311, 0x2d) /root/compile-csi/src/csi/backend/plugin/oceanstor-san.go:96 +0x113 csi/driver.(Driver).CreateVolume(0xc00000cd40, 0xade780, 0xc00022f050, 0xc00024c690, 0xc00000cd40, 0xc00028da10, 0x995960) /root/compile-csi/src/csi/driver/controller.go:72 +0x86f vendor/github.com/container-storage-interface/spec/lib/go/csi._Controller_CreateVolume_Handler(0xa1bd60, 0xc00000cd40, 0xade780, 0xc00022f050, 0xc000240e40, 0x0, 0x0, 0x0, 0xc0004180f0, 0xea) /root/compile-csi/src/vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go:5139 +0x23e vendor/google.golang.org/grpc.(Server).processUnaryRPC(0xc0002ca420, 0xae0880, 0xc0001f6d80, 0xc0002c8600, 0xc00028cdb0, 0xee7460, 0x0, 0x0, 0x0) /root/compile-csi/src/vendor/google.golang.org/grpc/server.go:995 +0x485 vendor/google.golang.org/grpc.(Server).handleStream(0xc0002ca420, 0xae0880, 0xc0001f6d80, 0xc0002c8600, 0x0) /root/compile-csi/src/vendor/google.golang.org/grpc/server.go:1275 +0xdf9 vendor/google.golang.org/grpc.(Server).serveStreams.func1.1(0xc000212ba0, 0xc0002ca420, 0xae0880, 0xc0001f6d80, 0xc0002c8600) /root/compile-csi/src/vendor/google.golang.org/grpc/server.go:710 +0x9f created by vendor/google.golang.org/grpc.(*Server).serveStreams.func1 /root/compile-csi/src/vendor/google.golang.org/grpc/server.go:708 +0xa1

YeYoot commented 1 year ago

I'm sorry for the late reply, but I think you've solved this problem.