rbd: make activate_volume idempotent
This commit is contained in:
@ -494,6 +494,10 @@ sub activate_volume {
|
||||
return 1 if !$scfg->{krbd};
|
||||
|
||||
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
|
||||
my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd';
|
||||
|
||||
my $path = "/dev/rbd/$pool/$name";
|
||||
return if -b $path;
|
||||
|
||||
my $cmd = &$rbd_cmd($scfg, $storeid, 'map', $name);
|
||||
run_rbd_command($cmd, errmsg => "can't mount rbd volume $name");
|
||||
|
||||
@ -2,6 +2,8 @@ libpve-storage-perl (4.0-21) unstable; urgency=medium
|
||||
|
||||
* rbd: skip unmap if device is not mapped
|
||||
|
||||
* rbd: make activate_volume idempotent
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 10 Sep 2015 10:43:35 +0200
|
||||
|
||||
libpve-storage-perl (4.0-20) unstable; urgency=medium
|
||||
|
||||
Reference in New Issue
Block a user