Skip to content

Commit

Permalink
Merge pull request #1 from spyyang/dev
Browse files Browse the repository at this point in the history
rc2: bug fix of parsing curve-nbd command
  • Loading branch information
spyyang authored Oct 9, 2021
2 parents f5d5d11 + c508065 commit 8cc8533
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all

CSI_IMAGE_NAME=$(if $(ENV_CSI_IMAGE_NAME),$(ENV_CSI_IMAGE_NAME),quay.io/curvecsi/curve-csi)
CSI_IMAGE_VERSION=$(if $(ENV_CSI_IMAGE_VERSION),$(ENV_CSI_IMAGE_VERSION),csi-v1.1.0-rc1)
CSI_IMAGE_NAME=$(if $(ENV_CSI_IMAGE_NAME),$(ENV_CSI_IMAGE_NAME),harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi)
CSI_IMAGE_VERSION=$(if $(ENV_CSI_IMAGE_VERSION),$(ENV_CSI_IMAGE_VERSION),csi-v1.1.0-rc2)

GO_PROJECT=github.com/opencurve/curve-csi
GIT_COMMIT=$(shell git rev-parse --short HEAD)
Expand Down
8 changes: 4 additions & 4 deletions charts/curve-csi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ nodeplugin:

plugin:
image:
repository: quay.io/curvecsi/curve-csi
tag: csi-v1.1.0-rc1
repository: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi
tag: csi-v1.1.0-rc2
pullPolicy: IfNotPresent
resources: {}

Expand Down Expand Up @@ -39,8 +39,8 @@ controllerplugin:

plugin:
image:
repository: quay.io/curvecsi/curve-csi
tag: csi-v1.1.0-rc1
repository: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi
tag: csi-v1.1.0-rc2
pullPolicy: IfNotPresent
resources: {}

Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/v1.13/node-plugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1
image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2
args:
- --endpoint=$(CSI_ENDPOINT)
- --drivername=curve.csi.netease.com
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/v1.13/provisioner-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1
image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2
args:
- --endpoint=$(CSI_ENDPOINT)
- --drivername=curve.csi.netease.com
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1
image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2
args:
- --endpoint=$(CSI_ENDPOINT)
- --drivername=curve.csi.netease.com
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/v1.14+/provisioner-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1
image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2
args:
- --endpoint=$(CSI_ENDPOINT)
- --drivername=curve.csi.netease.com
Expand Down
6 changes: 4 additions & 2 deletions pkg/curveservice/curveservie-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ func waitForMapped(ctx context.Context, filePath, user string, maxRetries int) (
time.Sleep(time.Second)
}

if devicePath, _ := getNbdDevFromFileName(ctx, filePath, user); devicePath != "" {
if devicePath, err := getNbdDevFromFileName(ctx, filePath, user); devicePath != "" {
return devicePath, true
} else if err != nil {
klog.Warning(err)
}
}
return "", false
Expand All @@ -92,7 +94,7 @@ func getNbdDevFromFileName(ctx context.Context, filePath, user string) (string,
continue
}
lineSlice := strings.Fields(tLine)
if len(lineSlice) != 3 {
if len(lineSlice) < 3 {
continue
}
// cbdMapPathSuffix: /k8s/csi-vol-pvc-647525be-c0d6-464b-b548-1fa26f6d183c_k8s_
Expand Down

0 comments on commit 8cc8533

Please sign in to comment.