On 5/14/20 3:09 PM, Aaron Lauterer wrote: > Works as expected. > > Throws a warning when migrating a running VM to a node to which no > replication job is set up. > > Since I wasn't following all of the previous off-list discusion: Do we just > want a warning that could be overseen quite easily instead of dying?
How about dying if "force" isn't set? > Nonetheless: > > Tested-By: Aaron Lauterer <a.laute...@proxmox.com> > > On 5/14/20 12:47 PM, Fabian Ebner wrote: >> Partially fixes #2728 (GUI part is still needed). >> >> Signed-off-by: Fabian Ebner <f.eb...@proxmox.com> >> --- >> PVE/API2/Qemu.pm | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm >> index fd51bf3..8e993a9 100644 >> --- a/PVE/API2/Qemu.pm >> +++ b/PVE/API2/Qemu.pm >> @@ -3486,6 +3486,12 @@ __PACKAGE__->register_method({ >> if (PVE::QemuServer::check_running($vmid)) { >> die "can't migrate running VM without --online\n" if >> !$param->{online}; >> + >> + my $repl_conf = PVE::ReplicationConfig->new(); >> + if (!defined($repl_conf->find_local_replication_job($vmid, >> $target))) { >> + warn "WARNING: Node '$target' is not a replication target. Existing >> " . >> + "replication jobs will fail after live-migration!\n"; >> + } >> } else { >> warn "VM isn't running. Doing offline migration instead.\n" if >> $param->{online}; >> $param->{online} = 0; >> _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel