-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path0001-requisites.patch
33 lines (30 loc) · 1.17 KB
/
0001-requisites.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff --git a/pkg/linstor/highlevelclient/high_level_client.go b/pkg/linstor/highlevelclient/high_level_client.go
index 645599c..2f7c3f9 100644
--- a/pkg/linstor/highlevelclient/high_level_client.go
+++ b/pkg/linstor/highlevelclient/high_level_client.go
@@ -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"
)
@@ -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.