From f0da8d0244cbb5d0e9417cab075967538e3c2cab Mon Sep 17 00:00:00 2001 From: ellen56 Date: Tue, 30 Jun 2009 14:48:24 +0000 Subject: [PATCH] fix bug 2812004 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3674 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/monitoring/gangliamon.pm | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/xCAT-server/lib/xcat/monitoring/gangliamon.pm b/xCAT-server/lib/xcat/monitoring/gangliamon.pm index 3143b20af..9ca5f379c 100755 --- a/xCAT-server/lib/xcat/monitoring/gangliamon.pm +++ b/xCAT-server/lib/xcat/monitoring/gangliamon.pm @@ -277,7 +277,8 @@ sub confGmond my $str = join('',@raw_data); $str =~ s/setuid = yes/setuid = no/; $str =~ s/bind/#bind/; - $str =~ s/mcast_join = .*/host = $master/; +# $str =~ s/mcast_join = .*/host = $master/; + $str =~ s/mcast_join = .*/host = $hostname/; my $pPairHash=xCAT_monitoring::monitorctrl->getMonServer($noderef); if (ref($pPairHash) eq 'ARRAY') { @@ -357,7 +358,8 @@ sub confGmond my $str = join('',@raw_data); $str =~ s/setuid = yes/setuid = no/; $str =~ s/bind/#bind/; - $str =~ s/mcast_join = .*/host = $master/; +# $str =~ s/mcast_join = .*/host = $master/; + $str =~ s/mcast_join = .*/host = $hostname/; my $pPairHash=xCAT_monitoring::monitorctrl->getMonServer($noderef); if (ref($pPairHash) eq 'ARRAY') { if ($callback) { @@ -600,17 +602,21 @@ sub confGmetad my $num=@children; if (-e "/etc/xCATSN") { - for (my $i = 0; $i < $num; $i++) - { - print ( OUTFILE "data_source \"$cluster\" $children[ $i ] \n"); - } + print ( OUTFILE "gridname \"$cluster\"\n"); + print ( OUTFILE "data_source \"$cluster\" localhost\n"); + my $master=xCAT::Utils->get_site_Master(); + print ( OUTFILE "trusted_hosts $master\n"); +# for (my $i = 0; $i < $num; $i++) +# { +# print ( OUTFILE "data_source \"$cluster\" $children[ $i ] \n"); +# } } else { for (my $j = 0; $j < $num; $j++) { - print ( OUTFILE "data_source \"$children[ $j ]\" $children[ $j ] \n"); + print ( OUTFILE "data_source \"$children[ $j ]\" $children[ $j ]:8651 \n"); } } print(OUTFILE "# xCAT gmetad settings done \n"); @@ -698,17 +704,22 @@ else my $num=@children; if (-e "/etc/xCATSN") { - for (my $i = 0; $i < $num; $i++) - { - print ( OUTFILE "data_source \"$cluster\" $children[ $i ] \n"); - } + print ( OUTFILE "gridname \"$cluster\"\n"); + print ( OUTFILE "data_source \"$cluster\" localhost\n"); + my $master=xCAT::Utils->get_site_Master(); + print ( OUTFILE "trusted_hosts $master\n"); + +# for (my $i = 0; $i < $num; $i++) +# { +# print ( OUTFILE "data_source \"$cluster\" $children[ $i ] \n"); +# } } else { for (my $j = 0; $j < $num; $j++) { - print ( OUTFILE "data_source \"$children[ $j ]\" $children[ $j ] \n"); + print ( OUTFILE "data_source \"$children[ $j ]\" $children[ $j ]:8651 \n"); } } print(OUTFILE "# xCAT gmetad settings done \n");