mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2024-12-22 13:34:06 +03:00
PVE::QemuConfig - implement $cleanup flag for get_replicatable_volumes
This commit is contained in:
parent
5ee3847149
commit
e5857ca8a7
@ -64,7 +64,7 @@ sub has_feature {
|
||||
}
|
||||
|
||||
sub get_replicatable_volumes {
|
||||
my ($class, $storecfg, $conf, $noerr) = @_;
|
||||
my ($class, $storecfg, $conf, $cleanup, $noerr) = @_;
|
||||
|
||||
my $volhash = {};
|
||||
|
||||
@ -75,10 +75,10 @@ sub get_replicatable_volumes {
|
||||
|
||||
return if PVE::QemuServer::drive_is_cdrom($drive);
|
||||
|
||||
return if defined($drive->{replicate}) && !$drive->{replicate};
|
||||
return if !$cleanup && defined($drive->{replicate}) && !$drive->{replicate};
|
||||
|
||||
if (!PVE::Storage::volume_has_feature($storecfg, 'replicate', $volid)) {
|
||||
return if $noerr;
|
||||
return if $cleanup || $noerr;
|
||||
die "missing replicate feature on volume '$volid'\n";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user