mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
Merge branch 'master' into fix-e2e-dep
This commit is contained in:
commit
cdd27c1459
@ -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
|
bindings. These are shared for both RBD and CephFS CSI plugins, as they require
|
||||||
the same permissions.
|
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:**
|
**Deploy CSI sidecar containers:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -269,10 +269,8 @@ func createPath(volOpt *rbdVolume, cr *util.Credentials) (string, error) {
|
|||||||
|
|
||||||
klog.V(5).Infof("rbd: map mon %s", volOpt.Monitors)
|
klog.V(5).Infof("rbd: map mon %s", volOpt.Monitors)
|
||||||
|
|
||||||
useNBD := false
|
|
||||||
cmdName := rbd
|
cmdName := rbd
|
||||||
if volOpt.Mounter == rbdTonbd && hasNBD {
|
if volOpt.Mounter == rbdTonbd && hasNBD {
|
||||||
useNBD = true
|
|
||||||
cmdName = rbdTonbd
|
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))
|
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))
|
return "", fmt.Errorf("rbd: map failed %v, rbd output: %s", err, string(output))
|
||||||
}
|
}
|
||||||
devicePath, found := waitForPath(volOpt.Pool, image, 10, useNBD)
|
devicePath := strings.TrimSuffix(string(output), "\n")
|
||||||
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)
|
|
||||||
}
|
|
||||||
return devicePath, nil
|
return devicePath, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user