manager/scheduler/volumes.go
Method volumeSet.checkVolume
has 6 return statements (exceeds 4 allowed). Open
Open
func (vs *volumeSet) checkVolume(id string, info *NodeInfo, readOnly bool) bool {
vi := vs.volumes[id]
// first, check if the volume's availability is even Active. If not. no
// reason to bother with anything further.
if vi.volume != nil && vi.volume.Spec.Availability != api.VolumeAvailabilityActive {
Method volumeSet.freeVolumes
has 5 return statements (exceeds 4 allowed). Open
Open
func (vs *volumeSet) freeVolumes(batch *store.Batch) error {
for volumeID, info := range vs.volumes {
if err := batch.Update(func(tx store.Tx) error {
v := store.GetVolume(tx, volumeID)
if v == nil {
Method volumeSet.isVolumeAvailableOnNode
has 5 return statements (exceeds 4 allowed). Open
Open
func (vs *volumeSet) isVolumeAvailableOnNode(mount *api.Mount, node *NodeInfo) string {
source := mount.Source
// first, discern whether we're looking for a group or a volume
// try trimming off the "group:" prefix. if the resulting string is
// different from the input string (meaning something has been trimmed),