You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-943 - change to use defauly mysql password logic, reading from the .my.cnf file. changesfrom defaults-file to defulats-extra-file
This commit is contained in:
@ -14,9 +14,6 @@ for arg in "$@"; do
|
|||||||
installdir=$prefix/mariadb/columnstore
|
installdir=$prefix/mariadb/columnstore
|
||||||
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||||
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
||||||
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
|
||||||
password="`echo $arg | awk -F= '{print $2}'`"
|
|
||||||
pwprompt="--password=$password"
|
|
||||||
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
installdir="`echo $arg | awk -F= '{print $2}'`"
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
prefix=`dirname $installdir`
|
prefix=`dirname $installdir`
|
||||||
@ -27,7 +24,7 @@ done
|
|||||||
|
|
||||||
df=$installdir/mysql/my.cnf
|
df=$installdir/mysql/my.cnf
|
||||||
|
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --force --user=root $pwprompt mysql 2>/tmp/mysql_install.log <<EOD
|
$installdir/mysql/bin/mysql --defaults-extra-file=$df --force --user=root mysql 2>/tmp/mysql_install.log <<EOD
|
||||||
INSTALL PLUGIN columnstore SONAME 'libcalmysql.so';
|
INSTALL PLUGIN columnstore SONAME 'libcalmysql.so';
|
||||||
INSTALL PLUGIN infinidb SONAME 'libcalmysql.so';
|
INSTALL PLUGIN infinidb SONAME 'libcalmysql.so';
|
||||||
INSTALL PLUGIN columnstore_tables SONAME 'is_columnstore_tables.so';
|
INSTALL PLUGIN columnstore_tables SONAME 'is_columnstore_tables.so';
|
||||||
@ -130,11 +127,11 @@ CREATE TABLE IF NOT EXISTS infinidb_querystats.priority
|
|||||||
insert ignore into infinidb_querystats.priority values ('High', 100),('Medium', 66), ('Low', 33);
|
insert ignore into infinidb_querystats.priority values ('High', 100),('Medium', 66), ('Low', 33);
|
||||||
EOD
|
EOD
|
||||||
|
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --user=root $pwprompt mysql 2>/dev/null <$installdir/mysql/syscatalog_mysql.sql
|
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/syscatalog_mysql.sql
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --user=root $pwprompt mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql
|
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --user=root $pwprompt mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql
|
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --user=root $pwprompt mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql
|
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --user=root $pwprompt mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql
|
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql
|
||||||
|
|
||||||
sed -i 's/infinidb_compression_type=1/infinidb_compression_type=2/' $installdir/mysql/my.cnf >/dev/null 2>&1
|
sed -i 's/infinidb_compression_type=1/infinidb_compression_type=2/' $installdir/mysql/my.cnf >/dev/null 2>&1
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log 2>&1
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log 2>&1
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log 2>&1
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log 2>&1
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log 2>&1
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log 2>&1
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log 2>&1
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log 2>&1
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log 2>&1
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log 2>&1
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
|
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
|
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
|
||||||
|
|
||||||
|
@ -156,12 +156,7 @@ if [ $module = "um" ] || ( [ $module = "pm" ] && [ $PMwithUM = "y" ] ) || [ $Ser
|
|||||||
fi
|
fi
|
||||||
echo "Run post-mysql-install"
|
echo "Run post-mysql-install"
|
||||||
|
|
||||||
password=`$COLUMNSTORE_INSTALL_DIR/bin/getMySQLpw`
|
$COLUMNSTORE_INSTALL_DIR/bin/post-mysql-install --installdir=$COLUMNSTORE_INSTALL_DIR > /tmp/post-mysql-install.log 2>&1
|
||||||
if [ $password = "unassigned" ]; then
|
|
||||||
password=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
$COLUMNSTORE_INSTALL_DIR/bin/post-mysql-install --installdir=$COLUMNSTORE_INSTALL_DIR --password=$password > /tmp/post-mysql-install.log 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: post-mysql-install failed: check /tmp/post-mysql-install.log"
|
echo "ERROR: post-mysql-install failed: check /tmp/post-mysql-install.log"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -9,25 +9,11 @@ checkForError() {
|
|||||||
# check for password error
|
# check for password error
|
||||||
grep "ERROR 1045" /tmp/mysql_install.log > /tmp/error.check
|
grep "ERROR 1045" /tmp/mysql_install.log > /tmp/error.check
|
||||||
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
if test -f $HOME/.my.cnf ; then
|
echo "MySQL Password file missing or incorrect, check .my.cnf file"
|
||||||
password=`cat $HOME/.my.cnf | grep password | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $3}'`
|
rm -f /tmp/error.check
|
||||||
if [ ! -z $password ]; then
|
$installdir/mysql/mysql-Columnstore stop
|
||||||
pwprompt="-p$password"
|
sleep 2
|
||||||
return 1;
|
exit 2;
|
||||||
else
|
|
||||||
echo "MySQL Password file missing or incorrect, check .my.cnf file"
|
|
||||||
rm -f /tmp/error.check
|
|
||||||
$installdir/mysql/mysql-Columnstore stop
|
|
||||||
sleep 2
|
|
||||||
exit 2;
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "MySQL Password file missing or incorrect, check .my.cnf file"
|
|
||||||
rm -f /tmp/error.check
|
|
||||||
$installdir/mysql/mysql-Columnstore stop
|
|
||||||
sleep 2
|
|
||||||
exit 2;
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f /tmp/error.check
|
rm -f /tmp/error.check
|
||||||
@ -37,7 +23,7 @@ checkForError() {
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
echo "checking for engine columnstore..."
|
echo "checking for engine columnstore..."
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
--execute='show engines;' \
|
--execute='show engines;' \
|
||||||
calpontsys | grep -i columnstore
|
calpontsys | grep -i columnstore
|
||||||
@ -66,11 +52,6 @@ for arg in "$@"; do
|
|||||||
installdir=$prefix/mariadb/columnstore
|
installdir=$prefix/mariadb/columnstore
|
||||||
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
|
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
|
||||||
rpmmode="$(echo $arg | awk -F= '{print $2}')"
|
rpmmode="$(echo $arg | awk -F= '{print $2}')"
|
||||||
elif [ $(expr -- "$arg" : '--password=') -eq 11 ]; then
|
|
||||||
password="$(echo $arg | awk -F= '{print $2}')"
|
|
||||||
if [ ! -z $password ]; then
|
|
||||||
pwprompt="-p$password"
|
|
||||||
fi
|
|
||||||
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
|
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
|
||||||
installdir="$(echo $arg | awk -F= '{print $2}')"
|
installdir="$(echo $arg | awk -F= '{print $2}')"
|
||||||
prefix=$(dirname $installdir)
|
prefix=$(dirname $installdir)
|
||||||
@ -119,11 +100,11 @@ if [ -x $installdir/mysql/mysql-Columnstore ]; then
|
|||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Install various Calpont stuff...
|
# Install various Calpont stuff...
|
||||||
$installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir
|
$installdir/mysql/install_calpont_mysql.sh --installdir=$installdir
|
||||||
checkForError
|
checkForError
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
# retry
|
# retry
|
||||||
$installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir
|
$installdir/mysql/install_calpont_mysql.sh --installdir=$installdir
|
||||||
checkForError
|
checkForError
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Invalid password in .my.cnf, or Columnstore plugin install missing"
|
echo "ERROR: Invalid password in .my.cnf, or Columnstore plugin install missing"
|
||||||
|
@ -69,7 +69,7 @@ fi
|
|||||||
test -x /usr/local/bin/idb-testing-mysql-pre-start && /usr/local/bin/idb-testing-mysql-pre-start $installdir/mysql
|
test -x /usr/local/bin/idb-testing-mysql-pre-start && /usr/local/bin/idb-testing-mysql-pre-start $installdir/mysql
|
||||||
|
|
||||||
### Don't give the user the notes, we'll fix them ourselves...
|
### Don't give the user the notes, we'll fix them ourselves...
|
||||||
$installdir/mysql/scripts/mysql_install_db --rpm --user=$user --defaults-file=$installdir/mysql/my.cnf --basedir=$installdir/mysql >/dev/null
|
$installdir/mysql/scripts/mysql_install_db --rpm --user=$user --defaults-extra-file=$installdir/mysql/my.cnf --basedir=$installdir/mysql >/dev/null
|
||||||
# Change permissions again to fix any new files.
|
# Change permissions again to fix any new files.
|
||||||
chown -R $user:$user $mysql_datadir
|
chown -R $user:$user $mysql_datadir
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log 2>&1
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ EOD
|
|||||||
|
|
||||||
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
$installdir/mysql/bin/mysql \
|
$installdir/mysql/bin/mysql \
|
||||||
--defaults-file=$installdir/mysql/my.cnf \
|
--defaults-extra-file=$installdir/mysql/my.cnf \
|
||||||
--user=root $pwprompt \
|
--user=root $pwprompt \
|
||||||
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
@ -8770,6 +8770,9 @@ namespace oam
|
|||||||
******************************************************************************************/
|
******************************************************************************************/
|
||||||
std::string Oam::getMySQLPassword()
|
std::string Oam::getMySQLPassword()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return oam::UnassignedName;
|
||||||
|
|
||||||
string mysqlUser = "root";
|
string mysqlUser = "root";
|
||||||
|
|
||||||
string USER = "root";
|
string USER = "root";
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||||
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
||||||
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root"
|
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-extra-file=$MYSQLCNF -u root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||||
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
||||||
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root"
|
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-extra-file=$MYSQLCNF -u root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
MYSQLCMD="/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root"
|
MYSQLCMD="/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$INSTALLDIR" ]; then
|
if [ -z "$INSTALLDIR" ]; then
|
||||||
|
@ -19,7 +19,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql --defaults-file=$COLUMNSTORE_INSTALL_DIR/mysql/my.cnf -u root"
|
MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql --defaults-extra-file=$COLUMNSTORE_INSTALL_DIR/mysql/my.cnf -u root"
|
||||||
export MYSQLCMD
|
export MYSQLCMD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||||
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
||||||
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root"
|
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-extra-file=$MYSQLCNF -u root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -423,7 +423,7 @@ int main(int argc, char *argv[])
|
|||||||
cout << "It should be run on the server with the DBRM front-end." << endl;
|
cout << "It should be run on the server with the DBRM front-end." << endl;
|
||||||
cout << "Check the Admin Guide for additional information." << endl;
|
cout << "Check the Admin Guide for additional information." << endl;
|
||||||
cout << endl;
|
cout << endl;
|
||||||
cout << "Usage: columnstoreSupport [-h][-a][-hw][-s][-c][-db][-r][-l][-bl][-lc][-p 'root-password'][-mp 'mariadb-columnstore-root-password'][-de]";
|
cout << "Usage: columnstoreSupport [-h][-a][-hw][-s][-c][-db][-r][-l][-bl][-lc][-p 'root-password'][-de]";
|
||||||
// if hdfs set up print the hadoop option
|
// if hdfs set up print the hadoop option
|
||||||
if (!DataFilePlugin.empty())
|
if (!DataFilePlugin.empty())
|
||||||
cout << "[-hd]";
|
cout << "[-hd]";
|
||||||
@ -439,7 +439,6 @@ int main(int argc, char *argv[])
|
|||||||
cout << " -bl Output Columnstore Bulk Log Reports only" << endl;
|
cout << " -bl Output Columnstore Bulk Log Reports only" << endl;
|
||||||
cout << " -lc Output Reports for Local Server only" << endl;
|
cout << " -lc Output Reports for Local Server only" << endl;
|
||||||
cout << " -p password (multi-server systems), root-password or 'ssh' to use 'ssh keys'" << endl;
|
cout << " -p password (multi-server systems), root-password or 'ssh' to use 'ssh keys'" << endl;
|
||||||
cout << " -mp MariaDB Columnstore root user password" << endl;
|
|
||||||
cout << " -de Debug Flag" << endl;
|
cout << " -de Debug Flag" << endl;
|
||||||
// if hdfs set up print the hadoop option
|
// if hdfs set up print the hadoop option
|
||||||
if (!DataFilePlugin.empty())
|
if (!DataFilePlugin.empty())
|
||||||
@ -783,7 +782,7 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// check if mysql is supported and get info
|
// check if mysql is supported and get info
|
||||||
string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root ";
|
string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-extra-file=" + installDir + "/mysql/my.cnf -u root ";
|
||||||
string cmd = columnstoreMysql + " -e 'status' > /tmp/idbmysql.log 2>&1";
|
string cmd = columnstoreMysql + " -e 'status' > /tmp/idbmysql.log 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
@ -846,7 +845,7 @@ int main(int argc, char *argv[])
|
|||||||
if (!FAILED)
|
if (!FAILED)
|
||||||
{
|
{
|
||||||
// check if mysql is supported and get info
|
// check if mysql is supported and get info
|
||||||
string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt;
|
string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-extra-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt;
|
||||||
string cmd = columnstoreMysql + " -V > /dev/null 2>&1";
|
string cmd = columnstoreMysql + " -V > /dev/null 2>&1";
|
||||||
int ret = system(cmd.c_str());
|
int ret = system(cmd.c_str());
|
||||||
if ( WEXITSTATUS(ret) == 0) {
|
if ( WEXITSTATUS(ret) == 0) {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||||
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
|
||||||
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root"
|
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-extra-file=$MYSQLCNF -u root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
MYSQLCMD="/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root"
|
MYSQLCMD="/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$INSTALLDIR" ]; then
|
if [ -z "$INSTALLDIR" ]; then
|
||||||
|
@ -19,7 +19,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [ -z "$MYSQLCMD" ]; then
|
if [ -z "$MYSQLCMD" ]; then
|
||||||
MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql --defaults-file=$COLUMNSTORE_INSTALL_DIR/mysql/my.cnf -u root"
|
MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql --defaults-extra-file=$COLUMNSTORE_INSTALL_DIR/mysql/my.cnf -u root"
|
||||||
export MYSQLCMD
|
export MYSQLCMD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -6122,6 +6122,8 @@ int processCommand(string* arguments)
|
|||||||
{
|
{
|
||||||
cout << endl << "**** disableRep Failed : " << e.what() << endl;
|
cout << endl << "**** disableRep Failed : " << e.what() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cout << endl;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||||
|
Copyright (C) 2017 MariaDB
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
as published by the Free Software Foundation; version 2 of
|
as published by the Free Software Foundation; version 2 of
|
||||||
@ -56,6 +56,10 @@ using namespace oam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
|
cout << oam::UnassignedName << endl;
|
||||||
|
|
||||||
|
exit (0);
|
||||||
|
|
||||||
string USER = "root";
|
string USER = "root";
|
||||||
char* p= getenv("USER");
|
char* p= getenv("USER");
|
||||||
|
@ -2971,7 +2971,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
//try to login
|
//try to login
|
||||||
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt + " -e status' 1 > /tmp/idbmysql.log 2>&1";
|
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/mysql/bin/mysql --defaults-extra-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt + " -e status' 1 > /tmp/idbmysql.log 2>&1";
|
||||||
rtnCode = system(cmd.c_str());
|
rtnCode = system(cmd.c_str());
|
||||||
if (WEXITSTATUS(rtnCode) != 0) {
|
if (WEXITSTATUS(rtnCode) != 0) {
|
||||||
cout << endl << "Error returned from remote_command.sh" << endl;
|
cout << endl << "Error returned from remote_command.sh" << endl;
|
||||||
@ -3003,7 +3003,7 @@ int main(int argc, char *argv[])
|
|||||||
pwprompt = "--password=" + mysqlpw;
|
pwprompt = "--password=" + mysqlpw;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt + " -e status' 1 > /tmp/idbmysql.log 2>&1";
|
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/mysql/bin/mysql --defaults-extra-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt + " -e status' 1 > /tmp/idbmysql.log 2>&1";
|
||||||
rtnCode = system(cmd.c_str());
|
rtnCode = system(cmd.c_str());
|
||||||
if (WEXITSTATUS(rtnCode) != 0) {
|
if (WEXITSTATUS(rtnCode) != 0) {
|
||||||
cout << endl << "MariaDB ColumnStore login failure, password mismatch in " + HOME + ".my.cnf on " << remoteModuleName << endl;
|
cout << endl << "MariaDB ColumnStore login failure, password mismatch in " + HOME + ".my.cnf on " << remoteModuleName << endl;
|
||||||
|
@ -2567,7 +2567,7 @@ void processMSG(messageqcpp::IOSocket* cfIos)
|
|||||||
|
|
||||||
// target = root password
|
// target = root password
|
||||||
oam::DeviceNetworkList devicenetworklist;
|
oam::DeviceNetworkList devicenetworklist;
|
||||||
status = processManager.setMySQLReplication(devicenetworklist, oam::UnassignedName, false, true, target, false);
|
status = processManager.setMySQLReplication(devicenetworklist, oam::UnassignedName, false, false, target, false);
|
||||||
|
|
||||||
log.writeLog(__LINE__, "Disable MySQL Replication status: " + oam.itoa(status) );
|
log.writeLog(__LINE__, "Disable MySQL Replication status: " + oam.itoa(status) );
|
||||||
|
|
||||||
@ -3439,6 +3439,9 @@ void ProcessManager::recycleProcess(string module)
|
|||||||
|
|
||||||
//restart ExeMgrs/mysql if module is a pm
|
//restart ExeMgrs/mysql if module is a pm
|
||||||
if ( moduleType == "pm" ) {
|
if ( moduleType == "pm" ) {
|
||||||
|
// restartProcessType("DBRMWorkerNode");
|
||||||
|
// restartProcessType("PrimProc");
|
||||||
|
// restartProcessType("WriteEngineServer");
|
||||||
restartProcessType("ExeMgr");
|
restartProcessType("ExeMgr");
|
||||||
restartProcessType("mysql");
|
restartProcessType("mysql");
|
||||||
}
|
}
|
||||||
@ -3448,20 +3451,60 @@ void ProcessManager::recycleProcess(string module)
|
|||||||
if ( PrimaryUMModuleName == module )
|
if ( PrimaryUMModuleName == module )
|
||||||
{
|
{
|
||||||
restartProcessType("DDLProc", module);
|
restartProcessType("DDLProc", module);
|
||||||
// restartProcessType("DDLProc", module, false);
|
|
||||||
sleep(1);
|
sleep(1);
|
||||||
restartProcessType("DMLProc", module);
|
restartProcessType("DMLProc", module);
|
||||||
// restartProcessType("DMLProc", module, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( moduleType == "pm" && PrimaryUMModuleName != module)
|
if( moduleType == "pm" && PrimaryUMModuleName != module)
|
||||||
{
|
{
|
||||||
|
// restartProcessType("DBRMControllerNode", module);
|
||||||
|
// sleep(1);
|
||||||
reinitProcessType("DDLProc");
|
reinitProcessType("DDLProc");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
restartProcessType("DMLProc", module);
|
restartProcessType("DMLProc", module);
|
||||||
// restartProcessType("DMLProc", module, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//wait for DMLProc to go ACTIVE
|
||||||
|
/* uint16_t rtn = 0;
|
||||||
|
bool bfirst = true;
|
||||||
|
while (rtn == 0)
|
||||||
|
{
|
||||||
|
ProcessStatus DMLprocessstatus;
|
||||||
|
try {
|
||||||
|
oam.getProcessStatus("DMLProc", PrimaryUMModuleName, DMLprocessstatus);
|
||||||
|
}
|
||||||
|
catch (exception& ex)
|
||||||
|
{
|
||||||
|
// string error = ex.what();
|
||||||
|
// log.writeLog(__LINE__, "EXCEPTION ERROR on getProcessStatus: " + error, LOG_TYPE_ERROR);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
// log.writeLog(__LINE__, "EXCEPTION ERROR on getProcessStatus: Caught unknown exception!", LOG_TYPE_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DMLprocessstatus.ProcessOpState == oam::BUSY_INIT) {
|
||||||
|
if (bfirst)
|
||||||
|
{
|
||||||
|
log.writeLog(__LINE__, "Waiting for DMLProc to finish rollback" , LOG_TYPE_INFO);
|
||||||
|
bfirst = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DMLprocessstatus.ProcessOpState == oam::ACTIVE) {
|
||||||
|
rtn = oam::ACTIVE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DMLprocessstatus.ProcessOpState == oam::FAILED) {
|
||||||
|
rtn = oam::FAILED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// wait some more
|
||||||
|
sleep(2);
|
||||||
|
}
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4970,17 +4970,6 @@ int ProcessMonitor::runMasterRep(std::string& masterLogFile, std::string& master
|
|||||||
|
|
||||||
log.writeLog(__LINE__, "runMasterRep function called", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "runMasterRep function called", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
//get mysql user password
|
|
||||||
string mysqlpw = oam::UnassignedName;
|
|
||||||
try {
|
|
||||||
mysqlpw = oam.getMySQLPassword();
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{}
|
|
||||||
|
|
||||||
if ( mysqlpw == oam::UnassignedName )
|
|
||||||
mysqlpw = "";
|
|
||||||
|
|
||||||
SystemModuleTypeConfig systemModuleTypeConfig;
|
SystemModuleTypeConfig systemModuleTypeConfig;
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig(systemModuleTypeConfig);
|
oam.getSystemConfig(systemModuleTypeConfig);
|
||||||
@ -5023,8 +5012,7 @@ int ProcessMonitor::runMasterRep(std::string& masterLogFile, std::string& master
|
|||||||
string ipAddr = (*pt1).IPAddr;
|
string ipAddr = (*pt1).IPAddr;
|
||||||
|
|
||||||
string logFile = "/tmp/master-rep-columnstore-" + moduleName + ".log";
|
string logFile = "/tmp/master-rep-columnstore-" + moduleName + ".log";
|
||||||
string cmd = startup::StartUp::installDir() + "/bin/master-rep-columnstore.sh --password=" +
|
string cmd = startup::StartUp::installDir() + "/bin/master-rep-columnstore.sh --installdir=" + startup::StartUp::installDir() + " --hostIP=" + ipAddr + " > " + logFile + " 2>&1";
|
||||||
mysqlpw + " --installdir=" + startup::StartUp::installDir() + " --hostIP=" + ipAddr + " > " + logFile + " 2>&1";
|
|
||||||
log.writeLog(__LINE__, "cmd = " + cmd, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "cmd = " + cmd, LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
@ -5050,24 +5038,8 @@ int ProcessMonitor::runMasterRep(std::string& masterLogFile, std::string& master
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//got check for password and bypass config check
|
|
||||||
if ( passwordError )
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
mysqlpw = oam.getMySQLPassword();
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{}
|
|
||||||
|
|
||||||
if ( mysqlpw == oam::UnassignedName )
|
break;
|
||||||
{
|
|
||||||
log.writeLog(__LINE__, "master-rep-columnstore.sh: MySQL Password Error", LOG_TYPE_ERROR);
|
|
||||||
return oam::API_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5140,17 +5112,6 @@ int ProcessMonitor::runSlaveRep(std::string& masterLogFile, std::string& masterL
|
|||||||
|
|
||||||
log.writeLog(__LINE__, "runSlaveRep function called", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "runSlaveRep function called", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
//get mysql user password
|
|
||||||
string mysqlpw = oam::UnassignedName;
|
|
||||||
try {
|
|
||||||
mysqlpw = oam.getMySQLPassword();
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{}
|
|
||||||
|
|
||||||
if ( mysqlpw == oam::UnassignedName )
|
|
||||||
mysqlpw = "";
|
|
||||||
|
|
||||||
// get master replicaion module IP Address
|
// get master replicaion module IP Address
|
||||||
string PrimaryUMModuleName;
|
string PrimaryUMModuleName;
|
||||||
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
|
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
|
||||||
@ -5169,8 +5130,7 @@ int ProcessMonitor::runSlaveRep(std::string& masterLogFile, std::string& masterL
|
|||||||
bool passwordError = false;
|
bool passwordError = false;
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
string cmd = startup::StartUp::installDir() + "/bin/slave-rep-columnstore.sh --password=" +
|
string cmd = startup::StartUp::installDir() + "/bin/slave-rep-columnstore.sh --installdir=" + startup::StartUp::installDir() + " --masteripaddr=" + masterIPAddress + " --masterlogfile=" + masterLogFile + " --masterlogpos=" + masterLogPos + + " --port=" + port + " > /tmp/slave-rep-columnstore.log 2>&1";
|
||||||
mysqlpw + " --installdir=" + startup::StartUp::installDir() + " --masteripaddr=" + masterIPAddress + " --masterlogfile=" + masterLogFile + " --masterlogpos=" + masterLogPos + + " --port=" + port + " > /tmp/slave-rep-columnstore.log 2>&1";
|
|
||||||
|
|
||||||
log.writeLog(__LINE__, "cmd = " + cmd, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "cmd = " + cmd, LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
@ -5200,24 +5160,6 @@ int ProcessMonitor::runSlaveRep(std::string& masterLogFile, std::string& masterL
|
|||||||
return oam::API_FAILURE;
|
return oam::API_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//got check for password and bypass config check
|
|
||||||
if ( passwordError )
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
mysqlpw = oam.getMySQLPassword();
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{}
|
|
||||||
|
|
||||||
if ( mysqlpw == oam::UnassignedName )
|
|
||||||
{
|
|
||||||
log.writeLog(__LINE__, "slave-rep-columnstore.sh: MySQL Password Error", LOG_TYPE_ERROR);
|
|
||||||
return oam::API_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return oam::API_FAILURE;
|
return oam::API_FAILURE;
|
||||||
@ -5235,19 +5177,7 @@ int ProcessMonitor::runDisableRep()
|
|||||||
|
|
||||||
log.writeLog(__LINE__, "runDisableRep function called", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "runDisableRep function called", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
//get mysql user password
|
string cmd = startup::StartUp::installDir() + "/bin/disable-rep-columnstore.sh --installdir=" + startup::StartUp::installDir() + " > /tmp/disable-rep-columnstore.log 2>&1";
|
||||||
string mysqlpw = oam::UnassignedName;
|
|
||||||
try {
|
|
||||||
mysqlpw = oam.getMySQLPassword();
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{}
|
|
||||||
|
|
||||||
if ( mysqlpw == oam::UnassignedName )
|
|
||||||
mysqlpw = "";
|
|
||||||
|
|
||||||
string cmd = startup::StartUp::installDir() + "/bin/disable-rep-columnstore.sh --password=" +
|
|
||||||
mysqlpw + " --installdir=" + startup::StartUp::installDir() + " > /tmp/disable-rep-columnstore.log 2>&1";
|
|
||||||
|
|
||||||
log.writeLog(__LINE__, "cmd = " + cmd, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "cmd = " + cmd, LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
|
@ -22,5 +22,5 @@
|
|||||||
#
|
#
|
||||||
# Execute script on test database
|
# Execute script on test database
|
||||||
#
|
#
|
||||||
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-file=/usr/local/mariadb/columnstore/mysql/my.cnf -f -u root $1 <$6 > $logFileName.test.log 2>&1
|
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -f -u root $1 <$6 > $logFileName.test.log 2>&1
|
||||||
diff $logFileName.ref.log $logFileName.test.log > $logFileName.diff.log
|
diff $logFileName.ref.log $logFileName.test.log > $logFileName.diff.log
|
||||||
|
@ -186,7 +186,7 @@ function execOneTestRun {
|
|||||||
fi
|
fi
|
||||||
if [ $dbmsType = "M" ]; then
|
if [ $dbmsType = "M" ]; then
|
||||||
pathSfn=$1\/$sess
|
pathSfn=$1\/$sess
|
||||||
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root $testDB <$sfn 2> $pathSfn\/$sfn.err.log |grep "^Calpont" > $pathSfn\/$sfn.log &
|
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root $testDB <$sfn 2> $pathSfn\/$sfn.err.log |grep "^Calpont" > $pathSfn\/$sfn.log &
|
||||||
else
|
else
|
||||||
su - oracle -c "sqlplus /nolog @/home/qa/srv/common/script/callogin.sql $testDB $testDB xe srvqaperf2 <$sfn" |grep "^Calpont" > $1\/$sess\/$sfn.log &
|
su - oracle -c "sqlplus /nolog @/home/qa/srv/common/script/callogin.sql $testDB $testDB xe srvqaperf2 <$sfn" |grep "^Calpont" > $1\/$sess\/$sfn.log &
|
||||||
fi
|
fi
|
||||||
|
@ -19,5 +19,5 @@
|
|||||||
#
|
#
|
||||||
# Execute script on test database
|
# Execute script on test database
|
||||||
#
|
#
|
||||||
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root $1 <$2 > $logFileName.test.log
|
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root $1 <$2 > $logFileName.test.log
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user