]> git.proxmox.com Git - pve-cluster.git/commitdiff
error out when getting remote ip address fails
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 11 Nov 2016 08:03:13 +0000 (09:03 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 11 Nov 2016 08:52:32 +0000 (09:52 +0100)
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@proxmox.com>
data/PVE/CLI/pvecm.pm

index 65a063d77356085ca0d257dcc06f5ae538496696..f5d5422eac91da581d20bc5838cc68fb31898693 100755 (executable)
@@ -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;