From 188e560ee9920bce2ba3cdfd193795a56f62e097 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 27 Apr 2022 16:32:46 +0530 Subject: [PATCH 1/3] nfs: use latest liveness probe and node driver registrar This commit make use of latest sidecars of livenessprobe and node driver registrar in NFS driver deployment. Signed-off-by: Humble Chirammal --- deploy/nfs/kubernetes/csi-nfsplugin.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/nfs/kubernetes/csi-nfsplugin.yaml b/deploy/nfs/kubernetes/csi-nfsplugin.yaml index 1f3007283..86dba8625 100644 --- a/deploy/nfs/kubernetes/csi-nfsplugin.yaml +++ b/deploy/nfs/kubernetes/csi-nfsplugin.yaml @@ -18,7 +18,7 @@ spec: - --probe-timeout=3s - --health-port=29653 - --v=2 - image: registry.k8s.io/sig-storage/livenessprobe:v2.5.0 + image: registry.k8s.io/sig-storage/livenessprobe:v2.6.0 imagePullPolicy: IfNotPresent name: liveness-probe resources: @@ -44,7 +44,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.4.0 + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.0 imagePullPolicy: IfNotPresent livenessProbe: exec: From 9d7faf850f73a80794d53aa253da9f48f084bd8a Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 29 Apr 2022 14:58:28 +0200 Subject: [PATCH 2/3] nfs: delete the CephFS volume when the export is already removed In case the NFS-export has already been removed from the NFS-server, but the CSI Controller was restarted, a retry to remove the NFS-volume will fail with an error like: > GRPC error: ....: response status not empty: "Export does not exist" When this error is reported, assume the NFS-export was already removed from the NFS-server configuration, and continue with deleting the backend volume. Signed-off-by: Niels de Vos --- internal/nfs/controller/controllerserver.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/nfs/controller/controllerserver.go b/internal/nfs/controller/controllerserver.go index 75a0c515c..31e75abcd 100644 --- a/internal/nfs/controller/controllerserver.go +++ b/internal/nfs/controller/controllerserver.go @@ -18,6 +18,7 @@ package controller import ( "context" + "strings" "github.com/ceph/ceph-csi/internal/cephfs" "github.com/ceph/ceph-csi/internal/cephfs/store" @@ -140,8 +141,8 @@ func (cs *Server) DeleteVolume( defer nfsVolume.Destroy() err = nfsVolume.DeleteExport() - // TODO: if the export does not exist, but the backend does, delete the backend - if err != nil { + // if the export does not exist, continue with deleting the backend volume + if err != nil && !strings.Contains(err.Error(), "Export does not exist") { return nil, status.Errorf(codes.InvalidArgument, "failed to delete export: %v", err) } From bd57feb26e19a9e6db1ecfa7a8a07521277329eb Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Wed, 4 May 2022 16:53:51 +0530 Subject: [PATCH 3/3] rbd: use `vaultAuthPath` variable name in error msg Before the change, the error msg was the following: ``` failed to set VAULT_AUTH_MOUNT_PATH in Vault config: path is empty ``` `vaultAuthPath` is the actual variable name set by the user. The error message will now be the following: ``` failed to set "vaultAuthPath" in vault config: path is empty ``` Signed-off-by: Rakshith R --- internal/kms/vault.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/kms/vault.go b/internal/kms/vault.go index 14f9ff974..d529c2a88 100644 --- a/internal/kms/vault.go +++ b/internal/kms/vault.go @@ -352,7 +352,7 @@ func initVaultKMS(args ProviderInitArgs) (EncryptionKMS, error) { kms.vaultConfig[vault.AuthMountPath], err = detectAuthMountPath(vaultAuthPath) if err != nil { - return nil, fmt.Errorf("failed to set %s in Vault config: %w", vault.AuthMountPath, err) + return nil, fmt.Errorf("failed to set \"vaultAuthPath\" in Vault config: %w", err) } vaultRole := vaultDefaultRole