fix empty volume group creation through cli tool#767
Conversation
088819c to
4409e17
Compare
nixpanic
left a comment
There was a problem hiding this comment.
Thanks @Nikhil-Ladha, the change looks good to me.
Can you explain a little more about the csi panics? Is there a particular CSI driver that has a problem with an empty volume-id? If so, please report that as a bug against the driver too.
The rbd ceph-csi driver panics when I try to create the VolumeGroup though CLI with an empty volumeid list. The following is the error on CLI: And, the below is the csi-rbdplugin container logs: Notice the |
when creating empty volume group through cli, the strings.Split() function returns a [""] value, i.e, a slice of length 1 having the value as 1 `[""]` empty string. As a result, csi panics when it tries to find the volumeID with the respective value. Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
4409e17 to
db71f1b
Compare
This code seems to return an error when the volume-id can not be found. I do not think there is a bug in the current Ceph-CSI implementation for this. You seem to have a different/modified version (line numbers do not match or exist ( It should be safe to pass an empty volume-id to any Ceph-CSI gRPC procedures, and Ceph-CSI should definitely not crash. If you hit such a problem, please create an issue against Ceph-CSI for that. Thank! |
Yeah, I have few changes included for VGR testing.
It is safe to pass an empty id, and with this change that is verified. |
when creating empty volume group through cli, the strings.Split() function returns a [""] value, i.e, a slice of length 1 having the value as 1 (
[""]) empty string. As a result, the csi panics when it tries to find the volumeID with the respective value.