]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/RBDPlugin.pm
rbd: allow to use client custom ceph conf for each storeid
[pve-storage.git] / PVE / Storage / RBDPlugin.pm
index 7a08ff50d27b5abb8704d5922b163321f52f2a4e..43e1210af41cedae879554fd03db0ca3c9b3bd36 100644 (file)
@@ -56,6 +56,12 @@ my $rbd_cmd = sub {
        push @$cmd, '--auth_supported', 'none';
     }
 
+    my $cephconfig = "/etc/pve/priv/ceph/${storeid}.conf";
+
+    if(-e $cephconfig){
+       push @$cmd, '-c', $cephconfig;
+    }
+
     push @$cmd, $op;
 
     push @$cmd, @options if scalar(@options);
@@ -82,6 +88,12 @@ my $rados_cmd = sub {
        push @$cmd, '--auth_supported', 'none';
     }
 
+    my $cephconfig = "/etc/pve/priv/ceph/${storeid}.conf";
+
+    if(-e $cephconfig){
+       push @$cmd, '-c', $cephconfig;
+    }
+
     push @$cmd, $op;
 
     push @$cmd, @options if scalar(@options);
@@ -314,6 +326,12 @@ sub path {
        $path .= ":auth_supported=none";
     }
 
+    my $cephconfig = "/etc/pve/priv/ceph/${storeid}.conf";
+
+    if(-e $cephconfig){
+       $path .= ":conf=$cephconfig";
+    }
+
     return ($path, $vmid, $vtype);
 }