From 9f4ef6af0530e8ae5e63a7e827edacd22c60f6c2 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 13 May 2008 14:03:46 +0000 Subject: [PATCH] -Reduce conserver load at startup, staggered start and delayed allocation to keep window of large overhead down git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1364 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/share/xcat/cons/blade | 15 ++++++++++----- xCAT-server-2.0/share/xcat/cons/ipmi | 11 +++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/xCAT-server-2.0/share/xcat/cons/blade b/xCAT-server-2.0/share/xcat/cons/blade index ca9b330d9..300839a56 100755 --- a/xCAT-server-2.0/share/xcat/cons/blade +++ b/xCAT-server-2.0/share/xcat/cons/blade @@ -2,18 +2,23 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html BEGIN { + use Time::HiRes qw(sleep); $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; + my $sleepint=int(rand(10)); + print "Opening console in ".(2+(0.5*$sleepint))." seconds...\n"; + sleep $sleepint; } use lib "$::XCATROOT/lib/perl"; -use xCAT::Table; -use xCAT::Utils; -use File::Basename; +require xCAT::Table; +require xCAT::Utils; +require File::Basename; +import File::Basename; my $scriptname = $0; $mptab = xCAT::Table->new('mp'); unless ($mptab) { - sleep 5; #Try not to overwhelm logfiles... + #sleep 5; #Try not to overwhelm logfiles... die "mp table must be configured"; } $mpatab = xCAT::Table->new('mpa'); @@ -45,7 +50,7 @@ if ($mpatab) { } } xCAT::Utils::close_all_dbhs; -sleep 5; #Slow start, I know, but with exec, can't return +#sleep 5; #Slow start, I know, but with exec, can't return exec "ssh -t $username"."@"."$mm console -o -T blade[$slot]"; #my $pathtochild= dirname($scriptname). "/"; #exec $pathtochild."blade.expect $mm $slot $username $password"; diff --git a/xCAT-server-2.0/share/xcat/cons/ipmi b/xCAT-server-2.0/share/xcat/cons/ipmi index bc2e6cdbc..94f357486 100755 --- a/xCAT-server-2.0/share/xcat/cons/ipmi +++ b/xCAT-server-2.0/share/xcat/cons/ipmi @@ -2,16 +2,19 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html BEGIN { + use Time::HiRes qw(sleep); $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; + my $sleepint=int(rand(10)); + print "Opening console in ".(2+(0.5*$sleepint))." seconds...\n"; + sleep $sleepint; } $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; use lib "$::XCATROOT/lib/perl"; -use xCAT::Table; -use xCAT::Utils; -use Time::HiRes qw(sleep); +require xCAT::Table; +require xCAT::Utils; my $dba; my $ipmitab = xCAT::Table->new('ipmi'); -unless ($ipmitab) { sleep 5; die "Unable to open IPMI table"; } +unless ($ipmitab) { die "Unable to open IPMI table"; } my $passtab = xCAT::Table->new('passwd'); my $username = 'USERID'; my $password = 'PASSW0RD';