mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 01:26:38 +00:00
Fix sourceforge bug #4691 Use a consistent log tag for xCAT log
This commit is contained in:
parent
fd613535d0
commit
ca4437270a
@ -30,12 +30,12 @@ foreach (@extSchema) {
|
||||
my $modname = $1;
|
||||
no strict 'refs';
|
||||
my $warning;
|
||||
# `logger -t xCAT processing $_`;
|
||||
# `logger -t xcat processing $_`;
|
||||
eval {require($_)};
|
||||
if ($@) {
|
||||
$warning ="Warning: The user defined database table schema file $file cannot be located or has compiling errors.\n";
|
||||
print $warning;
|
||||
`logger -p local4.warning -t xCAT $warning`;
|
||||
`logger -p local4.warning -t xcat $warning`;
|
||||
next;
|
||||
}
|
||||
if (${"xCAT_schema::" . "$modname" . "::"}{tabspec}) {
|
||||
@ -44,7 +44,7 @@ foreach (@extSchema) {
|
||||
if (exists($ext_tabspec{$tabname})) {
|
||||
$warning = "Warning: File $file: the table name $tabname is used by other applications. Please rename the table.\n";
|
||||
print $warning;
|
||||
`logger -p local4.warning -t xCAT $warning`;
|
||||
`logger -p local4.warning -t xcat $warning`;
|
||||
} else {
|
||||
$ext_tabspec{$tabname}=$tabspec{$tabname};
|
||||
}
|
||||
@ -52,7 +52,7 @@ foreach (@extSchema) {
|
||||
} else {
|
||||
$warning ="\n Warning: Cannot find \%tabspec variable in the user defined database table schema file $file\n";
|
||||
print $warning;
|
||||
`logger -p local4.warning -t xCAT $warning`;
|
||||
`logger -p local4.warning -t xcat $warning`;
|
||||
}
|
||||
|
||||
#get the defspec from each file and merge them into %ext_defspec
|
||||
@ -74,7 +74,7 @@ foreach (@extSchema) {
|
||||
if (exists($tmp_hash{$attrname})) {
|
||||
$warning= " Warning: Conflict when adding user defined defspec from file $file. Attribute name $attrname is already defined in object $objname. \n";
|
||||
print $warning;
|
||||
`logger -p local4.warning -t xCAT $warning`;
|
||||
`logger -p local4.warning -t xcat $warning`;
|
||||
} else {
|
||||
#print "\ngot here objname=$objname, attrname=" . $h->{attr_name} . "\n";
|
||||
push(@{$ext_defspec{$objname}->{'attrs'}}, $h);
|
||||
|
@ -22,18 +22,18 @@ if [ -z "$NODE" ]; then
|
||||
NODE=`hostname`
|
||||
fi
|
||||
|
||||
#logger -t xCAT -p local4.info "configrmcnode: ADD=$ADD, NODE=$NODE, NODEID=$NODEID MONMASTER=$MONMASTER,MS_NODEID=$MS_NODEID"
|
||||
#logger -t xcat -p local4.info "configrmcnode: ADD=$ADD, NODE=$NODE, NODEID=$NODEID MONMASTER=$MONMASTER,MS_NODEID=$MS_NODEID"
|
||||
|
||||
#check if rsct is installed and running
|
||||
if [ ! -e /usr/bin/lsrsrc ]; then
|
||||
logger -t xCAT -p local4.err "RMC setup on node $NODE: RSCT is not is not installed."
|
||||
logger -t xcat -p local4.err "RMC setup on node $NODE: RSCT is not is not installed."
|
||||
exit 1;
|
||||
else
|
||||
PID=`/bin/ps -ef | /bin/grep rmcd | /bin/grep -v grep | /bin/awk '{print $2}'`
|
||||
if [ -z "$PID" ]; then
|
||||
result=`/usr/sbin/rsct/bin/rmcctrl -s 2>&1`;
|
||||
if [ $? -gt 0 ]; then
|
||||
logger -t xCAT -p local4.err "RMC deamon cannot be started on node $NODE:$result"
|
||||
logger -t xcat -p local4.err "RMC deamon cannot be started on node $NODE:$result"
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
@ -61,7 +61,7 @@ do
|
||||
done
|
||||
if [[ $rc -ne 0 ]]
|
||||
then
|
||||
logger -t xCAT -p local4.err "RMC subsystem has not started"
|
||||
logger -t xcat -p local4.err "RMC subsystem has not started"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -79,7 +79,7 @@ if [ $ADD -eq 1 ]; then
|
||||
result=`/usr/sbin/rsct/install/bin/recfgctnid $NODEID 2>&1`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Reset nodeid: $result"
|
||||
logger -t xCAT -p local4.info "Reset nodeid: $result"
|
||||
logger -t xcat -p local4.info "Reset nodeid: $result"
|
||||
fi
|
||||
else
|
||||
#stop all rmc daemons
|
||||
@ -103,7 +103,7 @@ if [ $ADD -eq 1 ]; then
|
||||
result=`/usr/sbin/rsct/install/bin/recfgct -s 2>&1`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "RMC setup on node $NODE: Cannot reconfig RSCT with new node id"
|
||||
logger -t xCAT -p local4.warning "RMC setup on node $NODE: Cannot reconfig RSCT with new node id"
|
||||
logger -t xcat -p local4.warning "RMC setup on node $NODE: Cannot reconfig RSCT with new node id"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -115,7 +115,7 @@ if [ $ADD -eq 1 ]; then
|
||||
result=`/usr/sbin/rsct/bin/rmcctrl -s 2>&1`;
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "RMC deamon cannot be started on node $NODE:$result"
|
||||
logger -t xCAT -p local4.err "RMC deamon cannot be started on node $NODE:$result"
|
||||
logger -t xcat -p local4.err "RMC deamon cannot be started on node $NODE:$result"
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
@ -142,7 +142,7 @@ if [ $ADD -eq 1 ]; then
|
||||
done
|
||||
if [[ $rc -ne 0 ]]
|
||||
then
|
||||
logger -t xCAT -p local4.err "RMC subsystem has not started"
|
||||
logger -t xcat -p local4.err "RMC subsystem has not started"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -162,14 +162,14 @@ if [ $ADD -eq 1 ]; then
|
||||
ms_ip=`expr substr "$result" $pos $length`
|
||||
else
|
||||
echo "RMC setup on node $NODE:$result"
|
||||
logger -t xCAT -p local4.info "RMC setup on node $NODE:$result"
|
||||
logger -t xcat -p local4.info "RMC setup on node $NODE:$result"
|
||||
fi
|
||||
|
||||
#define resource in IBM.MCP class on node
|
||||
result1=`/usr/bin/mkrsrc-api IBM.MCP::MNName::"$NODE"::KeyToken::"$MONMASTER"::IPAddresses::"{\"$ms_ip\"}"::NodeID::0x$MS_NODEID 2>&1`
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Define resource in IBM.MCP class on node $NODE. result=$result1"
|
||||
logger -t xCAT -p local4.err "Define resource in IBM.MCP class on node $NODE. result=$result1"
|
||||
logger -t xcat -p local4.err "Define resource in IBM.MCP class on node $NODE. result=$result1"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@ -209,7 +209,7 @@ if [ $ADD -eq 1 ]; then
|
||||
fi
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Failed to mount:$result"
|
||||
logger -t xCAT -p local4.err "Failed to mount $result"
|
||||
logger -t xcat -p local4.err "Failed to mount $result"
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p /var/xcat/rmcmon/scripts
|
||||
@ -236,7 +236,7 @@ else
|
||||
fi
|
||||
else
|
||||
echo "$result"
|
||||
logger -t xCAT -p local4.err "$result"
|
||||
logger -t xcat -p local4.err "$result"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@ -245,13 +245,13 @@ else
|
||||
result2=`/usr/bin/rmrsrc-api -s IBM.MCP::"NodeID=0x$MS_NODEID" 2>&1`
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Remove resource in IBM.MCP class on noderesult=$result2"
|
||||
logger -t xCAT -p local4.err "Remove resource in IBM.MCP class on noderesult=$result2"
|
||||
logger -t xcat -p local4.err "Remove resource in IBM.MCP class on noderesult=$result2"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "done"
|
||||
logger -t xCAT -p local4.info "done"
|
||||
logger -t xcat -p local4.info "done"
|
||||
exit 0;
|
||||
|
||||
|
||||
|
@ -62,7 +62,7 @@ if (!$batch) {
|
||||
if ($attrName eq '"Status"') { $status = $attrValue; }
|
||||
}
|
||||
} else {
|
||||
`logger -t xCAT -p local4.err "[mon]: updatexcatnodestatus: This script does not handle condition $cond_name"`;
|
||||
`logger -t xcat -p local4.err "[mon]: updatexcatnodestatus: This script does not handle condition $cond_name"`;
|
||||
exit 1;
|
||||
}
|
||||
my $status_string;
|
||||
@ -82,12 +82,12 @@ if (!$batch) {
|
||||
my $result=`$::XCATROOT/sbin/chtab node=$node nodelist.status=$status_string nodelist.statustime="$currtime" 2>&1`;
|
||||
my $code=$?;
|
||||
if ($code) {
|
||||
`logger -t xCAT -p local4.err "[mon]: Error saving node status ($node,$status_string) to xCAT:$result"`;
|
||||
`logger -t xcat -p local4.err "[mon]: Error saving node status ($node,$status_string) to xCAT:$result"`;
|
||||
exit $code;
|
||||
}
|
||||
} else { #batch event
|
||||
if ($cond_name ne "NodeReachability_Batch") {
|
||||
`logger -t xCAT -p local4.err "[mon]: updatexcatnodestatus: This script does not handle condition $cond_name"`;
|
||||
`logger -t xcat -p local4.err "[mon]: updatexcatnodestatus: This script does not handle condition $cond_name"`;
|
||||
exit 1;
|
||||
}
|
||||
if ($ENV{ERRM_COND_BATCH_NUM} > 0) {
|
||||
@ -157,7 +157,7 @@ if (!$batch) {
|
||||
my $result=`XCATBYPASS=Y $::XCATROOT/bin/nodech $node_string nodelist.status=active nodelist.statustime="$currtime" 2>&1`;
|
||||
my $code=$?;
|
||||
if ($code) {
|
||||
`logger -t xCAT -p local4.warning "[mon]: Error saving node status ($node_string,active) to xCAT:$result"`;
|
||||
`logger -t xcat -p local4.warning "[mon]: Error saving node status ($node_string,active) to xCAT:$result"`;
|
||||
}
|
||||
}
|
||||
if (@inactive > 0) {
|
||||
@ -176,7 +176,7 @@ if (!$batch) {
|
||||
|
||||
my $code=$?;
|
||||
if ($code) {
|
||||
`logger -t xCAT -p local4.warning "[mon]: Error saving node status ($node_string,inactive) to xCAT:$result"`;
|
||||
`logger -t xcat -p local4.warning "[mon]: Error saving node status ($node_string,inactive) to xCAT:$result"`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,10 +128,10 @@ sub process_request
|
||||
my ($rootkeyparm,$zonename) = split(/:/,$parm);
|
||||
if ($zonename) {
|
||||
$parm=$rootkeyparm; # take the zone off
|
||||
`logger -t xCAT -p local4.info "credentials: The node is asking for zone:$zonename sshkeys ."`;
|
||||
`logger -t xcat -p local4.info "credentials: The node is asking for zone:$zonename sshkeys ."`;
|
||||
$sshrootkeydir = xCAT::Zone->getzonekeydir($zonename);
|
||||
if ($sshrootkeydir == 1) { # error return
|
||||
`logger -t xCAT -p local4.info "credentials: The node is asking for zone:$zonename sshkeys and the $zonename is not defined."`;
|
||||
`logger -t xcat -p local4.info "credentials: The node is asking for zone:$zonename sshkeys and the $zonename is not defined."`;
|
||||
} else {
|
||||
$foundkeys=1; # don't want to read the zone data twice
|
||||
}
|
||||
@ -141,85 +141,85 @@ sub process_request
|
||||
if ($parm =~ /ssh_root_key/) {
|
||||
unless (-r "$sshrootkeydir/id_rsa") {
|
||||
push @{$rsp->{'error'}},"Unable to read root's private ssh key";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read root's private ssh key"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read root's private ssh key"` ;
|
||||
next;
|
||||
}
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
$tfilename = "$sshrootkeydir/id_rsa";
|
||||
`logger -t xCAT -p local4.info "credentials: The ssh root private key is in $tfilename."`;
|
||||
`logger -t xcat -p local4.info "credentials: The ssh root private key is in $tfilename."`;
|
||||
|
||||
} elsif ($parm =~ /ssh_root_pub_key/) {
|
||||
unless (-r "$sshrootkeydir/id_rsa.pub") {
|
||||
push @{$rsp->{'error'}},"Unable to read root's public ssh key";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read root's public ssh key"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read root's public ssh key"` ;
|
||||
next;
|
||||
}
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
$tfilename = "$sshrootkeydir/id_rsa.pub";
|
||||
`logger -t xCAT -p local4.info "credentials: The ssh root public key is in $tfilename."`;
|
||||
`logger -t xcat -p local4.info "credentials: The ssh root public key is in $tfilename."`;
|
||||
|
||||
} elsif ($parm =~ /xcat_server_cred/) {
|
||||
unless (-r "/etc/xcat/cert/server-cred.pem") {
|
||||
push @{$rsp->{'error'}},"Unable to read xcat_server_cred";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read xcat_server_cred"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read xcat_server_cred"` ;
|
||||
next;
|
||||
}
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
$tfilename = "/etc/xcat/cert/server-cred.pem";
|
||||
|
||||
} elsif (($parm =~ /xcat_client_cred/) or ($parm =~ /xcat_root_cred/)) {
|
||||
unless (-r "$root/.xcat/client-cred.pem") {
|
||||
push @{$rsp->{'error'}},"Unable to read xcat_client_cred or xcat_root_cred";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read xcat_client_cred or xcat_root_cred"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read xcat_client_cred or xcat_root_cred"` ;
|
||||
next;
|
||||
}
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
$tfilename = "$root/.xcat/client-cred.pem";
|
||||
|
||||
} elsif ($parm =~ /ssh_dsa_hostkey/) {
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
if (-r "/etc/xcat/hostkeys/$client/ssh_host_dsa_key") {
|
||||
$tfilename="/etc/xcat/hostkeys/$client/ssh_host_dsa_key";
|
||||
} elsif (-r "/etc/xcat/hostkeys/ssh_host_dsa_key") {
|
||||
$tfilename="/etc/xcat/hostkeys/ssh_host_dsa_key";
|
||||
} else {
|
||||
push @{$rsp->{'error'}},"Unable to read private DSA key from /etc/xcat/hostkeys";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read private DSA key"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read private DSA key"` ;
|
||||
next;
|
||||
}
|
||||
} elsif ($parm =~ /ssh_rsa_hostkey/) {
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
if (-r "/etc/xcat/hostkeys/$client/ssh_host_rsa_key") {
|
||||
$tfilename="/etc/xcat/hostkeys/$client/ssh_host_rsa_key";
|
||||
} elsif (-r "/etc/xcat/hostkeys/ssh_host_rsa_key") {
|
||||
$tfilename="/etc/xcat/hostkeys/ssh_host_rsa_key";
|
||||
} else {
|
||||
push @{$rsp->{'error'}},"Unable to read private RSA key from /etc/xcat/hostkeys";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read private RSA key"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read private RSA key"` ;
|
||||
next;
|
||||
}
|
||||
} elsif ($parm =~ /ssh_ecdsa_hostkey/) {
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
if (-r "/etc/xcat/hostkeys/$client/ssh_host_ecdsa_key") {
|
||||
$tfilename="/etc/xcat/hostkeys/$client/ssh_host_ecdsa_key";
|
||||
} elsif (-r "/etc/xcat/hostkeys/ssh_host_ecdsa_key") {
|
||||
$tfilename="/etc/xcat/hostkeys/ssh_host_ecdsa_key";
|
||||
} else {
|
||||
push @{$rsp->{'error'}},"Unable to read private ECDSA key from /etc/xcat/hostkeys";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read private ECDSA key"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read private ECDSA key"` ;
|
||||
next;
|
||||
}
|
||||
} elsif ($parm =~ /xcat_cfgloc/) {
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
unless (-r "/etc/xcat/cfgloc") {
|
||||
push @{$rsp->{'error'}},"Unable to read /etc/xcat/cfgloc ";
|
||||
`logger -t xCAT -p local4.info "credentials: Unable to read /etc/xcat/cfgloc"` ;
|
||||
`logger -t xcat -p local4.info "credentials: Unable to read /etc/xcat/cfgloc"` ;
|
||||
next;
|
||||
}
|
||||
$tfilename = "/etc/xcat/cfgloc";
|
||||
|
||||
} elsif ($parm =~ /krb5_keytab/) { #TODO: MUST RELAY TO MASTER
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
my $princsuffix=$request->{'_xcat_clientfqdn'}->[0];
|
||||
$ENV{KRB5CCNAME}="/tmp/xcat/krb5cc_xcat_$$";
|
||||
system('kinit -S kadmin/admin -k -t /etc/xcat/krb5_pass xcat/admin');
|
||||
@ -244,7 +244,7 @@ sub process_request
|
||||
unlink "/tmp/xcat/keytab.$$";
|
||||
next;
|
||||
} elsif ($parm =~ /x509cert/) {
|
||||
`logger -t xCAT -p local4.info "credentials: sending $parm"` ;
|
||||
`logger -t xcat -p local4.info "credentials: sending $parm"` ;
|
||||
my $csr = $request->{'csr'}->[0];
|
||||
my $csrfile;
|
||||
my $oldumask = umask 0077;
|
||||
|
@ -90,7 +90,7 @@ sub process_request
|
||||
$notmpfiles=1; # no tmp files and no files
|
||||
$nofiles=1; # do not create /tftpboot/mypostscript/mypostscript.<nodename>
|
||||
@scriptcontents = xCAT::Postage::makescript([$client],$state,$callback,$notmpfiles,$nofiles);
|
||||
`logger -t xCAT -p local4.info "getpostscript: sending data"` ;
|
||||
`logger -t xcat -p local4.info "getpostscript: sending data"` ;
|
||||
$rsp->{data} = \@scriptcontents;
|
||||
$callback->($rsp);
|
||||
} else { # version 2, make files, do not return array
|
||||
|
@ -73,11 +73,11 @@ if (xCAT::Utils->isLinux())
|
||||
xCAT::Utils->runcmd("$cmd", -1);
|
||||
if ($::RUNCMD_RC == 0) {
|
||||
print "[ OK ]\n";
|
||||
system ("logger -p local4.info -t xCAT Restart xcatd: [ OK ].");
|
||||
system ("logger -p local4.info -t xcat Restart xcatd: [ OK ].");
|
||||
exit 0;
|
||||
} else {
|
||||
print "[ FAILED ]\n";
|
||||
system ("logger -p local4.info -t xCAT Restart xcatd: [ FAILED ].");
|
||||
system ("logger -p local4.info -t xcat Restart xcatd: [ FAILED ].");
|
||||
exit 1;
|
||||
}
|
||||
} elsif (!(xCAT::Utils->isAIX())) {
|
||||
|
@ -55,7 +55,7 @@ my $DBname = xCAT::Utils->get_DBName;
|
||||
if ($DBname ne "DB2") {
|
||||
|
||||
print " Inspect of table only supported for DB2 database\n";
|
||||
`logger -p local4.err -txcat "insptbls:Only supports DB2 database"` ;
|
||||
`logger -p local4.err -t xcat "insptbls:Only supports DB2 database"` ;
|
||||
exit 1;
|
||||
|
||||
}
|
||||
@ -66,7 +66,7 @@ if ($tablelist) { # input list of tables
|
||||
@tablist = xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
`logger -p local4.err -txcat " insptbls:error in select tabname from syscat.tables"` ;
|
||||
`logger -p local4.err -t xcat " insptbls:error in select tabname from syscat.tables"` ;
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
@ -106,26 +106,26 @@ foreach my $table (@tablist) {
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
`logger -p local4.warning -txcat " insptbls:error $cmd"`;
|
||||
`logger -p local4.warning -t xcat " insptbls:error $cmd"`;
|
||||
} else {
|
||||
`logger -p local4.info -txcat " insptbls: $cmd"`;
|
||||
`logger -p local4.info -t xcat " insptbls: $cmd"`;
|
||||
}
|
||||
$cmd="$::XCATROOT/sbin/runsqlcmd \"INSPECT ROWCOMPESTIMATE TABLE NAME $table results keep $table.res;\"";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
`logger -p local4.warning -txcat " insptbls:error INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
|
||||
`logger -p local4.warning -t xcat " insptbls:error INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
|
||||
} else {
|
||||
`logger -p local4.info -txcat " insptbls: INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
|
||||
`logger -p local4.info -t xcat " insptbls: INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
|
||||
}
|
||||
$cmd=" \"db2inspf $execdir$table.res /tmp/$table.out;\"";
|
||||
system("su - xcatdb -c $cmd");
|
||||
|
||||
if ($? > 0) # error
|
||||
{
|
||||
`logger -p local4.warning -txcat "insptbls:error db2inspf $table.res"`;
|
||||
`logger -p local4.warning -t xcat "insptbls:error db2inspf $table.res"`;
|
||||
} else {
|
||||
`logger -p local4.info -txcat " insptbls:db2inspf $table.res"`;
|
||||
`logger -p local4.info -t xcat " insptbls:db2inspf $table.res"`;
|
||||
}
|
||||
}
|
||||
exit 0;
|
||||
|
@ -13,7 +13,7 @@
|
||||
# Check for Linux, AIX not supported
|
||||
|
||||
if [ "$(uname -s)" != "Linux" ]; then
|
||||
logger -t xCAT -p local4.err "Merge: xdcp merge is only supported on Linux"
|
||||
logger -t xcat -p local4.err "Merge: xdcp merge is only supported on Linux"
|
||||
exit 1
|
||||
fi
|
||||
#this is the base path to the merge directory
|
||||
@ -42,7 +42,7 @@ for i in $*; do
|
||||
# if curfile not /etc/passwd or /etc/shadow or /etc/group
|
||||
# exit error
|
||||
#if [ "$curfile" != "/etc/passwd" ] && [ "$curfile" != "/etc/shadow" ] && [ "$curfile" != "/etc/group" ]; then
|
||||
# logger -t xCAT -p local4.err "Merge: $curfile is not /etc/passwd or /etc/shadow or /etc/group. It cannot be processes."
|
||||
# logger -t xcat -p local4.err "Merge: $curfile is not /etc/passwd or /etc/shadow or /etc/group. It cannot be processes."
|
||||
# exit 1
|
||||
#fi
|
||||
# get the directory to backup the original file
|
||||
|
@ -21,7 +21,7 @@ cmd="/usr/sbin/extendvg -f rootvg hdisk1"
|
||||
result=`$cmd 2>/dev/null`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.err "Could not run $cmd, error = $rc"
|
||||
logger -t xcat -p local4.err "Could not run $cmd, error = $rc"
|
||||
echo "Could not run $cmd, error = $rc"
|
||||
exit 1
|
||||
fi
|
||||
@ -31,7 +31,7 @@ cmd="/usr/sbin/mirrorvg -S rootvg hdisk1"
|
||||
result=`$cmd 2>/dev/null`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.err "Could not run $cmd, error = $rc"
|
||||
logger -t xcat -p local4.err "Could not run $cmd, error = $rc"
|
||||
echo "Could not run $cmd, error = $rc"
|
||||
exit 1
|
||||
fi
|
||||
@ -41,7 +41,7 @@ cmd="/usr/sbin/bosboot -ad /dev/hdisk1"
|
||||
result=`$cmd 2>/dev/null`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.err "Could not run $cmd, error = $rc"
|
||||
logger -t xcat -p local4.err "Could not run $cmd, error = $rc"
|
||||
echo "Could not run $cmd, error = $rc"
|
||||
exit 1
|
||||
fi
|
||||
@ -51,7 +51,7 @@ cmd="/usr/bin/bootlist -m normal hdisk0 hdisk1"
|
||||
result=`$cmd 2>/dev/null`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.err "Could not run $cmd, error = $rc"
|
||||
logger -t xcat -p local4.err "Could not run $cmd, error = $rc"
|
||||
echo "Could not run $cmd, error = $rc"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -2,10 +2,10 @@
|
||||
#get IP address of MS
|
||||
OS=`uname`
|
||||
echo "the OS is $OS"
|
||||
logger -t xCAT -p local4.info "the OS is $OS"
|
||||
logger -t xcat -p local4.info "the OS is $OS"
|
||||
ms_ip=$MONMASTER
|
||||
echo "MS IP is $ms_ip"
|
||||
logger -t xCAT -p local4.info "the MS is $ms_ip"
|
||||
logger -t xcat -p local4.info "the MS is $ms_ip"
|
||||
result=`ping -c1 $MONMASTER 2>&1`
|
||||
if [ $? -eq 0 ]; then
|
||||
index1=`expr index "$result" "\("`
|
||||
@ -17,12 +17,12 @@ result=`ping -c1 $MONMASTER 2>&1`
|
||||
ms_ip=`expr substr "$result" $pos $length`
|
||||
echo final is $ms_ip
|
||||
else
|
||||
logger -t xCAT -p local4.info "Gangliamon setup"
|
||||
logger -t xcat -p local4.info "Gangliamon setup"
|
||||
fi
|
||||
|
||||
CLUSTER=\"$MONSERVER\"
|
||||
echo "cluster is $CLUSTER"
|
||||
logger -t xCAT -p local4.info "cluster is $CLUSTER"
|
||||
logger -t xcat -p local4.info "cluster is $CLUSTER"
|
||||
MASTER=$ms_ip
|
||||
#echo "The new IP is: $NEW_IP"
|
||||
#echo "I will replace now....
|
||||
@ -31,10 +31,10 @@ gmond_conf_old="/etc/gmond.conf"
|
||||
|
||||
if [ $OS == "AIX" ]; then
|
||||
echo "into AIX loop"
|
||||
logger -t xCAT -p local4.info "into AIX loop"
|
||||
logger -t xcat -p local4.info "into AIX loop"
|
||||
if [ -f $gmond_conf_old ]; then
|
||||
echo "ganglia version 3.0.7"
|
||||
logger -t xCAT -p local4.info "ganglia version 3.0.7"
|
||||
logger -t xcat -p local4.info "ganglia version 3.0.7"
|
||||
grep "xCAT gmond settings done" $gmond_conf_old
|
||||
if [ $? -gt 0 ]; then
|
||||
/bin/cp -f $gmond_conf_old /etc/gmond.conf.orig
|
||||
@ -53,10 +53,10 @@ gmond_conf_old="/etc/gmond.conf"
|
||||
|
||||
if [ $OS == "AIX" ]; then
|
||||
echo "into AIX new loop"
|
||||
logger -t xCAT -p local4.info "into AIX new loop"
|
||||
logger -t xcat -p local4.info "into AIX new loop"
|
||||
if [ -f $gmond_conf ]; then
|
||||
echo "ganglia version v3.10"
|
||||
logger -t xCAT -p local4.info "ganglia version v3.10"
|
||||
logger -t xcat -p local4.info "ganglia version v3.10"
|
||||
grep "xCAT gmond settings done" $gmond_conf
|
||||
if [ $? -gt 0 ]; then
|
||||
/bin/cp -f $gmond_conf /etc/ganglia/gmond.conf.orig
|
||||
@ -78,7 +78,7 @@ gmond_conf_old="/etc/gmond.conf"
|
||||
|
||||
if [ $OS != "AIX" ]; then
|
||||
echo "not AIX"
|
||||
logger -t xCAT -p local4.info "not AIX"
|
||||
logger -t xcat -p local4.info "not AIX"
|
||||
if [ -f $gmond_conf ]; then
|
||||
grep "xCAT gmond settings done" $gmond_conf
|
||||
if [ $? -gt 0 ]; then
|
||||
@ -97,7 +97,7 @@ gmond_conf_old="/etc/gmond.conf"
|
||||
|
||||
if [ $OS != "AIX" ]; then
|
||||
echo "not AIX"
|
||||
logger -t xCAT -p local4.info "not AIX"
|
||||
logger -t xcat -p local4.info "not AIX"
|
||||
|
||||
if [ -f $gmond_conf_old ]; then
|
||||
grep "xCAT gmond settings done" $gmond_conf_old
|
||||
@ -117,13 +117,13 @@ fi
|
||||
if [ ! -f $gmond_conf ]; then
|
||||
# echo "file not found"
|
||||
logger -t gmonfail "gmond configuration file not found"
|
||||
logger -t xCAT -p local4.warning "gmond configuration file not found"
|
||||
logger -t xcat -p local4.warning "gmond configuration file not found"
|
||||
fi
|
||||
|
||||
if [ ! -f $gmond_conf_old ]; then
|
||||
# echo "file not found"
|
||||
logger -t gmonfail "gmond configuration file not found"
|
||||
logger -t xCAT -p local4.warning "gmond configuration file not found"
|
||||
logger -t xcat -p local4.warning "gmond configuration file not found"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -94,12 +94,12 @@ sleep 1
|
||||
#download the ssh host dsa private keys
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest received response return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest received response return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
|
||||
@ -112,7 +112,7 @@ grep -E '<error>' /tmp/ssh_dsa_hostkey
|
||||
if [ $? -ne 0 ]; then
|
||||
#the message received is the data
|
||||
cat /tmp/ssh_dsa_hostkey | grep -E -v '</{0,1}errorcode>|/{0,1}data>|</{0,1}content>|</{0,1}desc>' >/etc/ssh/ssh_host_dsa_key
|
||||
logger -t xCAT -p local4.info "remoteshell: getting ssh_host_dsa_key"
|
||||
logger -t xcat -p local4.info "remoteshell: getting ssh_host_dsa_key"
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
MYCONT=`cat /etc/ssh/ssh_host_dsa_key`
|
||||
@ -131,12 +131,12 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -154,19 +154,19 @@ if [ $? -ne 0 ]; then
|
||||
else
|
||||
#the message received is an error, so parse it
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /tmp/ssh_dsa_hostkey`
|
||||
logger -t xCAT -p local4.err Error: $ERR_MSG
|
||||
logger -t xcat -p local4.err Error: $ERR_MSG
|
||||
fi
|
||||
rm /tmp/ssh_dsa_hostkey
|
||||
|
||||
# download the host rsa key
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -178,7 +178,7 @@ grep -E '<error>' /tmp/ssh_rsa_hostkey
|
||||
if [ $? -ne 0 ]; then
|
||||
#the message received is the data we request
|
||||
cat /tmp/ssh_rsa_hostkey | grep -E -v '</{0,1}errorcode>|/{0,1}data>|</{0,1}content>|</{0,1}desc>' >/etc/ssh/ssh_host_rsa_key
|
||||
logger -t xCAT -p local4.info ssh_rsa_hostkey
|
||||
logger -t xcat -p local4.info ssh_rsa_hostkey
|
||||
MYCONT=`cat /etc/ssh/ssh_host_rsa_key`
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
@ -196,12 +196,12 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -220,7 +220,7 @@ if [ $? -ne 0 ]; then
|
||||
else
|
||||
#This is an error message
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /tmp/ssh_rsa_hostkey`
|
||||
logger -t xCAT -p local4.err Error: $ERR_MSG
|
||||
logger -t xcat -p local4.err Error: $ERR_MSG
|
||||
fi
|
||||
rm /tmp/ssh_rsa_hostkey
|
||||
|
||||
@ -229,12 +229,12 @@ if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then
|
||||
# download the host ecdsa key
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -246,7 +246,7 @@ if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then
|
||||
if [ $? -ne 0 ]; then
|
||||
#the message received is the data we request
|
||||
cat /tmp/ssh_ecdsa_hostkey | grep -E -v '</{0,1}errorcode>|/{0,1}data>|</{0,1}content>|</{0,1}desc>' >/etc/ssh/ssh_host_ecdsa_key
|
||||
logger -t xCAT -p local4.info ssh_ecdsa_hostkey
|
||||
logger -t xcat -p local4.info ssh_ecdsa_hostkey
|
||||
MYCONT=`cat /etc/ssh/ssh_host_ecdsa_key`
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
@ -264,12 +264,12 @@ if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then
|
||||
fi
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -288,7 +288,7 @@ if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then
|
||||
else
|
||||
#This is an error message
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /tmp/ssh_ecdsa_hostkey`
|
||||
logger -t xCAT -p local4.err Error: $ERR_MSG
|
||||
logger -t xcat -p local4.err Error: $ERR_MSG
|
||||
fi
|
||||
rm /tmp/ssh_ecdsa_hostkey
|
||||
fi
|
||||
@ -312,26 +312,26 @@ then
|
||||
zonename=$ZONENAME
|
||||
rootsshpvtkey=ssh_root_key:$zonename
|
||||
rootsshpubkey=ssh_root_pub_key:$zonename
|
||||
logger -t xCAT -p local4.info "remoteshell: gathering root ssh keys for $zonename"
|
||||
logger -t xcat -p local4.info "remoteshell: gathering root ssh keys for $zonename"
|
||||
|
||||
fi
|
||||
|
||||
# always get the id_rsa.pub key for the node and put in authorized_keys
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
|
||||
getcredentials.awk $rootsshpubkey | grep -E -v '</{0,1}xcatresponse>|</{0,1}serverdone>'|sed -e 's/</</' -e 's/>/>/' -e 's/&/&/' -e 's/"/"/' -e "s/'/'/" > /tmp/ssh_root_pub_key
|
||||
|
||||
logger -t xCAT -p local4.info "remoteshell: gathering $rootsshpubkey "
|
||||
logger -t xcat -p local4.info "remoteshell: gathering $rootsshpubkey "
|
||||
#check whether the message is an error or not
|
||||
grep -E '<error>' /tmp/ssh_root_pub_key
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -339,7 +339,7 @@ if [ $? -ne 0 ]; then
|
||||
cat /tmp/ssh_root_pub_key | grep -E -v '</{0,1}errorcode>|</{0,1}data>|</{0,1}content>|</{0,1}desc>' > /root/.ssh/id_rsa.pub
|
||||
# no add to authorized_keys, so the node can ssh to itself
|
||||
cat /tmp/ssh_root_pub_key | grep -E -v '</{0,1}errorcode>|</{0,1}data>|</{0,1}content>|</{0,1}desc>' >> /root/.ssh/authorized_keys
|
||||
logger -t xCAT -p local4.info ssh_root_pub_key
|
||||
logger -t xcat -p local4.info ssh_root_pub_key
|
||||
MYCONT=`cat /root/.ssh/id_rsa.pub`
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
@ -356,12 +356,12 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -372,34 +372,34 @@ if [ $? -ne 0 ]; then
|
||||
else
|
||||
#This is an error message
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /tmp/ssh_root_pub_key`
|
||||
logger -t xCAT -p local4.err $rootsshpubkey Error: $ERR_MSG
|
||||
logger -t xcat -p local4.err $rootsshpubkey Error: $ERR_MSG
|
||||
fi
|
||||
rm /tmp/ssh_root_pub_key
|
||||
|
||||
# if sshbetweennodes is enabled then we get id_rsa ( private key)
|
||||
if [ $ENABLESSHBETWEENNODES = "YES" ]; # want nodes to be able to ssh to each other without password
|
||||
then
|
||||
logger -t xCAT -p local4.info "remoteshell:sshbetweennodes is yes"
|
||||
logger -t xcat -p local4.info "remoteshell:sshbetweennodes is yes"
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
getcredentials.awk $rootsshpvtkey | grep -E -v '</{0,1}xcatresponse>|</{0,1}serverdone>'|sed -e 's/</</' -e 's/>/>/' -e 's/&/&/' -e 's/"/"/' -e "s/'/'/" > /tmp/ssh_root_key
|
||||
|
||||
logger -t xCAT -p local4.info "remoteshell: gathering $rootsshpvtkey "
|
||||
logger -t xcat -p local4.info "remoteshell: gathering $rootsshpvtkey "
|
||||
#check whether the message is an error or not
|
||||
grep -E '<error>' /tmp/ssh_root_key
|
||||
if [ $? -ne 0 ]; then
|
||||
#The message contains the data we request
|
||||
cat /tmp/ssh_root_key | grep -E -v '</{0,1}errorcode>|/{0,1}data>|</{0,1}content>|</{0,1}desc>' > /root/.ssh/id_rsa
|
||||
logger -t xCAT -p local4.info ssh_root_key
|
||||
logger -t xcat -p local4.info ssh_root_key
|
||||
MYCONT=`cat /root/.ssh/id_rsa`
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
@ -416,12 +416,12 @@ then
|
||||
fi
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -431,7 +431,7 @@ then
|
||||
else
|
||||
#This is an error message
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /tmp/ssh_root_key`
|
||||
logger -t xCAT -p local4.err $rootsshpvtkey Error: $ERR_MSG
|
||||
logger -t xcat -p local4.err $rootsshpvtkey Error: $ERR_MSG
|
||||
fi
|
||||
rm /tmp/ssh_root_key
|
||||
|
||||
@ -442,13 +442,13 @@ then
|
||||
if [ ! -f /root/.ssh/id_rsa.pub ]; then
|
||||
if [ -r /root/.ssh/id_rsa ]; then
|
||||
ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub
|
||||
logger -t xCAT -p local4.err remoteshell:transfer of the id_rsa.pub key failed. Had to generate a public key.
|
||||
logger -t xcat -p local4.err remoteshell:transfer of the id_rsa.pub key failed. Had to generate a public key.
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# start up the sshd for syncfiles postscript to do the sync work
|
||||
logger -t xCAT -p local4.info "start up sshd"
|
||||
logger -t xcat -p local4.info "start up sshd"
|
||||
|
||||
if [[ $OSVER == ubuntu* || $OSVER == debian* ]]
|
||||
then
|
||||
|
@ -785,7 +785,7 @@ if [ "$op" = "add" ]; then
|
||||
result=`$cmd 2>&1`
|
||||
code=$?
|
||||
if [ $code -ne 0 ]; then
|
||||
logger -t xCAT -p local4.err "$cmd\nerror code=$code, result=$result."
|
||||
logger -t xcat -p local4.err "$cmd\nerror code=$code, result=$result."
|
||||
echo " error code=$code, result=$result."
|
||||
if [ -f "/etc/debian_version" ];then
|
||||
exit 1;
|
||||
@ -835,7 +835,7 @@ elif [ "$op" = "delete" ]; then
|
||||
result=`$cmd 2>&1`
|
||||
code=$?
|
||||
if [ $code -ne 0 ]; then
|
||||
logger -t xCAT -p local4.err "$cmd\nerror code=$code, result=$result."
|
||||
logger -t xcat -p local4.err "$cmd\nerror code=$code, result=$result."
|
||||
echo " error code=$code, result=$result."
|
||||
fi
|
||||
else
|
||||
@ -888,7 +888,7 @@ elif [ "$op" = "replace" ]; then
|
||||
result=`$cmd 2>&1`
|
||||
code=$?
|
||||
if [ $code -ne 0 ]; then
|
||||
logger -t xCAT -p local4.err "Error: $cmd [error code=$code, result=$result]"
|
||||
logger -t xcat -p local4.err "Error: $cmd [error code=$code, result=$result]"
|
||||
echo "Error: $cmd [error code=$code, result=$result]"
|
||||
exit 1;
|
||||
fi
|
||||
|
@ -16,7 +16,7 @@ if [ "$NODESETSTATE" = "netboot" -o \
|
||||
"$NODESETSTATE" = "statelite" -o \
|
||||
"$NODESETSTATE" = "diskless" -o \
|
||||
"$NODESETSTATE" = "dataless" ]; then
|
||||
logger -t xCAT -p local4.info "setuppostbootscripts: Nothing to do for stateless and statelite nodes."
|
||||
logger -t xcat -p local4.info "setuppostbootscripts: Nothing to do for stateless and statelite nodes."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -34,7 +34,7 @@ fi
|
||||
if [ -f $infofile ]; then
|
||||
value=`grep "RUNBOOTSCRIPTS=$RUNBOOTSCRIPTS" $infofile`
|
||||
if [[ -n $value ]]; then # match
|
||||
logger -t xCAT -p local4.info "setuppostbootscripts: xcatinfo uptodate, nothing to do."
|
||||
logger -t xcat -p local4.info "setuppostbootscripts: xcatinfo uptodate, nothing to do."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
@ -19,11 +19,11 @@ then
|
||||
echo Autodetected existing /dev/sda1
|
||||
logger -t xcat -p local4.info $ME Autodetected existing /dev/sda1
|
||||
echo Checking filesystem /dev/sda1
|
||||
logger -t xcat -p local4.info $ME Checking filesystem /dev/sda1
|
||||
logger -t xcat -p local4.info $ME Checking filesystem /dev/sda1
|
||||
fsck -y /dev/sda1
|
||||
mkdir -p $mydir
|
||||
echo mounting existing /dev/sda1 to $mydir
|
||||
logger -t xcat -p local4.info $ME mounting existing /dev/sda1 to $mydir
|
||||
logger -t xcat -p local4.info $ME mounting existing /dev/sda1 to $mydir
|
||||
if mount /dev/sda1 $mydir
|
||||
then
|
||||
echo
|
||||
@ -32,14 +32,14 @@ then
|
||||
exit 0
|
||||
else
|
||||
echo mounting /dev/sda1 to $mydir failed
|
||||
logger -t xcat -p local4.warning $ME mounting /dev/sda1 to $mydir failed
|
||||
logger -t xcat -p local4.warning $ME mounting /dev/sda1 to $mydir failed
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo Creating Partition
|
||||
logger -t xcat -p local4.info $ME Creating Partition
|
||||
logger -t xcat -p local4.info $ME Creating Partition
|
||||
parted -s /dev/sda mklabel gpt
|
||||
parted -s -- /dev/sda mkpart primary ext3 0 -0
|
||||
if grep sda1 /proc/partitions >/dev/null 2>&1
|
||||
@ -47,7 +47,7 @@ then
|
||||
sleep 5
|
||||
else
|
||||
echo failed to create partition, exiting $ME
|
||||
logger -t xcat -p local4.err $ME failed to create partition, exiting $ME
|
||||
logger -t xcat -p local4.err $ME failed to create partition, exiting $ME
|
||||
echo
|
||||
echo Failed!
|
||||
echo
|
||||
@ -55,11 +55,11 @@ else
|
||||
fi
|
||||
|
||||
echo Creating new ext3 filesystem: /dev/sda1
|
||||
logger -t xcat -p local4.info $ME Creating new ext3 filesystem: /dev/sda1
|
||||
logger -t xcat -p local4.info $ME Creating new ext3 filesystem: /dev/sda1
|
||||
mke2fs -j /dev/sda1
|
||||
mkdir -p $mydir
|
||||
echo mounting new /dev/sda1 to $mydir
|
||||
logger -t xcat -p local4.info $ME mounting new /dev/sda1 to $mydir
|
||||
logger -t xcat -p local4.info $ME mounting new /dev/sda1 to $mydir
|
||||
mount /dev/sda1 $mydir
|
||||
echo
|
||||
echo Done!
|
||||
|
@ -19,7 +19,7 @@ if ($useSocketSSL) {
|
||||
my $port = "3001";
|
||||
my $remote = IO::Socket::SSL->new( Proto => "tcp", PeerAddr => $ENV{MASTER}, PeerPort => $port, );
|
||||
unless ($remote) {
|
||||
`logger -t xCAT -p local4.err "startsyncfiles: Cannot connect to host $ENV{MASTER}"`;
|
||||
`logger -t xcat -p local4.err "startsyncfiles: Cannot connect to host $ENV{MASTER}"`;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ chown $SUDOER:users $HOME/.ssh/authorized_keys
|
||||
|
||||
|
||||
# Restart the SSHD for syncfiles postscript to do the sync work
|
||||
logger -t xCAT -p local4.info "Restarting SSHD"
|
||||
logger -t xcat -p local4.info "Restarting SSHD"
|
||||
#if [ -f "/etc/debian_version" ];then
|
||||
# service ssh restart
|
||||
#else
|
||||
|
@ -10,7 +10,7 @@
|
||||
# do nothing when UPDATENODE=1 because it is done from the top down
|
||||
if [ -n "$UPDATENODE" ] && [ $UPDATENODE -eq 1 ]; then
|
||||
#echo " Did not sync any files. Use updatenode -F to sync the files."
|
||||
logger -t xCAT -p local4.err "$0: Did not sync any files. Use updatenode -F to sync the files."
|
||||
logger -t xcat -p local4.err "$0: Did not sync any files. Use updatenode -F to sync the files."
|
||||
|
||||
exit 0
|
||||
fi
|
||||
@ -18,17 +18,17 @@ fi
|
||||
#do nothing id there is no sync file template for the node
|
||||
if [ -n "$NOSYNCFILES" ] && [ $NOSYNCFILES -eq 1 ]; then
|
||||
echo " Did not sync any files."
|
||||
logger -t xCAT -p local4.err "$0: there is no sync file template for the node"
|
||||
logger -t xcat -p local4.err "$0: there is no sync file template for the node"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
logger -t xCAT -p local4.info "Performing syncfiles postscript"
|
||||
logger -t xcat -p local4.info "Performing syncfiles postscript"
|
||||
|
||||
osname=`uname`
|
||||
# run the xdcp on the MN/SN
|
||||
xcatpostdir="/xcatpost"
|
||||
|
||||
logger -t xCAT -p local4.info "$0: the OS name = $osname"
|
||||
logger -t xcat -p local4.info "$0: the OS name = $osname"
|
||||
quit="no"
|
||||
count=5
|
||||
while [ $quit = "no" ]; do
|
||||
@ -54,9 +54,9 @@ done
|
||||
|
||||
if [ $returncode -eq 0 ]
|
||||
then
|
||||
logger -t xCAT -p local4.info "$0: Perform Syncing File action successfully"
|
||||
logger -t xcat -p local4.info "$0: Perform Syncing File action successfully"
|
||||
else
|
||||
logger -t xCAT -p local4.err "$0: Perform Syncing File action encountered error"
|
||||
logger -t xcat -p local4.err "$0: Perform Syncing File action encountered error"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -225,7 +225,7 @@ if [ -e "/sbin/rsyslogd" -o -e "/usr/sbin/rsyslogd" ]; then
|
||||
if ( pmatch $SYSLOGPROD "*rsyslogd*" ) && ( pmatch $SYSLOGVER "8*" ); then
|
||||
config_rsyslog_V8
|
||||
#keep a record
|
||||
logger -t xCAT -p local4.info "Install: rsyslog version 8 setup"
|
||||
logger -t xcat -p local4.info "Install: rsyslog version 8 setup"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
@ -451,5 +451,5 @@ else
|
||||
fi
|
||||
|
||||
#keep a record
|
||||
logger -t xCAT -p local4.info "Install: syslog setup"
|
||||
logger -t xcat -p local4.info "Install: syslog setup"
|
||||
exit 0
|
||||
|
@ -44,7 +44,7 @@ export USEOPENSSLFORXCAT
|
||||
done
|
||||
else
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /tmp/xcat_client_cred`
|
||||
logger -t xCAT -p local4.err xcat_client_cred Error: $ERR_MSG
|
||||
logger -t xcat -p local4.err xcat_client_cred Error: $ERR_MSG
|
||||
RETURNVAL=-1
|
||||
fi
|
||||
rm /tmp/xcat_client_cred
|
||||
|
@ -23,7 +23,7 @@ update_VPD()
|
||||
{
|
||||
if [ -f /usr/sbin/vpdupdate ]; then
|
||||
vpdupdate
|
||||
logger -t xCAT -p local4.info "xcatdsklspost: updating VPD database"
|
||||
logger -t xcat -p local4.info "xcatdsklspost: updating VPD database"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ download_postscripts()
|
||||
fi
|
||||
|
||||
retry=$(($retry+1))
|
||||
logger -t xCAT -p local4.err "download_postscripts retry $retry"
|
||||
logger -t xcat -p local4.err "download_postscripts retry $retry"
|
||||
if [ $retry -eq $max_retries ]; then
|
||||
break
|
||||
fi
|
||||
@ -228,7 +228,7 @@ if [ ! `uname` = Linux ]; then
|
||||
cp /xcatmnt/xcataixpost /$xcatpost
|
||||
umount /xcatmnt
|
||||
rmdir /xcatmnt
|
||||
logger -t xCAT -p local4.err "Running xcataixpost $*"
|
||||
logger -t xcat -p local4.err "Running xcataixpost $*"
|
||||
# note not supporting -F or -V on AIX
|
||||
echo "/$xcatpost/xcataixpost $1 $2 $3 '"$4"' $5 $6 $7 $8 $9 ${10} ${11}"
|
||||
exec /$xcatpost/xcataixpost $1 $2 $3 "$4" $5 $6 $7 $8 $9 ${10} ${11}
|
||||
@ -274,7 +274,7 @@ if [ "$MODE" = "4" ]; then # for statelite mode
|
||||
else
|
||||
echo "xCAT management server IP can't be determined.";
|
||||
echo "exiting...";
|
||||
logger -t xCAT -p local4.err "xcatdsklspost:xCAT management server IP can't be determined.\nexiting...";
|
||||
logger -t xcat -p local4.err "xcatdsklspost:xCAT management server IP can't be determined.\nexiting...";
|
||||
exit;
|
||||
fi
|
||||
|
||||
@ -326,7 +326,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment)
|
||||
if [ "$MODE" = "1" ] || [ "$MODE" = "2" ] || [ "$MODE" = "5" ]; then # updatenode
|
||||
hn=`hostname`
|
||||
echo "Cannot download the postscripts from $SIP for $hn check /tmp/wget.log on the node."
|
||||
logger -t xCAT -p local4.err "xcatdsklspost:Cannot download the postscripts from the xCAT server $SIP for node $hn check /tmp/wget.log on the node."
|
||||
logger -t xcat -p local4.err "xcatdsklspost:Cannot download the postscripts from the xCAT server $SIP for node $hn check /tmp/wget.log on the node."
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -404,7 +404,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment)
|
||||
if [ $downloaded -eq 0 ]; then
|
||||
hn=`hostname`
|
||||
echo "Cannot download the postscripts from the xCAT server for node $hn"
|
||||
logger -t xCAT -p local4.err "xcatdsklspost:Cannot download the postscripts from the xCAT server for node $hn"
|
||||
logger -t xcat -p local4.err "xcatdsklspost:Cannot download the postscripts from the xCAT server for node $hn"
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -500,12 +500,12 @@ fi
|
||||
if [ ! -x /$xcatpost/mypostscript ]; then
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
# first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "xcatdsklspost:sending xcatflowrequest $SIP 3001"
|
||||
logger -t xcat -p local4.info "xcatdsklspost:sending xcatflowrequest $SIP 3001"
|
||||
/$xcatpost/xcatflowrequest $SIP 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "xcatdsklspost:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "xcatdsklspost:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "xcatdsklspost: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "xcatdsklspost: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -531,12 +531,12 @@ if [ ! -x /$xcatpost/mypostscript ]; then
|
||||
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
# contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "xcatdsklspost: sending xcatflowrequest $SIP 3001"
|
||||
logger -t xcat -p local4.info "xcatdsklspost: sending xcatflowrequest $SIP 3001"
|
||||
/$xcatpost/xcatflowrequest $SIP 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "xcatdsklspost:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "xcatdsklspost:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "xcatdsklspost: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "xcatdsklspost: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
|
@ -58,10 +58,10 @@ start)
|
||||
|
||||
# Run $SCRIPT according to node type
|
||||
if [ $STATELITE -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "Call $SCRIPT for statelite mode"
|
||||
logger -t xcat -p local4.info "Call $SCRIPT for statelite mode"
|
||||
"$SCRIPT" 4
|
||||
else
|
||||
logger -t xCAT -p local4.info "Call $SCRIPT for stateless mode"
|
||||
logger -t xcat -p local4.info "Call $SCRIPT for stateless mode"
|
||||
"$SCRIPT"
|
||||
fi
|
||||
;;
|
||||
|
@ -47,12 +47,12 @@ sleep 1
|
||||
mkdir -p /etc/xcat/cert
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "xcatserver:xcatflowrequest received response return=$rc"
|
||||
logger -t xcat -p local4.info "xcatserver:xcatflowrequest received response return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
|
||||
@ -64,7 +64,7 @@ getcredentials.awk xcat_server_cred | grep -v '<'|sed -e 's/</</' -e 's/>/
|
||||
grep -E '<error>' /etc/xcat/cert/server-cred.pem
|
||||
if [ $? -ne 0 ]; then
|
||||
#the message received is the data
|
||||
logger -t xCAT -p local4.info "xcatserver: getting server-cred.pem"
|
||||
logger -t xcat -p local4.info "xcatserver: getting server-cred.pem"
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
MYCONT=`cat /etc/xcat/cert/server-cred.pem`
|
||||
@ -84,12 +84,12 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "xcatserver:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "xcatserver:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -103,7 +103,7 @@ if [ $? -ne 0 ]; then
|
||||
else # error from first getcredential call
|
||||
#the message received is an error from credentials.pm, so parse it
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /etc/xcat/cert/server-cred.pem`
|
||||
logger -t xCAT -p local4.err xcatserver: $ERR_MSG
|
||||
logger -t xcat -p local4.err xcatserver: $ERR_MSG
|
||||
rm /etc/xcat/cert/server-cred.pem
|
||||
fi
|
||||
|
||||
@ -111,12 +111,12 @@ fi
|
||||
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "xcatserver:xcatflowrequest received response return=$rc"
|
||||
logger -t xcat -p local4.info "xcatserver:xcatflowrequest received response return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
|
||||
@ -127,7 +127,7 @@ getcredentials.awk xcat_cfgloc | grep -v '<'|sed -e 's/</</' -e 's/>/>/' -
|
||||
grep -E '<error>' /etc/xcat/cfgloc
|
||||
if [ $? -ne 0 ]; then
|
||||
#the message received is the data
|
||||
logger -t xCAT -p local4.info "xcatserver: getting cfgloc"
|
||||
logger -t xcat -p local4.info "xcatserver: getting cfgloc"
|
||||
MAX_RETRIES=10
|
||||
RETRY=0
|
||||
MYCONT=`cat /etc/xcat/cfgloc`
|
||||
@ -147,12 +147,12 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
if [ $useflowcontrol = "1" ]; then
|
||||
#first contact daemon xcatflowrequest <server> 3001
|
||||
logger -t xCAT -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001"
|
||||
/$xcatpost/xcatflowrequest $master 3001
|
||||
rc=$?
|
||||
logger -t xCAT -p local4.info "xcatserver:xcatflowrequest return=$rc"
|
||||
logger -t xcat -p local4.info "xcatserver:xcatflowrequest return=$rc"
|
||||
if [ $rc -ne 0 ]; then
|
||||
logger -t xCAT -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control"
|
||||
useflowcontrol=0
|
||||
fi
|
||||
fi
|
||||
@ -178,7 +178,7 @@ if [ $? -ne 0 ]; then
|
||||
else # error from first getcredentials call
|
||||
#the message received is an error from credentials.pm, so parse it
|
||||
ERR_MSG=`sed -n 's%.*<error>\(.*\)</error>.*%\1%p' /etc/xcat/cfgloc`
|
||||
logger -t xCAT -p local4.err xcatserver: $ERR_MSG
|
||||
logger -t xcat -p local4.err xcatserver: $ERR_MSG
|
||||
rm /etc/xcat/cfgloc
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user