mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 08:40:23 +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>
(cherry picked from commit 6f2f972f5b
)
This commit is contained in:
parent
bef4873049
commit
b810ca57a0
@ -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