mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cleanup: do not panic on invalid drivername
When the cephcsi executable receives an error when calling util.ValidateDriverName(), it panics due to klog.Fatalln(). The error that util.ValidateDriverName() returns should be understandable enough, so that users know what to investigate. A Go panic on a user error is not very userfriendly, and does not provide any additional usefil information. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
79e91fa894
commit
23817c1a83
@ -129,7 +129,7 @@ func main() {
|
||||
dname := getDriverName()
|
||||
err := util.ValidateDriverName(dname)
|
||||
if err != nil {
|
||||
klog.Fatalln(err) // calls exit
|
||||
logAndExit(err.Error())
|
||||
}
|
||||
|
||||
// the driver may need a higher PID limit for handling all concurrent requests
|
||||
|
Loading…
Reference in New Issue
Block a user