From e74f12d8cdfd28c9d167743afbf6ad9f7926cbf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=B0=9A=E5=9D=A1?= Date: Tue, 14 Sep 2021 15:09:56 +0800 Subject: [PATCH 1/2] rc2: fix parsing output of --- Makefile | 2 +- deploy/kubernetes/v1.13/node-plugin-daemonset.yaml | 2 +- deploy/kubernetes/v1.13/provisioner-sts.yaml | 2 +- deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml | 2 +- deploy/kubernetes/v1.14+/provisioner-deploy.yaml | 2 +- pkg/curveservice/curveservie-utils.go | 6 ++++-- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c7cd44a..3951716 100644 --- a/Makefile +++ b/Makefile @@ -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_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) diff --git a/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml b/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml index 2fbcaae..36d0331 100644 --- a/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml +++ b/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml @@ -52,7 +52,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1 + image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com diff --git a/deploy/kubernetes/v1.13/provisioner-sts.yaml b/deploy/kubernetes/v1.13/provisioner-sts.yaml index 9c204e2..c677fc9 100644 --- a/deploy/kubernetes/v1.13/provisioner-sts.yaml +++ b/deploy/kubernetes/v1.13/provisioner-sts.yaml @@ -77,7 +77,7 @@ spec: privileged: true capabilities: add: ["SYS_ADMIN"] - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1 + image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com diff --git a/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml b/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml index 80f2323..9bfca71 100644 --- a/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml +++ b/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml @@ -52,7 +52,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1 + image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com diff --git a/deploy/kubernetes/v1.14+/provisioner-deploy.yaml b/deploy/kubernetes/v1.14+/provisioner-deploy.yaml index 3c11037..e43b989 100644 --- a/deploy/kubernetes/v1.14+/provisioner-deploy.yaml +++ b/deploy/kubernetes/v1.14+/provisioner-deploy.yaml @@ -82,7 +82,7 @@ spec: privileged: true capabilities: add: ["SYS_ADMIN"] - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc1 + image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com diff --git a/pkg/curveservice/curveservie-utils.go b/pkg/curveservice/curveservie-utils.go index 451ad43..1f819b4 100644 --- a/pkg/curveservice/curveservie-utils.go +++ b/pkg/curveservice/curveservie-utils.go @@ -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 @@ -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_ From c508065496ccebeb7b05d6c0a3412a5f88503842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=B0=9A=E5=9D=A1?= Date: Sat, 9 Oct 2021 13:58:38 +0800 Subject: [PATCH 2/2] change image repo --- Makefile | 2 +- charts/curve-csi/values.yaml | 8 ++++---- deploy/kubernetes/v1.13/node-plugin-daemonset.yaml | 2 +- deploy/kubernetes/v1.13/provisioner-sts.yaml | 2 +- deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml | 2 +- deploy/kubernetes/v1.14+/provisioner-deploy.yaml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 3951716..01d8bd6 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: all -CSI_IMAGE_NAME=$(if $(ENV_CSI_IMAGE_NAME),$(ENV_CSI_IMAGE_NAME),quay.io/curvecsi/curve-csi) +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 diff --git a/charts/curve-csi/values.yaml b/charts/curve-csi/values.yaml index f557913..15fb2f2 100644 --- a/charts/curve-csi/values.yaml +++ b/charts/curve-csi/values.yaml @@ -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: {} @@ -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: {} diff --git a/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml b/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml index 36d0331..d13d866 100644 --- a/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml +++ b/deploy/kubernetes/v1.13/node-plugin-daemonset.yaml @@ -52,7 +52,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 + image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com diff --git a/deploy/kubernetes/v1.13/provisioner-sts.yaml b/deploy/kubernetes/v1.13/provisioner-sts.yaml index c677fc9..9a0272a 100644 --- a/deploy/kubernetes/v1.13/provisioner-sts.yaml +++ b/deploy/kubernetes/v1.13/provisioner-sts.yaml @@ -77,7 +77,7 @@ spec: privileged: true capabilities: add: ["SYS_ADMIN"] - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 + image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com diff --git a/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml b/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml index 9bfca71..f68a3d5 100644 --- a/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml +++ b/deploy/kubernetes/v1.14+/node-plugin-daemonset.yaml @@ -52,7 +52,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 + image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com diff --git a/deploy/kubernetes/v1.14+/provisioner-deploy.yaml b/deploy/kubernetes/v1.14+/provisioner-deploy.yaml index e43b989..b2379c3 100644 --- a/deploy/kubernetes/v1.14+/provisioner-deploy.yaml +++ b/deploy/kubernetes/v1.14+/provisioner-deploy.yaml @@ -82,7 +82,7 @@ spec: privileged: true capabilities: add: ["SYS_ADMIN"] - image: quay.io/curvecsi/curve-csi:csi-v1.1.0-rc2 + image: harbor.cloud.netease.com/qzprod-k8s/k8scsi/curve-csi:csi-v1.1.0-rc2 args: - --endpoint=$(CSI_ENDPOINT) - --drivername=curve.csi.netease.com