diff --git a/src/csi/backend/backend.go b/src/csi/backend/backend.go index 1a2ceade..314f0b58 100644 --- a/src/csi/backend/backend.go +++ b/src/csi/backend/backend.go @@ -124,7 +124,7 @@ func newBackend(backendName string, config map[string]interface{}) (*Backend, er supportedTopologies := make([]map[string]string, 0) if topologies, exist := config[SupportedTopologies]; exist { - topologyArray , ok := topologies.([]interface{}) + topologyArray, ok := topologies.([]interface{}) if !ok { return nil, errors.New("invalid supported topologies configuration") } @@ -564,7 +564,7 @@ func isTopologySupportedByBackend(backend *Backend, topology map[string]string) for _, supported := range backend.SupportedTopologies { eachFound := true for k, v := range topology { - if sup, ok := supported[k]; ok && sup != v { + if sup, ok := supported[k]; !ok || (sup != v) { eachFound = false break } diff --git a/yamls/deploy/huawei-csi-controller.yaml b/yamls/deploy/huawei-csi-controller.yaml index c5d257ea..3a2cfb80 100644 --- a/yamls/deploy/huawei-csi-controller.yaml +++ b/yamls/deploy/huawei-csi-controller.yaml @@ -22,6 +22,7 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--timeout=6h" + - "--feature-gates=Topology=true" env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock diff --git a/yamls/deploy/huawei-csi-multi-controller.yaml b/yamls/deploy/huawei-csi-multi-controller.yaml index b21753d7..3ea3b1da 100644 --- a/yamls/deploy/huawei-csi-multi-controller.yaml +++ b/yamls/deploy/huawei-csi-multi-controller.yaml @@ -23,6 +23,7 @@ spec: - "--csi-address=$(ADDRESS)" - "--timeout=6h" - "--enable-leader-election" + - "--feature-gates=Topology=true" env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock diff --git a/yamls/deploy/huawei-csi-resize-controller.yaml b/yamls/deploy/huawei-csi-resize-controller.yaml index fd5d2b7c..92bd7c18 100644 --- a/yamls/deploy/huawei-csi-resize-controller.yaml +++ b/yamls/deploy/huawei-csi-resize-controller.yaml @@ -22,6 +22,7 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--timeout=6h" + - "--feature-gates=Topology=true" env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock diff --git a/yamls/deploy/huawei-csi-resize-snapshot-controller.yaml b/yamls/deploy/huawei-csi-resize-snapshot-controller.yaml index 6a87eb00..fa806c31 100644 --- a/yamls/deploy/huawei-csi-resize-snapshot-controller.yaml +++ b/yamls/deploy/huawei-csi-resize-snapshot-controller.yaml @@ -22,6 +22,7 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--timeout=6h" + - "--feature-gates=Topology=true" env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock