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:
committed by
Thomas Lamprecht
parent
187e32ce41
commit
e54c3e3347
@ -255,4 +255,33 @@ sub ceph_remove_keyfile {
|
||||
}
|
||||
}
|
||||
|
||||
my $ceph_version_parser = sub {
|
||||
my $ceph_version = shift;
|
||||
# FIXME this is the same as pve-manager PVE::Ceph::Tools get_local_version
|
||||
if ($ceph_version =~ /^ceph.*\s(\d+(?:\.\d+)+(?:-pve\d+)?)\s+(?:\(([a-zA-Z0-9]+)\))?/) {
|
||||
my ($version, $buildcommit) = ($1, $2);
|
||||
my $subversions = [ split(/\.|-/, $version) ];
|
||||
|
||||
return ($subversions, $version, $buildcommit);
|
||||
}
|
||||
warn "Could not parse Ceph version: '$ceph_version'\n";
|
||||
};
|
||||
|
||||
sub ceph_version {
|
||||
my ($cache) = @_;
|
||||
|
||||
my $version_string = $cache;
|
||||
if (!defined($version_string)) {
|
||||
run_command('ceph --version', outfunc => sub {
|
||||
$version_string = shift;
|
||||
});
|
||||
}
|
||||
return undef if !defined($version_string);
|
||||
# subversion is an array ref. with the version parts from major to minor
|
||||
# version is the filtered version string
|
||||
my ($subversions, $version) = $ceph_version_parser->($version_string);
|
||||
|
||||
return wantarray ? ($subversions, $version) : $version;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user