Hi,
the following patch fixes two issues with the proc count collection
in the post_install step.
for some reason $mach->{hostname} is empty. $mach->{name} can be
used instead. (i did not investigate why $mach->{hostname} is empty - a more
proper fix may be to make sure $mach->{hostname} is populated correctly).
also the assignment of $mach->{proccounts} was invalid.
without this patch i would get the following error durign step 7:
=============================================================================
== Running step 7 of the OSCAR wizard: Complete cluster setup
=============================================================================
--> Update Wizard Env (as needed)
--> Step 7: Running: /usr/bin/post_install
--> Gathering processor count from .)
ssh: cat: Name or service not known
Improper count (0) returned from machine at /usr/bin/post_install line 129
main::get_numproc() called at /usr/bin/post_install line 64
ERROR: Impossible to get proc number at /usr/bin/post_install line 65
tested on centos 5.3 with latest oscar packages.
kind regards
Thilo
[r...@buster scripts]# svn diff
Index: post_install
===================================================================
--- post_install (revision 8673)
+++ post_install (working copy)
@@ -114,11 +114,11 @@
sub get_numproc {
my @machines= sortclients list_client();
foreach my $mach (@machines) {
- my $CMD="/usr/bin/ssh -n ".$mach->{hostname}." cat
/proc/cpuinfo";
+ my $CMD="/usr/bin/ssh -n ".$mach->{name}." cat /proc/cpuinfo";
oscar_log_subsection ("Gathering processor count from " .
- $mach->{hostname}.".)");
+ $mach->{name}.".)");
open (CPIPE,"$CMD |")
- or (carp("Unable to query machine ".$mach->{hostname}),next);
+ or (carp("Unable to query machine ".$mach->{name}),next);
my $count=0;
while (<CPIPE>) {
++$count if (/^processor/);
@@ -126,12 +126,12 @@
close(CPIPE);
if (($count !~ /^[0-9]+$/) || ($count == 0)) {
carp("Improper count ($count) returned from machine " .
- $mach->{hostname});
+ $mach->{name});
return -1;
} else {
oscar_log_subsection ("Updating database for machine " .
- $mach->{hostname} . " cpus=$count.");
- $mach->proccount($count);
+ $mach->{name} . " cpus=$count.");
+ $mach->{proccount} = $count ;
SIS::NewDB::set_client($mach);
}
}
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Oscar-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-users