[pve-devel] [PATCH cluster v2 2/2] error out when getting remote ip address fails

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Nov 11 09:03:13 CET 2016


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 <t.lamprecht at proxmox.com>
---

changes since v1:
* instead of adding an quite uneccessary eval/die block move it to the
  callee and die there, just unset the noerr flag and fix a missing
  semicolon while we're here

 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.1.4





More information about the pve-devel mailing list