mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
cephfs: trim spaces around fuseMountOptions
When passing fuseMountOptions: debug in the StorageClass, the mount options passed on the ceph-fuse commandline result in "-o nonempty ,debug". The additional space before the ",debug" causes the mount command to fail. Fixes: 1485 Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
9ab197bc63
commit
6f2f972f5b
@ -154,12 +154,13 @@ func mountFuse(ctx context.Context, mountPoint string, cr *util.Credentials, vol
|
|||||||
"-c", util.CephConfigPath,
|
"-c", util.CephConfigPath,
|
||||||
"-n", cephEntityClientPrefix + cr.ID, "--keyfile=" + cr.KeyFile,
|
"-n", cephEntityClientPrefix + cr.ID, "--keyfile=" + cr.KeyFile,
|
||||||
"-r", volOptions.RootPath,
|
"-r", volOptions.RootPath,
|
||||||
"-o", "nonempty",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmo := "nonempty"
|
||||||
if volOptions.FuseMountOptions != "" {
|
if volOptions.FuseMountOptions != "" {
|
||||||
args = append(args, ","+volOptions.FuseMountOptions)
|
fmo += "," + strings.TrimSpace(volOptions.FuseMountOptions)
|
||||||
}
|
}
|
||||||
|
args = append(args, "-o", fmo)
|
||||||
|
|
||||||
if volOptions.FsName != "" {
|
if volOptions.FsName != "" {
|
||||||
args = append(args, "--client_mds_namespace="+volOptions.FsName)
|
args = append(args, "--client_mds_namespace="+volOptions.FsName)
|
||||||
|
Loading…
Reference in New Issue
Block a user