mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 13:52:02 +00:00
don't migrate replicated VM whose replication job is marked for removal
while it didn't actually fail, we probably want to avoid the behavior: With remove_job=full: * run_replication called during migration causes the replicated volumes to be removed * migration continues by fully copying all volumes With remove_job=local: * run_replication called during migration causes the job (and local replication snapshots) to be removed * migration continues by fully copying all volumes and renaming them to avoid collision with the still existing remote volumes Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
c2c96d7378
commit
19ff368213
@ -224,6 +224,10 @@ sub prepare {
|
|||||||
$self->{replication_jobcfg} = $repl_conf->find_local_replication_job($vmid, $self->{node});
|
$self->{replication_jobcfg} = $repl_conf->find_local_replication_job($vmid, $self->{node});
|
||||||
$self->{is_replicated} = $repl_conf->check_for_existing_jobs($vmid, 1);
|
$self->{is_replicated} = $repl_conf->check_for_existing_jobs($vmid, 1);
|
||||||
|
|
||||||
|
if ($self->{replication_jobcfg} && defined($self->{replication_jobcfg}->{remove_job})) {
|
||||||
|
die "refusing to migrate replicated VM whose replication job is marked for removal\n";
|
||||||
|
}
|
||||||
|
|
||||||
PVE::QemuConfig->check_lock($conf);
|
PVE::QemuConfig->check_lock($conf);
|
||||||
|
|
||||||
my $running = 0;
|
my $running = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user