]> git.proxmox.com Git - pve-container.git/commitdiff
call map_volume before using volumes.
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 8 Nov 2018 13:05:16 +0000 (14:05 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 9 Nov 2018 16:31:12 +0000 (17:31 +0100)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/control
src/PVE/LXC.pm

index d1226ddd6a876210a7ce164b0ee067a4a213b8cb..15f42ad1ff4d09720e5973104f36e53ad53a5875 100644 (file)
@@ -20,7 +20,7 @@ Architecture: all
 Depends: file,
          libpve-common-perl (>= 5.0-39),
          libpve-guest-common-perl,
-         libpve-storage-perl (>= 5.0-27),
+         libpve-storage-perl (>= 5.0-31),
          lxc-pve,
          pve-cluster (>= 4.0-8),
          pve-ha-manager,
index 1e47faf7461fc8078439271515d9ea7a19eef39e..619f6970d8601b6e076a230588a44a88516957a8 100644 (file)
@@ -1409,12 +1409,9 @@ sub mountpoint_mount {
 
        my $scfg = PVE::Storage::storage_config($storage_cfg, $storage);
 
-       # early sanity checks:
-       # we otherwise call realpath on the rbd url
-       die "containers on rbd storage without krbd are not supported\n"
-           if $scfg->{type} eq 'rbd' && !$scfg->{krbd};
+       my $path = PVE::Storage::map_volume($storage_cfg, $volid, $snapname);
 
-       my $path = PVE::Storage::path($storage_cfg, $volid, $snapname);
+       $path = PVE::Storage::path($storage_cfg, $volid, $snapname) if !defined($path);
 
        my ($vtype, undef, undef, undef, undef, $isBase, $format) =
            PVE::Storage::parse_volname($storage_cfg, $volid);
@@ -1521,7 +1518,9 @@ sub format_disk {
 
     PVE::Storage::activate_volumes($storage_cfg, [$volid]);
 
-    my $path = PVE::Storage::path($storage_cfg, $volid);
+    my $path = PVE::Storage::map_volume($storage_cfg, $volid);
+
+    $path = PVE::Storage::path($storage_cfg, $volid) if !defined($path);
 
     my ($vtype, undef, undef, undef, undef, $isBase, $format) =
        PVE::Storage::parse_volname($storage_cfg, $volid);
@@ -1574,7 +1573,6 @@ sub alloc_disk {
 
        } elsif ($scfg->{type} eq 'rbd') {
 
-           die "krbd option must be enabled on storage type '$scfg->{type}'\n" if !$scfg->{krbd};
            $volid = PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'raw', undef, $size_kb);
            $do_format = 1;
        } else {