Skip to content

Commit

Permalink
Fix multiple requisites
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <[email protected]>
  • Loading branch information
kvaps committed Apr 27, 2023
1 parent 8c8ead5 commit 1850aa9
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions pkg/linstor/highlevelclient/high_level_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/container-storage-interface/spec/lib/go/csi"

"github.com/piraeusdatastore/linstor-csi/pkg/linstor/util"
"github.com/piraeusdatastore/linstor-csi/pkg/slice"
"github.com/piraeusdatastore/linstor-csi/pkg/topology"
"github.com/piraeusdatastore/linstor-csi/pkg/volume"
)
Expand Down Expand Up @@ -104,18 +103,8 @@ func (c *HighLevelClient) GetAllTopologyNodes(ctx context.Context, remoteAccessP
accessibleSegments = []map[string]string{{}}
}

var allNodes []string

for _, segment := range accessibleSegments {
nodes, err := c.NodesForTopology(ctx, segment)
if err != nil {
return nil, err
}

allNodes = slice.AppendUnique(allNodes, nodes...)
}

return allNodes, nil
// schedulded node of the pod is the first entry in the accessible segment
return c.NodesForTopology(ctx, accessibleSegments[0])
}

// NodesForTopology finds all matching nodes for the given topology segment.
Expand Down

0 comments on commit 1850aa9

Please sign in to comment.