[pve-devel] r6124 - pve-cluster/trunk/data/perl

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Jun 20 12:58:18 CEST 2011


Author: dietmar
Date: 2011-06-20 12:58:18 +0200 (Mon, 20 Jun 2011)
New Revision: 6124

Modified:
   pve-cluster/trunk/data/perl/Cluster.pm
Log:
 always use remote_node_ip (also for local ip)


Modified: pve-cluster/trunk/data/perl/Cluster.pm
===================================================================
--- pve-cluster/trunk/data/perl/Cluster.pm	2011-06-20 10:44:51 UTC (rev 6123)
+++ pve-cluster/trunk/data/perl/Cluster.pm	2011-06-20 10:58:18 UTC (rev 6124)
@@ -162,9 +162,7 @@
 
     my $rc = PVE::INotify::read_file ('resolvconf');
 
-    my $packed_ip = gethostbyname($nodename);
-    if (defined $packed_ip) {
-        my $ip = inet_ntoa($packed_ip);
+    if (my $ip = remote_node_ip($nodename, 1)) {
 	$names .= ",IP:" . $ip;
     }
 
@@ -825,10 +823,11 @@
    syslog("err", "writing cluster log failed: $@") if $@;
 }
 
+# this is also use to get the IP of the local node
 sub remote_node_ip {
     my ($nodename, $noerr) = @_;
 
-    # fixme: get IP from pmxcfs
+    # fixme: get IP from pmxcfs for remote nodes
 
 
     # fallback: try to get IP by other means




More information about the pve-devel mailing list