Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple requisites #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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