Change start/stop subrouting so that when monstart/monstop gangliamon -r is invoked, gmetad/gmond on the localhost does not restart. If you invoke monstart/monstop gangliamon <node> -r for one node, gmetad/gmond restarts on that one node, BUT gmetad/gmond is also restarted on the localhost. This causes all data to be lost for other nodes being monitored. With this change, monstart/monstop gangliamon -r will ONLY start/stop monitor on given nodes and NOT on localhost. monstart/monstop gangliamon without the "-r" will start/stop the monitoring on the localhost.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10749 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2011-10-12 04:27:51 +00:00
parent 9f2e8a975f
commit dee529dafd

View File

@ -819,17 +819,19 @@ sub stop {
my $callback = shift;
my $localhost = hostname();
my $OS = `uname`;
my $res_gmond;
if ( $OS =~ /AIX/ ) {
$res_gmond = `/etc/rc.d/init.d/gmond stop 2>&1`;
}
else {
$res_gmond = `/etc/init.d/gmond stop 2>&1`;
}
if (!$scope) {
# Handle stopping monitoring on localhost
# monstop gangliamon
my $res_gmond;
if ( $OS =~ /AIX/ ) {
$res_gmond = `/etc/rc.d/init.d/gmond stop 2>&1`;
}
else {
$res_gmond = `/etc/init.d/gmond stop 2>&1`;
}
if ($?) {
if ($callback) {
my $resp = {};