Fix #2705: cephfs: mount fails with bad option

dmesg: libceph: bad option at 'conf=/etc/pve/ceph.conf'

After the upgrade to PVE 6 with Ceph Luminous, the mount.ceph helper
doesn't understand the conf= option yet. And the CephFS mount with the
kernel client fails. After upgrading to Ceph Nautilus the option exists
in the mount.ceph helper.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
This commit is contained in:
Alwin Antreich
2020-04-24 17:29:47 +02:00
committed by Thomas Lamprecht
parent 187e32ce41
commit e54c3e3347
3 changed files with 35 additions and 31 deletions

View File

@ -80,6 +80,7 @@ EOF
sub cephfs_mount {
my ($scfg, $storeid) = @_;
my ($subversions) = PVE::CephConfig::ceph_version();
my $mountpoint = $scfg->{path};
my $subdir = $scfg->{subdir} // '/';
@ -98,7 +99,10 @@ sub cephfs_mount {
} else {
push @opts, "name=$cmd_option->{userid}";
push @opts, "secretfile=$secretfile" if defined($secretfile);
push @opts, "conf=$configfile" if defined($configfile);
# FIXME: remove subversion check in PVE 7.0, not needed for >= Nautilus
# Luminous doesn't know the conf option
push @opts, "conf=$configfile" if defined($configfile) && @$subversions[0] > 12;
}
push @opts, $scfg->{options} if $scfg->{options};