Allow shared volume detach via the api
This is consistent with the RWO behavior in which you can force a detach
even if the volume is in use. In normal operation this is not a problem,
since the since the csi driver does not call detach for shared volumes.
@@ -339,11 +339,6 @@ func (m *VolumeManager) Detach(name string) (v *longhorn.Volume, err error) {
return nil, fmt.Errorf("invalid state to detach %v: %v", v.Name, v.Status.State)
}
- // don't detach shared volumes, let the share manager deal with that
- if v.Spec.Share {
- return v, nil
- }
-
oldNodeID := v.Spec.NodeID
if oldNodeID == "" {
return v, nil
