]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/RBDPlugin.pm
rbd: get path: allow fake override of fsid in scfg for some regression tests
[pve-storage.git] / PVE / Storage / RBDPlugin.pm
index d71af361ac97357bd4726a18c04291dc90d1c41c..91a4a76f82a4ed9fffd636b0e9d41e76155e837c 100644 (file)
@@ -45,7 +45,10 @@ my sub get_rbd_dev_path {
     my ($scfg, $storeid, $volume) = @_;
 
     my $cluster_id = '';
-    if ($scfg->{monhost}) {
+    if ($scfg->{fsid}) {
+       # NOTE: the config doesn't support this currently (but it could!), hack for qemu-server tests
+       $cluster_id = $scfg->{fsid};
+    } elsif ($scfg->{monhost}) {
        my $rados = $librados_connect->($scfg, $storeid);
        $cluster_id = $rados->mon_command({ prefix => 'fsid', format => 'json' })->{fsid};
     } else {