John,

I fixed this in trunk. Please copy the attached file to
$OSCAR_HOME/packages/ganglia/scripts

If you need to rerun this (such that you apply the change to an image) you
should do:

cd $OSCAR_HOME/packages/ganglia
env OSCAR_PACKAGE_HOME=`pwd` scripts/post_rpm_nochroot 
/var/lib/systemimager/images/$YOURIMAGENAME

Regards,
Erich

On Wednesday 02 August 2006 16:09, John Meskes wrote:
> On 1 Aug 2006 at 23:01, Bernard Li wrote:
> 
> > Hi John:
> > Can you check your headnode's /etc/gmond.conf to see if it has the correct 
> > port number entries?  It should get modified during the <Install OSCAR 
> > Server Packages> step.
> 
> Yes, just to confirm, I did a complete reinstall, all steps in order.
> In step 2, ganglia, I set both port fields to 8659 (old+10 is that ok?)
> At the end of the install, the headnode's /etc/gmond.conf contained:
> 
> /* Feel free to specify as many udp_send_channels as you like.  Gmond 
>    used to only support having a single channel */ 
> udp_send_channel { 
>   mcast_join = 239.2.11.71 
> port = 8659
> } 
> 
> /* You can specify as many udp_recv_channels as you like as well. */ 
> udp_recv_channel { 
>   mcast_join = 239.2.11.71 
> port = 8659
>   bind = 239.2.11.71 
> } 
> 
> /* You can specify as many tcp_accept_channels as you like to share 
>    an xml description of the state of the cluster */ 
> tcp_accept_channel { 
>   port = 8649 
> }
> 
> and all the nodes' /etc/gmond.conf still contained 8649 in all 3 locations.
> (Sorry, did a simple edit-in-place, and didn't keep the original for "proof" 
> :-)
> 
> > I did a quick test, and it doesn't appear that this modfication of the port 
> > numbers get propagated to either the image nor to the nodes after the 
> > <Complete Cluster Setup> step.
> >  
> > Sounds like a bug need to be filed :-)
> >  
> > Thanks,
> >  
> > Bernard
> > 
> > ________________________________
> > 
> > From: [EMAIL PROTECTED] on behalf of John Meskes
> > Sent: Tue 01/08/2006 09:07
> > To: Bernard Li; [email protected]
> > Subject: Re: [Oscar-devel] ganglia/gmond alternate port
> > 
> > 
> > 
> > On 31 Jul 2006 at 17:50, Bernard Li wrote:
> > 
> > > Hi John:
> > > What exactly are you trying to do?
> > 
> > The other cluster that I finished last month is on the same physical 
> > network,
> > so need to choose a different port number so ganglia doesn't see them.
> > 
> > > After you made the changes, did you run "Complete Cluster Setup"?  As
> > > far as I know the configuration step is only used during the initial
> > > deployment and I am pretty certain that some of the changes require you
> > > to re-run the post_install step ("Complete Cluster Setup") to take
> > > effect.
> > 
> > I reinstalled very carefully this time. I think previously I missed the 
> > second
> > port number entry on the ganglia config screen (could that screen be
> > enlarged so scrolling is not necessary?)
> > After Complete Cluster Setup, the ganglia webpage still did not see the
> > nodes. I also re-ran Complete Cluster Setup, both in the current session,
> > and after quit, logout, login, oscar_wizard, but still no nodes showed up.
> > I had to edit the port under udp_send_channel (only) on each node and
> > restart gmond on all nodes, then they all showed up on the webpage.
> > [perhaps it is not pushing gmond.conf to the nodes?]
> > 
> > > You might also be interested in enabling the per-image ganglia gmond
> > > option.
> > 
> > I only have one image on this (suse) cluster, and it is a different 
> > frontnode
> > from the other (CentOS) cluster. Different subnets too, just happens to be
> > on the same switch.
> > 
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] On Behalf
> > > > Of John Meskes
> > > > Sent: Monday, July 31, 2006 15:27
> > > > To: [email protected]
> > > > Subject: [Oscar-devel] ganglia/gmond alternate port
> > > >
> > > > Has anyone tried entering an alternate port number to 8649 in Step 2
> > > > configure selected OSCAR packages, Ganglia.
> > > > It changes the udp_send_channel on master, but nothing else, and no
> > > > difference is seen on the ganglia webpage. I then manually changed
> > > > /etc/gmond.conf udp_recv_channel port as well, plus changed
> > > > all 3 port
> > > > references in that file on all the nodes, now the webpage
> > > > only shows this
> > > > cluster.

#!/usr/bin/env /usr/bin/perl
#########################################################################
#  Script Name : post_rpm_nochroot
#  Written by  : Erich Focht
#  Date        : November 24, 2003
#  Purpose     : This post_install script configures gmond for the
#                nodes of a particular image.
#  Copyright (c) Erich Focht 2003-2005
#                All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#########################################################################
# $Id: post_rpm_nochroot 5267 2006-08-02 12:46:12Z efocht $
#########################################################################

use strict;
use lib "$ENV{OSCAR_HOME}/lib";
use Carp;
use POSIX;
use XML::Simple;
use Tk;
use OSCAR::Configbox;
use OSCAR::Database;
use lib '/usr/lib/systeminstaller';
use SIS::DB;
use SIS::Image;

my $configdir = "$ENV{OSCAR_PACKAGE_HOME}/.configs";

my $imagedir = shift @ARGV;
$imagedir =~ s/\/$//;
my $image = $imagedir;
$image =~ s:^.*/::g;

my $window;

#####################
# BEGIN MAIN SCRIPT #
#####################

my $imageconf = $configdir."/".$image;
my $masterconf = $ENV{OSCAR_PACKAGE_HOME}."/configurator.html";

my $master_conf;
if (-e $masterconf) {
    $master_conf = readInConfigValues($masterconf,"ganglia","",noarray=>1);
    # if no per-image config : edit image with global settings
    if ($master_conf->{gmond_per_image} ne "YES") {
        goto run_image_conf;
    }
} else {
    # default values, so no per-image config!
    exit 0;
}

if (! -d $configdir) {
    !system("mkdir ".$configdir) || do {
        print "Could not create directory $configdir\n";
        exit 1;
    };
}

my $i = list_image(name=>$image);
if (!$i) {
    carp "Could not find image $image!";
    exit 1;
}

print "configuring gmond for image=$image\n";

if (! -d $imageconf) {
    !system("mkdir ".$imageconf) || do {
        print "Could not create directory $imageconf\n";
        exit 1;
    };
    if (! -e $imageconf."/configurator.html") {
        !system("sed -e \"s/[EMAIL PROTECTED]@/$image/\" ".
                "< $ENV{OSCAR_PACKAGE_HOME}/configurator_image.html ".
                "> $imageconf/configurator.html") or
                croak("Could not create $imageconf/configurator.html! $!\n");
    }
} else {
    print "Found $imageconf\n";
}

# configure this only if no config values found in database
my @res = get_pkgconfig_vars(opkg => "ganglia", context => "image:$image");
if ([EMAIL PROTECTED]) {
    OSCAR::Configbox::configurePackage(0, $imageconf,"ganglia","image:$image");
    MainLoop();
}

#
# do the gmond configuration according to the values file
#
run_image_conf:
exec "$ENV{OSCAR_PACKAGE_HOME}/scripts/edit_ganglia_conf --gmond --image $image 
--verbose"
    or carp("Could not run edit_ganglia_conf! $!");

exit 0;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to