From 7c2fb6187a080e4c91564a288a0e341e9852ee29 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 6 Aug 2019 12:16:56 +0530 Subject: [PATCH 1/2] remove post validation of rbd device once we map the rbd image on a node we will get the device name its mapped in the map output itself,no need to check the devicepath post rbd mapping Signed-off-by: Madhu Rajanna --- pkg/rbd/rbd_attach.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkg/rbd/rbd_attach.go b/pkg/rbd/rbd_attach.go index 4be1dcd1a..16beb27be 100644 --- a/pkg/rbd/rbd_attach.go +++ b/pkg/rbd/rbd_attach.go @@ -269,10 +269,8 @@ func createPath(volOpt *rbdVolume, cr *util.Credentials) (string, error) { klog.V(5).Infof("rbd: map mon %s", volOpt.Monitors) - useNBD := false cmdName := rbd if volOpt.Mounter == rbdTonbd && hasNBD { - useNBD = true cmdName = rbdTonbd } @@ -282,15 +280,7 @@ func createPath(volOpt *rbdVolume, cr *util.Credentials) (string, error) { klog.Warningf("rbd: map error %v, rbd output: %s", err, string(output)) return "", fmt.Errorf("rbd: map failed %v, rbd output: %s", err, string(output)) } - devicePath, found := waitForPath(volOpt.Pool, image, 10, useNBD) - if !found { - output, err := execCommand(cmdName, []string{ - "unmap", imagePath, "--id", cr.ID, "-m", volOpt.Monitors, "--keyfile=" + cr.KeyFile}) - if err != nil { - klog.Warningf("rbd: unmap error %v, rbd output: %s", err, string(output)) - } - return "", fmt.Errorf("could not map image %s, Timeout after 10s", imagePath) - } + devicePath := strings.TrimSuffix(string(output), "\n") return devicePath, nil } From 44e807c36bb2e9e826a0f41f6af5b83a23079713 Mon Sep 17 00:00:00 2001 From: William Zhang Date: Thu, 8 Aug 2019 10:42:28 +0800 Subject: [PATCH 2/2] Add the description of Deploy ConfigMap for CSI plugins Signed-off-by: William Zhang --- docs/deploy-cephfs.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/deploy-cephfs.md b/docs/deploy-cephfs.md index 2ca5b4b96..62f3903f3 100644 --- a/docs/deploy-cephfs.md +++ b/docs/deploy-cephfs.md @@ -126,6 +126,17 @@ Those manifests deploy service accounts, cluster roles and cluster role bindings. These are shared for both RBD and CephFS CSI plugins, as they require the same permissions. +**Deploy ConfigMap for CSI plugins:** + +```bash +kubectl create -f csi-config-map.yaml +``` + +The configmap deploys an empty CSI configuration that is mounted as a volume +within the Ceph CSI plugin pods. To add a specific Ceph clusters configuration +details, refer to [Creating CSI configuration](../examples/README.md#creating-csi-configuration) +for more information. + **Deploy CSI sidecar containers:** ```bash