[pve-devel] [PATCH ceph 1/2] fix Ceph version string handling

Martin Verges martin.verges at croit.io
Tue Jan 7 17:12:12 CET 2020


Signed-off-by: Martin Verges <martin.verges at croit.io>
---
 PVE/Storage/RBDPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 0a33ec0..b0420fe 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -126,7 +126,7 @@ my $krbd_feature_update = sub {
 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]+)\))?/) {
+    if ($ceph_version =~ /^ceph.*\s(\d+(?:\.\d+)+(?:-[^\s]+)?)\s+(?:\(([a-zA-Z0-9]+)\))?/) {
 	my ($version, $buildcommit) = ($1, $2);
 	my $subversions = [ split(/\.|-/, $version) ];
 
-- 
2.20.1




More information about the pve-devel mailing list