mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Only return CSI driver registration error
This commit is contained in:
parent
7944fed44b
commit
d6c642b46a
@ -147,20 +147,16 @@ func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string,
|
||||
|
||||
driverNodeID, maxVolumePerNode, accessibleTopology, err := csi.NodeGetInfo(ctx)
|
||||
if err != nil {
|
||||
klog.Error(log("registrationHandler.RegisterPlugin failed at CSI.NodeGetInfo: %v", err))
|
||||
if unregErr := unregisterDriver(pluginName); unregErr != nil {
|
||||
klog.Error(log("registrationHandler.RegisterPlugin failed to unregister plugin due to previous error: %v", unregErr))
|
||||
return unregErr
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
err = nim.InstallCSIDriver(pluginName, driverNodeID, maxVolumePerNode, accessibleTopology)
|
||||
if err != nil {
|
||||
klog.Error(log("registrationHandler.RegisterPlugin failed at AddNodeInfo: %v", err))
|
||||
if unregErr := unregisterDriver(pluginName); unregErr != nil {
|
||||
klog.Error(log("registrationHandler.RegisterPlugin failed to unregister plugin due to previous error: %v", unregErr))
|
||||
return unregErr
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user