[pve-devel] need advise on rbd disk editing/change (die on path not exist)

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Mon Jun 18 09:35:22 CEST 2012


I think we need a path / disk check per storage plugin? So every storage 
plugin should do this check on their own.

Stefan

Am 18.06.2012 09:26, schrieb Alexandre DERUMIER:
> Hi,
>
> I found a bug when editing a disk with rbd disk
>
>
> in Qemu.pm
>
> my $create_disks = sub {
> ....
>     } else {
>              my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid);
>              PVE::Storage::activate_volumes($storecfg, [ $volid ])
>                  if PVE::Storage::parse_volume_id ($volid, 1);
>              die "image '$path' does not exists\n" if (!(-f $path || -b $path));
>              $res->{$ds} = $settings->{$ds};
>          }
>
>
>
> As path is "virtual" (don't exist on host as real path), it's die on path does not exist.
>
>
> What's the best method to implement a check disk exist ?
>
> maybe vdisk_list and check if disk exist ?
> my $dl = PVE::Storage::vdisk_list($storecfg, undef, $vmid);
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



More information about the pve-devel mailing list