You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-939 Moved columnstore version information to columnstoreversion.h for 1.1.X
This commit is contained in:
@ -1,48 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# $1 - release number or 'Latest' (default 'Latest')
|
||||
#
|
||||
if [ "$1" = "" ] ; then
|
||||
DIR=Latest
|
||||
REL="3.6-0"
|
||||
elif [ "$1" = "Latest" ] ; then
|
||||
DIR=Latest
|
||||
REL="3.6-0"
|
||||
elif [ "$2" = "" ] ; then
|
||||
DIR=$1
|
||||
REL=$1
|
||||
else
|
||||
DIR=$1
|
||||
REL=$2
|
||||
fi
|
||||
#
|
||||
if [[ $REL != *-* ]] ; then
|
||||
REL=$REL"-0"
|
||||
fi
|
||||
#
|
||||
{
|
||||
cd /root/autoOAM/
|
||||
rpm -e infinidb-libs infinidb-platform infinidb-enterprise --nodeps
|
||||
rpm -e infinidb-storage-engine infinidb-mysql --nodeps
|
||||
rpm -e infinidb-mysql --nodeps
|
||||
rm -rf /usr/local/Calpont
|
||||
rm -rf calpont*
|
||||
rm -f *gz
|
||||
#
|
||||
smbclient //srvhill01/shared -WMARIADB -Uroot%Calpont1 -c "cd packages/$DIR;prompt OFF;mget *.rpm"
|
||||
rpm -ivh calpont*.x86_64.rpm --nodeps
|
||||
rpm -iq calpont >> /usr/local/Calpont/releasenum
|
||||
cd /usr/local/
|
||||
tar -zcvf calpont-infinidb-ent-$REL.x86_64.bin.tar.gz Calpont
|
||||
mv calpont-infinidb-ent-$REL.x86_64.bin.tar.gz /root/autoOAM/
|
||||
cd /root/autoOAM/
|
||||
alien -ck calpont*.x86_64.rpm
|
||||
tar -zcvf calpont-infinidb-ent-$REL.x86_64.rpm.tar.gz *$REL*.rpm
|
||||
tar -zcvf calpont-infinidb-ent-$REL.amd64.deb.tar.gz *$REL*.deb
|
||||
|
||||
smbclient //srvhill01/shared -WMARIADB -Uroot%Calpont1 -c "cd packages/$DIR;mkdir packages;cd packages;prompt OFF;del calpont-infinidb-ent*gz;mput *gz"
|
||||
} > /root/autoOAM/buildCalpontPackages-$DIR.log 2>&1
|
||||
#
|
||||
echo "Calpont Packages Build Successfully Completed"
|
||||
exit 0
|
||||
|
@ -1,102 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# $Id: calpont-build 421 2007-14-15 15:46:55Z dhill $
|
||||
#
|
||||
# build calpont rpm and install on call6500
|
||||
# $1 - release number or 'Latest'
|
||||
# $2 - svn branch
|
||||
#
|
||||
if [ "$2" = "" ] ; then
|
||||
echo "enter release and svn-branch arguments"
|
||||
exit 0
|
||||
fi
|
||||
# !!! set for OS type 32 or 64 bit !!!
|
||||
|
||||
OS=x86_64
|
||||
|
||||
#
|
||||
REL=$1
|
||||
DIR=$2
|
||||
|
||||
#remove mysqld before new one is built
|
||||
#prevents old version from being packaged in new build
|
||||
rm -f /usr/local/Calpont/mysql/libexec/*
|
||||
|
||||
if [ $DIR = "genii" ] ; then
|
||||
./mysql-build-genii > mysql-build-genii.log &
|
||||
else
|
||||
./mysql-build-branch $DIR > mysql-build-$DIR.log &
|
||||
fi
|
||||
#
|
||||
HOME=/home/nightly/$DIR
|
||||
rm -rf $HOME
|
||||
rm -fr /home/nightly/rpm/
|
||||
#
|
||||
|
||||
if [ $DIR = "genii" ] ; then
|
||||
su - nightly -c "export CXXFLAGS='-O3 -fno-strict-aliasing ';mkdir $DIR;updateGenii.pl > ~/$DIR/updateGenii.log 2>&1;cd ~/$DIR;make clean;make > ~/$DIR/make.log 2>&1;make > ~/$DIR/make1.log 2>&1;./build/build_rpms > ~/$DIR/build_rpms.log 2>&1"
|
||||
else
|
||||
su - nightly -c "export CXXFLAGS='-O3 -fno-strict-aliasing ';mkdir $DIR;updateGenii.pl -b $DIR > ~/$DIR/updateGenii.log 2>&1;cd ~/$DIR;make clean;make > ~/$DIR/make.log 2>&1;make > ~/$DIR/make1.log 2>&1;./build/build_rpms > ~/$DIR/build_rpms.log 2>&1"
|
||||
fi
|
||||
|
||||
#
|
||||
# generate rpm info text files
|
||||
|
||||
if [ ! -f $HOME/build/releasenum ]; then
|
||||
#default
|
||||
version=3.0
|
||||
else
|
||||
. $HOME/build/releasenum
|
||||
fi
|
||||
|
||||
cd /home/nightly/rpm/ > /dev/null 2>&1
|
||||
cd RPMS/$OS/ > /dev/null 2>&1
|
||||
test -f infinidb-platform-$version*.rpm || echo "no rpm"
|
||||
test -f infinidb-platform-$version*.rpm || exit -1
|
||||
rpm -qi -p infinidb-platform-$version*.rpm > infinidb-platform-$OS-rpm-info.txt
|
||||
echo " " >> infinidb-platform-$OS-rpm-info.txt
|
||||
echo "MD5SUM" >> infinidb-platform-$OS-rpm-info.txt
|
||||
md5sum infinidb-platform-$version*.rpm >> infinidb-platform-$OS-rpm-info.txt
|
||||
echo " " >> infinidb-platform-$OS-rpm-info.txt
|
||||
#
|
||||
test -f infinidb-storage-engine-*.rpm || echo "no rpm"
|
||||
test -f infinidb-storage-engine-*.rpm || exit -1
|
||||
rpm -qi -p infinidb-storage-engine-*.rpm > infinidb-storage-engine-$OS-rpm-info.txt
|
||||
echo " " >> infinidb-storage-engine-$OS-rpm-info.txt
|
||||
echo "MD5SUM" >> infinidb-storage-engine-$OS-rpm-info.txt
|
||||
md5sum infinidb-storage-engine-*.rpm >> infinidb-storage-engine-$OS-rpm-info.txt
|
||||
echo " " >> infinidb-storage-engine-$OS-rpm-info.txt
|
||||
#
|
||||
test -f infinidb-mysql-*.rpm || echo "no rpm"
|
||||
test -f infinidb-mysql-*.rpm || exit -1
|
||||
rpm -qi -p infinidb-mysql-*.rpm > infinidb-mysql-$OS-rpm-info.txt
|
||||
echo " " >> infinidb-mysql-$OS-rpm-info.txt
|
||||
echo "MD5SUM" >> infinidb-mysql-$OS-rpm-info.txt
|
||||
md5sum infinidb-mysql-*.rpm >> infinidb-mysql-$OS-rpm-info.txt
|
||||
echo " " >> infinidb-mysql-$OS-rpm-info.txt
|
||||
#
|
||||
{
|
||||
if [ $REL != "Latest" ] ; then
|
||||
# copy rpms to calweb
|
||||
DATE=`date +%F`
|
||||
cd /home/nightly/rpm/RPMS/$OS/
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations;mkdir $REL;cd $REL;rm *.$OS.rpm;prompt OFF;mput *"
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly;mkdir $REL-$DATE;cd $REL-$DATE;rm *.$OS.rpm;prompt OFF;mput *"
|
||||
cd /home/nightly/$DIR/export/etc/
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/$REL;rm Columnstore.xml;prompt OFF;mput Columnstore.xml"
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly/$REL-$DATE;rm Columnstore.xml;prompt OFF;mput Columnstore.xml"
|
||||
|
||||
else
|
||||
# copy nightly on calweb
|
||||
DATE=`date +%F`
|
||||
cd /home/nightly/rpm/RPMS/$OS/
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/Latest;rm *.$OS.rpm;prompt OFF;mput *"
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly;mkdir genii-$DATE;cd genii-$DATE;prompt OFF;mput *"
|
||||
cd /home/nightly/$DIR/export/etc/
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/Latest;rm Columnstore.xml;prompt OFF;mput Columnstore.xml"
|
||||
smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly/genii-$DATE;prompt OFF;mput Columnstore.xml"
|
||||
fi
|
||||
} 2> /root/infinidb-build-$REL-$DIR.log
|
||||
#
|
||||
echo "Build Successfully Completed"
|
||||
exit 0
|
@ -1,194 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script
|
||||
# Argument 0 - Parent OAM IP address
|
||||
# Argument 1 - Root Password of Parent OAM Module
|
||||
# Argument 2 - Calpont Config File
|
||||
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||
|
||||
set SERVER [lindex $argv 0]
|
||||
set PASSWORD [lindex $argv 1]
|
||||
#set PACKAGE [lindex $argv 2]
|
||||
set PACKAGE *.rpm
|
||||
set RELEASE [lindex $argv 3]
|
||||
set CONFIGFILE [lindex $argv 4]
|
||||
set USERNAME [lindex $argv 5]
|
||||
set CEFLAG [lindex $argv 6]
|
||||
set PACKAGENAME [lindex $argv 7]
|
||||
set INSTALLLOCATION [lindex $argv 8]
|
||||
set DEBUG [lindex $argv 9]
|
||||
|
||||
set INSTALLDIR "/usr/local"
|
||||
|
||||
set SHARED "//srvhill01/shared"
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
|
||||
set CONFIG "Calpont"
|
||||
if { $PACKAGENAME != "columnstore"} {
|
||||
set CONFIG "Calpont"
|
||||
}
|
||||
|
||||
|
||||
set timeout 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f /root/Calpont-*.rpm /root/$PACKAGENAME*.rpm'\n"
|
||||
expect {
|
||||
-re "authenticity" { send "yes\n"
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 }
|
||||
-re "word: " { send "$PASSWORD\n" }
|
||||
}
|
||||
expect {
|
||||
-re {[$#] } { }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
#
|
||||
# erase InfiniDB packages
|
||||
#
|
||||
set timeout 60
|
||||
send_user "Erase Old InfiniDB Packages "
|
||||
send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re {[$#] } { }
|
||||
}
|
||||
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^mariadb-columnstore') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "uninstall completed" { }
|
||||
-re {[$#] } { }
|
||||
-re "not installed" { }
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
sleep 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall && $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re {[$#] } { send_user "DONE" }
|
||||
-re "uninstall completed" { send_user "DONE" }
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 5
|
||||
#
|
||||
# get the InfiniDB package
|
||||
#
|
||||
send_user "Get InfiniDB Packages "
|
||||
send "smbclient $SHARED -WMARIADB -Uroot%Calpont1 -c 'cd packages/$RELEASE/;prompt OFF;mget $PACKAGE'\n"
|
||||
expect {
|
||||
-re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 }
|
||||
-re "getting" { send_user "DONE" }
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# send the InfiniDB package
|
||||
#
|
||||
set timeout 120
|
||||
send_user "Copy InfiniDB Packages "
|
||||
send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re {[$#] } { send_user "DONE" }
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
#send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# install InfiniDB package
|
||||
#
|
||||
send_user "Install New InfiniDB Packages "
|
||||
send "ssh $USERNAME@$SERVER ' rpm -iv --nodeps --force $PACKAGENAME-*'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "completed" { expect {
|
||||
-re "completed" { expect {
|
||||
-re "completed" { send_user "DONE" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
set timeout 120
|
||||
expect -re {[$#] }
|
||||
#
|
||||
if { $CONFIGFILE != "NULL"} {
|
||||
#
|
||||
# copy over Columnstore.xml file
|
||||
#
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { }
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send_user "Copy InfiniDB Configuration File "
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml.rpmsave\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE"}
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
#do a dummy scp command
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/$CONFIG.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user " " }
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# rename previous installed config file
|
||||
#
|
||||
send_user "Copy RPM-saved InfiniDB Configuration File "
|
||||
send "ssh $USERNAME@$SERVER 'cd /usr/local/$INSTALLLOCATION/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "Columnstore.xml" { send_user "DONE" }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
exit
|
||||
|
@ -1,191 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $
|
||||
#
|
||||
# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script
|
||||
# Argument 0 - Parent OAM IP address
|
||||
# Argument 1 - Root Password of Parent OAM Module
|
||||
# Argument 2 - Calpont Config File
|
||||
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||
|
||||
set SERVER [lindex $argv 0]
|
||||
set PASSWORD [lindex $argv 1]
|
||||
set PACKAGE [lindex $argv 2]
|
||||
set RELEASE [lindex $argv 3]
|
||||
set CONFIGFILE [lindex $argv 4]
|
||||
set USERNAME [lindex $argv 5]
|
||||
set CEFLAG [lindex $argv 6]
|
||||
set DEBUG [lindex $argv 7]
|
||||
|
||||
set CALPONTPACKAGE calpont-$PACKAGE
|
||||
set MYSQLPACKAGE calpont-mysql-$PACKAGE
|
||||
set MYSQLDPACKAGE calpont-mysqld-$PACKAGE
|
||||
set INSTALLDIR "/usr/local"
|
||||
|
||||
#set SHARED "//cal6500/shared"
|
||||
set SHARED "//calweb/shared"
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
send "rm -f $CALPONTPACKAGE\n"
|
||||
#
|
||||
# delete and erase all old packages from Director Module
|
||||
#
|
||||
set timeout 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f /root/$CALPONTPACKAGE'\n"
|
||||
expect {
|
||||
-re "authenticity" { send "yes\n"
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
}
|
||||
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 }
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
expect {
|
||||
-re "#" { } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
#
|
||||
# erase calpont packages
|
||||
#
|
||||
set timeout 60
|
||||
send_user "Erase Old Calpont Packages "
|
||||
send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "# " { } abort
|
||||
}
|
||||
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "uninstall completed" { } abort
|
||||
-re "# " { } abort
|
||||
-re "not installed" { } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
sleep 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/Calpont/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/Calpont/bin/pre-uninstall && $INSTALLDIR/Calpont/bin/pre-uninstall'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "# " { send_user "DONE" } abort
|
||||
-re "uninstall completed" { send_user "DONE" } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 5
|
||||
#
|
||||
# get the calpont package
|
||||
#
|
||||
send_user "Get Calpont Packages "
|
||||
send "smbclient $SHARED -Wcalpont -Uoamuser%Calpont1 -c 'cd Iterations/$RELEASE/;prompt OFF;mget $PACKAGE'\n"
|
||||
expect {
|
||||
-re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 }
|
||||
-re "getting" { send_user "DONE" } abort
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# send the calpont package
|
||||
#
|
||||
send_user "Copy Calpont Packages "
|
||||
send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "#" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
#send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# install calpont package
|
||||
#
|
||||
set timeout 120
|
||||
send_user "Install New Calpont Packages "
|
||||
send "ssh $USERNAME@$SERVER ' rpm -iv --nodeps /root/$CALPONTPACKAGE'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "completed" { expect {
|
||||
-re "completed" { expect {
|
||||
-re "completed" { send_user "DONE" } abort
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
set timeout 120
|
||||
expect -re "# "
|
||||
#
|
||||
if { $CONFIGFILE != "NULL"} {
|
||||
#
|
||||
# copy over Columnstore.xml file
|
||||
#
|
||||
send_user "Copy Calpont Configuration File "
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml.rpmsave\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { } abort
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/Columnstore.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user " " } abort
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# rename previous installed config file
|
||||
#
|
||||
send_user "Copy RPM-saved Calpont Configuration File "
|
||||
send "ssh $USERNAME@$SERVER 'cd /usr/local/mariadb/columnstore/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "Columnstore.xml" { send_user "DONE" } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
exit
|
||||
|
@ -1,215 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $
|
||||
#
|
||||
# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script
|
||||
# Argument 0 - Parent OAM IP address
|
||||
# Argument 1 - Root Password of Parent OAM Module
|
||||
# Argument 2 - Calpont Config File
|
||||
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||
|
||||
set SERVER [lindex $argv 0]
|
||||
set PASSWORD [lindex $argv 1]
|
||||
set PACKAGE [lindex $argv 2]
|
||||
set RELEASE [lindex $argv 3]
|
||||
set CONFIGFILE [lindex $argv 4]
|
||||
set USERNAME [lindex $argv 5]
|
||||
set INSTALLDIR [lindex $argv 6]
|
||||
set PACKAGENAME [lindex $argv 7]
|
||||
set INSTALLLOCATION [lindex $argv 8]
|
||||
set DEBUG [lindex $argv 9]
|
||||
|
||||
set CALPONTPACKAGE infinidb-ent-*$PACKAGE
|
||||
|
||||
set SHARED "//srvhill01/shared"
|
||||
|
||||
set INSTALLDIRARG " "
|
||||
set HOME "/root"
|
||||
if { $USERNAME != "root" } {
|
||||
set INSTALLDIRARG "--installdir=$INSTALLDIR/$INSTALLLOCATION"
|
||||
set HOME $INSTALLDIR
|
||||
}
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# delete binary package on Parent OAM Module
|
||||
#
|
||||
set timeout 30
|
||||
send_user "Remove Calpont Packages from System "
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION*.gz;rm -f /root/$INSTALLLOCATION*.rpm;rm -f /root/$INSTALLLOCATION*.gz'\n"
|
||||
expect {
|
||||
-re "authenticity" { send "yes\n"
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
}
|
||||
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 }
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
expect {
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "DONE\n"
|
||||
#
|
||||
# get the calpont package
|
||||
#
|
||||
send_user "Get Calpont Packages "
|
||||
send "smbclient $SHARED -WMARIADB -Uroot%Calpont1 -c 'cd packages/$RELEASE/packages;prompt OFF;mget $PACKAGE'\n"
|
||||
expect {
|
||||
-re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 }
|
||||
-re "getting" { send_user "DONE" } abort
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# send the calpont package
|
||||
#
|
||||
send_user "Copy Calpont Packages "
|
||||
send "scp $PACKAGE $USERNAME@$SERVER:$HOME/.\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# uninstall calpont package
|
||||
#
|
||||
send_user "Erase Old Calpont Package "
|
||||
send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "# " { } abort
|
||||
}
|
||||
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "uninstall completed" { } abort
|
||||
-re "# " { } abort
|
||||
-re "not installed" { } abort
|
||||
-re "Failed dependencies" { } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
sleep 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall && $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall $INSTALLDIRARG'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "# " { send_user "DONE" } abort
|
||||
-re "uninstall completed" { send_user "DONE" } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 5
|
||||
#
|
||||
# install calpont package
|
||||
#
|
||||
set timeout 30
|
||||
send_user "Install New Calpont Package "
|
||||
send "ssh $USERNAME@$SERVER 'tar -C $INSTALLDIR --exclude db -zxf $HOME/$CALPONTPACKAGE;cat $INSTALLDIR/$INSTALLLOCATION/releasenum'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "completed" { send_user "DONE" } abort
|
||||
-re "release=" { send_user "DONE" } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "exiting now" { send_user "FAILED: Error in tar command\n" ; exit -1 }
|
||||
|
||||
}
|
||||
send_user "\n"
|
||||
set timeout 30
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
send_user "Run post-install script "
|
||||
send " \n"
|
||||
send date\n
|
||||
send "ssh $USERNAME@$SERVER '$INSTALLDIR/$INSTALLLOCATION/bin/post-install $INSTALLDIRARG'\n"
|
||||
set timeout 10
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
-re "passphrase" { send "$PASSWORD\n" } abort
|
||||
}
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
-re "InfiniDB syslog logging not working" { send_user "ERROR: InfiniDB System logging not setup\n" ; exit 1 }
|
||||
-re "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||
-re "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
-re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||
-re "closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||
-re "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||
-re "postConfigure" { send_user "DONE" } abort
|
||||
-re "# " { send_user "DONE" } abort
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 10
|
||||
#
|
||||
if { $CONFIGFILE != "NULL"} {
|
||||
#
|
||||
# copy over $CONFIG.xml file
|
||||
#
|
||||
send_user "Copy Calpont Configuration File "
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/$INSTALLLOCATION/etc/$CONFIG.xml.rpmsave\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { } abort
|
||||
-re "scp" { send_user "FAILED\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/$INSTALLLOCATION/etc/$CONFIG.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# rename previous installed config file
|
||||
#
|
||||
send_user "Copy RPM-saved Calpont Configuration File "
|
||||
send "ssh $USERNAME@$SERVER 'cd $INSTALLDIR/$INSTALLLOCATION/etc/;mv -f $CONFIG.xml $CONFIG.xml.install;cp -v $CONFIG.xml.rpmsave $CONFIG.xml'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "$CONFIG.xml" { send_user "DONE" } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
exit
|
||||
|
@ -1,212 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $
|
||||
#
|
||||
# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script
|
||||
# Argument 0 - Parent OAM IP address
|
||||
# Argument 1 - Root Password of Parent OAM Module
|
||||
# Argument 2 - Calpont Config File
|
||||
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||
|
||||
set SERVER [lindex $argv 0]
|
||||
set PASSWORD [lindex $argv 1]
|
||||
set PACKAGE [lindex $argv 2]
|
||||
set RELEASE [lindex $argv 3]
|
||||
set CONFIGFILE [lindex $argv 4]
|
||||
set USERNAME [lindex $argv 5]
|
||||
set INSTALLDIR [lindex $argv 6]
|
||||
set DEBUG [lindex $argv 7]
|
||||
|
||||
set CALPONTPACKAGE calpont-infinidb-ent-*$PACKAGE
|
||||
|
||||
set SHARED "//calweb/shared"
|
||||
|
||||
set INSTALLDIRARG " "
|
||||
set HOME "/root"
|
||||
if { $USERNAME != "root" } {
|
||||
set INSTALLDIRARG "--installdir=$INSTALLDIR/Calpont"
|
||||
set HOME $INSTALLDIR
|
||||
}
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# delete binary package on Parent OAM Module
|
||||
#
|
||||
set timeout 30
|
||||
send_user "Remove Calpont Packages from System "
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/calpont*.gz;rm -f /root/calpont*.rpm;rm -f /root/calpont*.gz'\n"
|
||||
expect {
|
||||
-re "authenticity" { send "yes\n"
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
}
|
||||
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 }
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
expect {
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "DONE\n"
|
||||
#
|
||||
# get the calpont package
|
||||
#
|
||||
send_user "Get Calpont Packages "
|
||||
send "smbclient $SHARED -Wcalpont -Uoamuser%Calpont1 -c 'cd Iterations/$RELEASE/packages;prompt OFF;mget $PACKAGE'\n"
|
||||
expect {
|
||||
-re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 }
|
||||
-re "getting" { send_user "DONE" } abort
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# send the calpont package
|
||||
#
|
||||
send_user "Copy Calpont Packages "
|
||||
send "scp $PACKAGE $USERNAME@$SERVER:$HOME/.\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# uninstall calpont package
|
||||
#
|
||||
send_user "Erase Old Calpont Package "
|
||||
send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "# " { } abort
|
||||
}
|
||||
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n"expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "uninstall completed" { } abort
|
||||
-re "# " { } abort
|
||||
-re "not installed" { } abort
|
||||
-re "Failed dependencies" { } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
sleep 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/Calpont/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/Calpont/bin/pre-uninstall && $INSTALLDIR/Calpont/bin/pre-uninstall $INSTALLDIRARG'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "# " { send_user "DONE" } abort
|
||||
-re "uninstall completed" { send_user "DONE" } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 5
|
||||
#
|
||||
# install calpont package
|
||||
#
|
||||
set timeout 30
|
||||
send_user "Install New Calpont Package "
|
||||
send "ssh $USERNAME@$SERVER 'tar -C $INSTALLDIR --exclude db -zxf $HOME/$CALPONTPACKAGE;cat $INSTALLDIR/Calpont/releasenum'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "completed" { send_user "DONE" } abort
|
||||
-re "release=" { send_user "DONE" } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "exiting now" { send_user "FAILED: Error in tar command\n" ; exit -1 }
|
||||
|
||||
}
|
||||
send_user "\n"
|
||||
set timeout 30
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
send_user "Run post-install script "
|
||||
send " \n"
|
||||
send date\n
|
||||
send "ssh $USERNAME@$SERVER '$INSTALLDIR/Calpont/bin/post-install $INSTALLDIRARG'\n"
|
||||
set timeout 10
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
-re "passphrase" { send "$PASSWORD\n" } abort
|
||||
}
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
-re "InfiniDB syslog logging not working" { send_user "ERROR: InfiniDB System logging not setup\n" ; exit 1 }
|
||||
-re "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||
-re "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
-re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||
-re "closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||
-re "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||
-re "postConfigure" { send_user "DONE" } abort
|
||||
-re "# " { send_user "DONE" } abort
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 10
|
||||
#
|
||||
if { $CONFIGFILE != "NULL"} {
|
||||
#
|
||||
# copy over Columnstore.xml file
|
||||
#
|
||||
send_user "Copy Calpont Configuration File "
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/Calpont/etc/Columnstore.xml.rpmsave\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { } abort
|
||||
-re "scp" { send_user "FAILED\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/Calpont/etc/Columnstore.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# rename previous installed config file
|
||||
#
|
||||
send_user "Copy RPM-saved Calpont Configuration File "
|
||||
send "ssh $USERNAME@$SERVER 'cd $INSTALLDIR/Calpont/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "Columnstore.xml" { send_user "DONE" } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
exit
|
||||
|
@ -1,188 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $
|
||||
#
|
||||
# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script
|
||||
# Argument 0 - Parent OAM IP address
|
||||
# Argument 1 - Root Password of Parent OAM Module
|
||||
# Argument 2 - Calpont Config File
|
||||
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||
|
||||
set USERNAME root
|
||||
set SERVER [lindex $argv 0]
|
||||
set PASSWORD [lindex $argv 1]
|
||||
#set PACKAGE [lindex $argv 2]
|
||||
set PACKAGE *.rpm
|
||||
set RELEASE [lindex $argv 3]
|
||||
set CONFIGFILE [lindex $argv 4]
|
||||
set PREFIX [lindex $argv 5]
|
||||
set USERNAME [lindex $argv 6]
|
||||
set PACKAGENAME [lindex $argv 7]
|
||||
set INSTALLLOCATION [lindex $argv 8]
|
||||
set DEBUG [lindex $argv 9]
|
||||
|
||||
set SHARED "//srvhill01/shared"
|
||||
set INSTALLDIR "/usr/local"
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
|
||||
set CONFIG "Calpont"
|
||||
if { $PACKAGENAME != "columnstore"} {
|
||||
set CONFIG "Calpont"
|
||||
}
|
||||
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# delete and erase all old packages from Parent OAM Module
|
||||
#
|
||||
set timeout 30
|
||||
send "ssh $USERNAME@$SERVER 'rm -f /root/Calpont-*.rpm /root/$PACKAGENAME*.rpm /root/mariadb*.rpm '\n"
|
||||
expect {
|
||||
-re "authenticity" { send "yes\n"
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 }
|
||||
-re "word: " { send "$PASSWORD\n" }
|
||||
}
|
||||
expect {
|
||||
-re {[$#] } { }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
#
|
||||
# get the InfiniDB package
|
||||
#
|
||||
expect -re {[$#] }
|
||||
send_user "Get InfiniDB Packages "
|
||||
send "smbclient $SHARED -WMARIADB -Uroot%Calpont1 -c 'cd packages/$RELEASE/;prompt OFF;mget $PACKAGE'\n"
|
||||
expect {
|
||||
-re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 }
|
||||
-re "getting" { send_user "DONE" }
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# send the InfiniDB package
|
||||
#
|
||||
set timeout 120
|
||||
send_user "Copy InfiniDB Packages "
|
||||
send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re {[$#] } { send_user "DONE" }
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
#send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# erase InfiniDB package
|
||||
#
|
||||
set timeout 60
|
||||
expect -re {[$#] }
|
||||
send_user "Erase Old InfiniDB Package "
|
||||
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^mariadb-columnstore') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "uninstall completed" { }
|
||||
-re {[$#] } { }
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
sleep 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall && $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re {[$#] } { send_user "DONE" }
|
||||
-re "uninstall completed" { send_user "DONE" }
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 5
|
||||
#
|
||||
# install InfiniDB package
|
||||
#
|
||||
set timeout 160
|
||||
send_user "Install New InfiniDB Packages "
|
||||
send "ssh $USERNAME@$SERVER ' rpm -ivh --nodeps --force $PACKAGENAME-*'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "completed" { send_user "DONE" }
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "File not found" { send_user "FAILED: File not found\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
set timeout 120
|
||||
expect -re {[$#] }
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
if { $CONFIGFILE != "NULL"} {
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { }
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
#
|
||||
# copy over $CONFIG.xml file
|
||||
#
|
||||
send_user "Copy InfiniDB Configuration File "
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml.rpmsave\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE" }
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
#do a dummy scp command
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/$CONFIG.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user " " }
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# rename previous installed config file
|
||||
#
|
||||
send_user "Copy RPM-saved InfiniDB Configuration File "
|
||||
send "ssh $USERNAME@$SERVER 'cd /usr/local/$INSTALLLOCATION/etc/;mv -f $CONFIG.xml $CONFIG.xml.install;cp -v $CONFIG.xml.rpmsave $CONFIG.xml'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "$CONFIG.xml" { send_user "DONE" }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
}
|
||||
send_user "\n"
|
||||
expect -re {[$#] }
|
||||
#
|
||||
exit
|
||||
|
@ -1,179 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $
|
||||
#
|
||||
# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script
|
||||
# Argument 0 - Parent OAM IP address
|
||||
# Argument 1 - Root Password of Parent OAM Module
|
||||
# Argument 2 - Calpont Config File
|
||||
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||
|
||||
set USERNAME root
|
||||
set SERVER [lindex $argv 0]
|
||||
set PASSWORD [lindex $argv 1]
|
||||
set PACKAGE [lindex $argv 2]
|
||||
set RELEASE [lindex $argv 3]
|
||||
set CONFIGFILE [lindex $argv 4]
|
||||
set PREFIX [lindex $argv 5]
|
||||
set USERNAME [lindex $argv 6]
|
||||
set DEBUG [lindex $argv 7]
|
||||
|
||||
set CALPONTPACKAGE calpont-$PREFIX$PACKAGE
|
||||
set MYSQLPACKAGE calpont-mysql-$PACKAGE
|
||||
set MYSQLDPACKAGE calpont-mysqld-$PACKAGE
|
||||
#set SHARED "//cal6500/shared"
|
||||
set SHARED "//calweb/shared"
|
||||
set INSTALLDIR "/usr/local"
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# delete and erase all old packages from Parent OAM Module
|
||||
#
|
||||
set timeout 30
|
||||
send "ssh $USERNAME@$SERVER 'rm -f /root/calpont*.rpm /root/infinidb*.rpm'\n"
|
||||
expect {
|
||||
-re "authenticity" { send "yes\n"
|
||||
expect {
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
}
|
||||
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 }
|
||||
-re "word: " { send "$PASSWORD\n" } abort
|
||||
}
|
||||
expect {
|
||||
-re "#" { } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
#
|
||||
# get the calpont package
|
||||
#
|
||||
expect -re "# "
|
||||
send_user "Get Calpont Packages "
|
||||
send "smbclient $SHARED -Wcalpont -Uoamuser%Calpont1 -c 'cd Iterations/$RELEASE/;prompt OFF;mget $PACKAGE'\n"
|
||||
expect {
|
||||
-re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 }
|
||||
-re "getting" { send_user "DONE" } abort
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# send the calpont package
|
||||
#
|
||||
send_user "Copy Calpont Packages "
|
||||
send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "#" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
#send "rm -f $PACKAGE\n"
|
||||
#
|
||||
# erase calpont package
|
||||
#
|
||||
expect -re "# "
|
||||
send_user "Erase Old Calpont Package "
|
||||
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "uninstall completed" { } abort
|
||||
-re "# " { } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
sleep 10
|
||||
send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/Calpont/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/Calpont/bin/pre-uninstall && $INSTALLDIR/Calpont/bin/pre-uninstall'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "# " { send_user "DONE" } abort
|
||||
-re "uninstall completed" { send_user "DONE" } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
sleep 5
|
||||
#
|
||||
# install calpont package
|
||||
#
|
||||
set timeout 160
|
||||
send_user "Install New Calpont Package "
|
||||
send "ssh $USERNAME@$SERVER ' rpm -ivh --nodeps /root/$CALPONTPACKAGE'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "completed" { send_user "DONE" } abort
|
||||
-re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
send_user "\n"
|
||||
set timeout 120
|
||||
expect -re "# "
|
||||
send "rm -f $PACKAGE\n"
|
||||
#
|
||||
if { $CONFIGFILE != "NULL"} {
|
||||
#
|
||||
# copy over Columnstore.xml file
|
||||
#
|
||||
send_user "Copy Calpont Configuration File "
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml.rpmsave\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { } abort
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user "DONE" } abort
|
||||
-re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 }
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
-re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 }
|
||||
}
|
||||
send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/Columnstore.xml\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "100%" { send_user " " } abort
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# rename previous installed config file
|
||||
#
|
||||
send_user "Copy RPM-saved Calpont Configuration File "
|
||||
send "ssh $USERNAME@$SERVER 'cd /usr/local/mariadb/columnstore/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "Columnstore.xml" { send_user "DONE" } abort
|
||||
-re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 }
|
||||
}
|
||||
}
|
||||
send_user "\n"
|
||||
expect -re "# "
|
||||
#
|
||||
exit
|
||||
|
@ -1,177 +0,0 @@
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
Copyright (C) 2016 MariaDB Corporaton
|
||||
|
||||
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; version 2 of
|
||||
the License.
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/******************************************************************************************
|
||||
* $Id: stackReleaseChecker.cpp 64 2006-10-12 22:21:51Z dhill $
|
||||
*
|
||||
*
|
||||
* List of files being updated by configure:
|
||||
* Calpont/etc/Columnstore.xml
|
||||
*
|
||||
*
|
||||
******************************************************************************************/
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#include <iterator>
|
||||
#include <numeric>
|
||||
#include <deque>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <limits.h>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include "stdio.h"
|
||||
#include "ctype.h"
|
||||
#include <netdb.h>
|
||||
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
|
||||
#include "liboamcpp.h"
|
||||
#include "configcpp.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace oam;
|
||||
using namespace config;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Oam oam;
|
||||
string systemUser = "root";
|
||||
string installParentModuleHostName;
|
||||
string password;
|
||||
string debug_flag = "1";
|
||||
string systemName = "all";
|
||||
bool VERBOSE = false;
|
||||
|
||||
Config* sysConfig = Config::makeConfig("./systems/CalpontSystems.xml");
|
||||
|
||||
for( int i = 1; i < argc; i++ )
|
||||
{
|
||||
if( string("-h") == argv[i] ) {
|
||||
cout << endl;
|
||||
cout << "'stackReleaseChecker' retrieves and prints the release installed on a stack." << endl;
|
||||
cout << endl;
|
||||
cout << "The list of systems are located in './systems/CalpontSystems.xml" << endl;
|
||||
cout << endl;
|
||||
cout << "Usage: stackReleaseChecker [-h][-s system][-v]" << endl;
|
||||
cout << " -s system-name or leave blank for all systems" << endl;
|
||||
cout << " -v verbose will give the version numbers" << endl;
|
||||
exit (0);
|
||||
}
|
||||
else if( string("-s") == argv[i] ) {
|
||||
i++;
|
||||
if ( argc == i ) {
|
||||
cout << "ERROR: missing system argument" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
systemName = argv[i];
|
||||
}
|
||||
else if( string("-v") == argv[i] )
|
||||
VERBOSE = true;
|
||||
}
|
||||
|
||||
int systemCount;
|
||||
try {
|
||||
systemCount = strtol(sysConfig->getConfig("NetworkConfig", "SystemCount").c_str(), 0, 0);
|
||||
if ( systemCount == 0 ) {
|
||||
cout << "ERROR: SystemCount in ./systems/CalpontSystems.xml equal to 0" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem getting SystemCount from ./systems/CalpontSystems.xml" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
bool FOUND = false;
|
||||
for ( int i = 1 ; i < systemCount+1 ; i++)
|
||||
{
|
||||
string SystemName = "SystemName" + oam.itoa(i);
|
||||
string oamParentModule = "OAMParentModule" + oam.itoa(i);
|
||||
string SystemPassword = "SystemPassword" + oam.itoa(i);
|
||||
string SystemUser = "SystemUser" + oam.itoa(i);
|
||||
|
||||
string tempSystem;
|
||||
try {
|
||||
tempSystem = sysConfig->getConfig("NetworkConfig", SystemName );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem getting SystemName from ./systems/CalpontSystems.xml" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if ( tempSystem == systemName || systemName == "all") {
|
||||
try {
|
||||
installParentModuleHostName = sysConfig->getConfig("NetworkConfig", oamParentModule );
|
||||
password = sysConfig->getConfig("NetworkConfig", SystemPassword );
|
||||
systemUser = sysConfig->getConfig("NetworkConfig", SystemUser );
|
||||
FOUND = true;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem getting SystemName from ./systems/CalpontSystems.xml" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if ( tempSystem == "unassigned")
|
||||
continue;
|
||||
|
||||
//get if root or no-root user install
|
||||
string installDir = "/usr/local";
|
||||
if ( systemUser != "root" )
|
||||
installDir = "/home/" + systemUser;
|
||||
|
||||
installDir = installDir + "/Calpont";
|
||||
|
||||
string cmd;
|
||||
if (!VERBOSE)
|
||||
cmd = "./remote_command.sh " + installParentModuleHostName + " " + systemUser + " " + password + " 'cat " + installDir + "/releasenum' 'release=' cat: 10 " + debug_flag;
|
||||
else
|
||||
cmd = "./remote_command.sh " + installParentModuleHostName + " " + systemUser + " " + password + " '" + installDir + "/bin/mcsadmin getcalpontsoftware' 'tools' Error 10 " + debug_flag;
|
||||
|
||||
cout << "***** Calpont InfiniDB Package Release Information for stack '" << tempSystem << "' *****" << endl << endl;
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
cout << endl;
|
||||
|
||||
cout << "***** Status of stack '" << tempSystem << "' *****" << endl << endl;
|
||||
|
||||
cmd = "./remote_command.sh " + installParentModuleHostName + " " + systemUser + " " + password + " '" + installDir + "/bin/mcsadmin getsystems' dummy Error 10 " + debug_flag;
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
cout << endl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !FOUND ) {
|
||||
cout << "ERROR: System Name '" + systemName + "' not in ./systems/CalpontSystems.xml" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user