Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitRoushan committed Aug 26, 2021
1 parent 08cd7d6 commit 0a0ea73
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/csi/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions yamls/deploy/huawei-csi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions yamls/deploy/huawei-csi-multi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions yamls/deploy/huawei-csi-resize-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions yamls/deploy/huawei-csi-resize-snapshot-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a0ea73

Please sign in to comment.