From 43f4c5f6241e063f988c117c932a320e7ddb6198 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 11 Nov 2016 09:03:13 +0100 Subject: [PATCH] error out when getting remote ip address fails remove the noerr flag so that we error out when we get multiple IPs from a CIDR or none at all, the user has to guarantee that his CIDR matches just one IP on each local host. Signed-off-by: Thomas Lamprecht --- data/PVE/CLI/pvecm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm index 65a063d..f5d5422 100755 --- a/data/PVE/CLI/pvecm.pm +++ b/data/PVE/CLI/pvecm.pm @@ -867,10 +867,10 @@ __PACKAGE__->register_method ({ if ($param->{get_migration_ip}) { my $network = $param->{migration_network}; - if (my $ip = PVE::Cluster::get_local_migration_ip($network, 1)) { + if (my $ip = PVE::Cluster::get_local_migration_ip($network)) { print "ip: '$ip'\n"; } else { - print "no ip\n" + print "no ip\n"; } # do not keep tunnel open when asked for migration ip return undef; -- 2.39.2