get_replicatable_volumes: skip volumes if we do not 'own' them

And add and additional check for vtype 'images'.
This commit is contained in:
Dietmar Maurer 2017-06-13 09:55:36 +02:00
parent aee6abe5ba
commit f7e7767fed

View File

@ -77,8 +77,13 @@ sub get_replicatable_volumes {
my $scfg = storage_config($storecfg, $storeid);
return if $scfg->{shared};
my ($path, $owner, $vtype) = PVE::Storage::path($storecfg, $volid);
return if !$owner || ($owner != $vmid);
return if $attr->{cdrom};
die "unable to replicate volume '$volid', type '$vtype'\n" if $vtype ne 'images';
return if !$cleanup && !$attr->{replicate};
if (!PVE::Storage::volume_has_feature($storecfg, 'replicate', $volid)) {