[pve-devel] [PATCH] if rootdir is used as content type on Ceph then automatic use krbd mode.

Wolfgang Link w.link at proxmox.com
Tue Sep 8 12:24:50 CEST 2015


We only activate krbd automatically, but do not deactivate it,
if rootdir will removed from Ceph storage config.

This must be done manually, to prevent if qemu should use krbd.
---
 PVE/Storage/RBDPlugin.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index e600ec1..329fd23 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -597,4 +597,14 @@ sub volume_has_feature {
     return undef;
 }
 
+sub check_config {
+    my ($class, $sectionId, $config, $create, $skipSchemaCheck) = @_;
+
+    my $settings = $class->SUPER::check_config($sectionId, $config, $create, $skipSchemaCheck);
+
+    $settings->{krbd} = 1 if $settings->{content}->{rootdir};
+
+    return $settings;
+}
+
 1;
-- 
2.1.4




More information about the pve-devel mailing list