mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
added option for relative pat in ndb config
added option for verbose ndb startup
This commit is contained in:
parent
78b722b58c
commit
92c93523dd
3 changed files with 25 additions and 7 deletions
|
@ -1371,7 +1371,8 @@ sub ndbcluster_install () {
|
||||||
"--data-dir=$opt_vardir",
|
"--data-dir=$opt_vardir",
|
||||||
"--verbose=2",
|
"--verbose=2",
|
||||||
$ndbcluster_opts,
|
$ndbcluster_opts,
|
||||||
"--initial"],
|
"--initial",
|
||||||
|
"--relative-config-data-dir"],
|
||||||
"", "", "", "") )
|
"", "", "", "") )
|
||||||
{
|
{
|
||||||
mtr_error("Error ndbcluster_install");
|
mtr_error("Error ndbcluster_install");
|
||||||
|
@ -1463,7 +1464,8 @@ sub ndbcluster_install_slave () {
|
||||||
"--verbose=2",
|
"--verbose=2",
|
||||||
"--small",
|
"--small",
|
||||||
"--ndbd-nodes=1",
|
"--ndbd-nodes=1",
|
||||||
"--initial"],
|
"--initial",
|
||||||
|
"--relative-config-data-dir"],
|
||||||
"", "", "", "") )
|
"", "", "", "") )
|
||||||
{
|
{
|
||||||
mtr_error("Error ndbcluster_install_slave");
|
mtr_error("Error ndbcluster_install_slave");
|
||||||
|
|
|
@ -272,6 +272,7 @@ USE_NDBCLUSTER_ONLY=0
|
||||||
USE_RUNNING_NDBCLUSTER=""
|
USE_RUNNING_NDBCLUSTER=""
|
||||||
USE_RUNNING_NDBCLUSTER_SLAVE=""
|
USE_RUNNING_NDBCLUSTER_SLAVE=""
|
||||||
NDB_EXTRA_TEST=0
|
NDB_EXTRA_TEST=0
|
||||||
|
NDB_VERBOSE=0
|
||||||
NDBCLUSTER_EXTRA_OPTS=""
|
NDBCLUSTER_EXTRA_OPTS=""
|
||||||
USE_PURIFY=""
|
USE_PURIFY=""
|
||||||
PURIFY_LOGS=""
|
PURIFY_LOGS=""
|
||||||
|
@ -357,6 +358,8 @@ while test $# -gt 0; do
|
||||||
NDBCLUSTER_EXTRA_OPTS=" "
|
NDBCLUSTER_EXTRA_OPTS=" "
|
||||||
NDB_EXTRA_TEST=1 ;
|
NDB_EXTRA_TEST=1 ;
|
||||||
;;
|
;;
|
||||||
|
--ndb-verbose)
|
||||||
|
NDB_VERBOSE=2 ;;
|
||||||
--ndb_mgm-extra-opts=*)
|
--ndb_mgm-extra-opts=*)
|
||||||
NDB_MGM_EXTRA_OPTS=`$ECHO "$1" | $SED -e "s;--ndb_mgm-extra-opts=;;"` ;;
|
NDB_MGM_EXTRA_OPTS=`$ECHO "$1" | $SED -e "s;--ndb_mgm-extra-opts=;;"` ;;
|
||||||
--ndb_mgmd-extra-opts=*)
|
--ndb_mgmd-extra-opts=*)
|
||||||
|
@ -1273,8 +1276,10 @@ start_ndbcluster()
|
||||||
then
|
then
|
||||||
NDBCLUSTER_EXTRA_OPTS="--small"
|
NDBCLUSTER_EXTRA_OPTS="--small"
|
||||||
fi
|
fi
|
||||||
OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --verbose=2 --initial"
|
OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --verbose=$NDB_VERBOSE --initial --relative-config-data-dir"
|
||||||
|
if [ "x$NDB_VERBOSE" != "x0" ] ; then
|
||||||
echo "Starting master ndbcluster " $OPTS
|
echo "Starting master ndbcluster " $OPTS
|
||||||
|
fi
|
||||||
./ndb/ndbcluster $OPTS || NDB_STATUS_OK=0
|
./ndb/ndbcluster $OPTS || NDB_STATUS_OK=0
|
||||||
if [ x$NDB_STATUS_OK != x1 ] ; then
|
if [ x$NDB_STATUS_OK != x1 ] ; then
|
||||||
if [ x$FORCE != x1 ] ; then
|
if [ x$FORCE != x1 ] ; then
|
||||||
|
@ -1504,8 +1509,10 @@ start_slave()
|
||||||
NDBCLUSTER_EXTRA_OPTS="--small"
|
NDBCLUSTER_EXTRA_OPTS="--small"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OPTS="$NDBCLUSTER_OPTS_SLAVE --initial $NDBCLUSTER_EXTRA_OPTS --ndbd-nodes=1 --verbose=2"
|
OPTS="$NDBCLUSTER_OPTS_SLAVE --initial $NDBCLUSTER_EXTRA_OPTS --ndbd-nodes=1 --verbose=$NDB_VERBOSE --relative-config-data-dir"
|
||||||
|
if [ "x$NDB_VERBOSE" != "x0" ] ; then
|
||||||
echo "Starting slave ndbcluster " $OPTS
|
echo "Starting slave ndbcluster " $OPTS
|
||||||
|
fi
|
||||||
./ndb/ndbcluster $OPTS \
|
./ndb/ndbcluster $OPTS \
|
||||||
|| NDB_SLAVE_STATUS_OK=0
|
|| NDB_SLAVE_STATUS_OK=0
|
||||||
# > /dev/null 2>&1 || NDB_SLAVE_STATUS_OK=0
|
# > /dev/null 2>&1 || NDB_SLAVE_STATUS_OK=0
|
||||||
|
|
|
@ -52,6 +52,7 @@ initial_ndb=
|
||||||
status_ndb=
|
status_ndb=
|
||||||
ndb_diskless=0
|
ndb_diskless=0
|
||||||
ndbd_nodes=2
|
ndbd_nodes=2
|
||||||
|
relative_config_data_dir=
|
||||||
|
|
||||||
ndb_no_ord=512
|
ndb_no_ord=512
|
||||||
ndb_no_attr=2048
|
ndb_no_attr=2048
|
||||||
|
@ -99,6 +100,9 @@ while test $# -gt 0; do
|
||||||
--data-dir=*)
|
--data-dir=*)
|
||||||
fsdir=`echo "$1" | sed -e "s;--data-dir=;;"`
|
fsdir=`echo "$1" | sed -e "s;--data-dir=;;"`
|
||||||
;;
|
;;
|
||||||
|
--relative-config-data-dir)
|
||||||
|
relative_config_data_dir=1
|
||||||
|
;;
|
||||||
--port=*)
|
--port=*)
|
||||||
port=`echo "$1" | sed -e "s;--port=;;"`
|
port=`echo "$1" | sed -e "s;--port=;;"`
|
||||||
;;
|
;;
|
||||||
|
@ -196,6 +200,11 @@ fi
|
||||||
# Start management server as deamon
|
# Start management server as deamon
|
||||||
|
|
||||||
# Edit file system path and ports in config file
|
# Edit file system path and ports in config file
|
||||||
|
if [ $relative_config_data_dir ] ; then
|
||||||
|
config_fs_ndb="."
|
||||||
|
else
|
||||||
|
config_fs_ndb=$fs_ndb
|
||||||
|
fi
|
||||||
if [ $initial_ndb ] ; then
|
if [ $initial_ndb ] ; then
|
||||||
rm -rf $fs_ndb/ndb_* 2>&1 | cat > /dev/null
|
rm -rf $fs_ndb/ndb_* 2>&1 | cat > /dev/null
|
||||||
sed \
|
sed \
|
||||||
|
@ -206,7 +215,7 @@ if [ $initial_ndb ] ; then
|
||||||
-e s,"CHOOSE_IndexMemory","$ndb_imem",g \
|
-e s,"CHOOSE_IndexMemory","$ndb_imem",g \
|
||||||
-e s,"CHOOSE_Diskless","$ndb_diskless",g \
|
-e s,"CHOOSE_Diskless","$ndb_diskless",g \
|
||||||
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
|
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
|
||||||
-e s,"CHOOSE_FILESYSTEM","$fs_ndb",g \
|
-e s,"CHOOSE_FILESYSTEM","$config_fs_ndb",g \
|
||||||
-e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \
|
-e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \
|
||||||
-e s,"CHOOSE_DiskPageBufferMemory","$ndb_pbmem",g \
|
-e s,"CHOOSE_DiskPageBufferMemory","$ndb_pbmem",g \
|
||||||
< "$config_ini" \
|
< "$config_ini" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue