From fd6b2573b305254ef45d59f872b92f9d7b9a60d7 Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 22 Oct 2008 19:03:17 +0000 Subject: [PATCH] fix a rmc monitoring bug git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2378 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-rmc/plugin/rmcmon.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xCAT-rmc/plugin/rmcmon.pm b/xCAT-rmc/plugin/rmcmon.pm index c1d1e26d2..5b26704e8 100644 --- a/xCAT-rmc/plugin/rmcmon.pm +++ b/xCAT-rmc/plugin/rmcmon.pm @@ -941,12 +941,19 @@ sub addNodes { my $hmc_ssh_enabled=0; #get mn info if ($first_time) { - ($ms_node_id, $ms_ipaddresses)=getNodeInfo($ms_host_name, 0); $first_time=0; + $ms_node_id=getLocalNodeID(); if ($ms_node_id == -1) { - reportError($ms_ipaddresses, $callback); - return (1, $ms_ipaddresses); + reportError("Cannot get nodeid for $ms_host_name", $callback); + return (1, "Cannot get nodeid for $ms_host_name"); } + + $result= xCAT::Utils::toIP( $master ); + if ( @$result[0] != 0 ) { + reportError("Cannot resolve $master", $callback); + return (1, "Cannot resolve $master"); + } + $ms_ipaddresses="{" . @$result[1] . "}"; } if (!$rmcHash{$node}) {