Debian Codegraph @

mysql-test/suite/ndb/t/ndb_mgmd.test

raw
1 --source include/have_ndb.inc
2
3 --echo #
4 --echo # BUG#11764570 NDB_ERROR_REPORTER ONLY COLLECTS LOGS MATCHING NAME NDB_$ID*.
5 --echo #
6
7 --echo Make sure that ndb_mgmd creates ndb_<nodeid>_cluster.log file
8 --file_exists $MYSQLTEST_VARDIR/mysql_cluster.1/ndb_mgmd.1/ndb_3_cluster.log
9
10 --echo Make sure that ndb_mgmd does _not_ create logger.log file
11 --error 1
12 --file_exists $MYSQLTEST_VARDIR/mysql_cluster.1/ndb_mgmd.1/logger.log
13
14 # To validate Mgmd when its started on port that is already in use, Mgmd node is
15 # started on the Port which is used by ndb_mgmd started by MTR. The validation of
16 # the ports is done before creating Daemon.
17 --echo Bug32045786
18 --replace_regex /MySQL Cluster Management Server.*/MySQL Cluster Management Server/ /.*\[MgmtSrvr\]// /'Only one usage of each socket address.*'/ERROR_MESSAGE/ /'Address already in use'/ERROR_MESSAGE/
19 --replace_result $NDB_MGMD_PORT NDB_MGMD_PORT 98 ERROR_CODE 10048 ERROR_CODE 48 ERROR_CODE 125 ERROR_CODE
20 --error 1
21 --exec $NDB_MGMD_EXE --defaults-group-suffix=.1.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --configdir=$MYSQLTEST_VARDIR/mysql_cluster.1/ndb_mgmd.1 --mycnf --ndb-nodeid=3 2>&1
22
23
24 --echo Bug32706682
25 let $dump_file = $MYSQLTEST_VARDIR/tmp/ndb_mgmd_dump_file.txt;
26 --error 1
27 # skip-config-cache is added to prevent starting of mgmd with left over binary configs.
28 --exec $NDB_MGMD_EXE --skip-config-cache > $dump_file 2>&1
29 --echo # verify that mgmd fails to start when config-file
30 --echo # is not specified.
31 --let $assert_text= Mgmd fails to start when config-file option is not specified.
32 --let $assert_select= ERROR -- Could not determine which nodeid to use for this node. Specify it with --ndb-nodeid=<nodeid> on command line
33 --let $assert_file= $dump_file
34 --let $assert_count= 1
35 --source include/assert_grep.inc
36
37 --error 1
38 --exec $NDB_MGMD_EXE -f config.ini --skip-config-file --skip-config-cache > $dump_file 2>&1
39 --echo # verify that mgmd fails to start when skip-config-file is specified.
40 --let $assert_text= Mgmd fails to start when --skip-config-file is specified.
41 --let $assert_select= ERROR -- Could not determine which nodeid to use for this node. Specify it with --ndb-nodeid=<nodeid> on command line
42 --let $assert_file= $dump_file
43 --let $assert_count= 1
44 --source include/assert_grep.inc
45
46 # To validate Mgmd fails when started with both -f and --mycnf
47 --error 1
48 --exec $NDB_MGMD_EXE -f config.ini --mycnf > $dump_file 2>&1
49 --echo # verify that mgmd fails when started with both -f and --mycnf.
50 --let $assert_text= Verify mgmd fails when started with both -f and --mycnf
51 --let $assert_select= ERROR: Both --mycnf and -f is not supported
52 --let $assert_file= $dump_file
53 --let $assert_count= 1
54 --source include/assert_grep.inc
55
56 # To validate Mgmd throws warning when connectstring option is specified
57 # when starting mgmd with -f or binary config.
58 --echo #
59 --echo # Bug32554779 DO NOT ACCEPT -C OPTION WHEN STARTING WITH -F OR
60 --echo # BINARY CONFIG
61 --echo #
62 --error 1
63 --exec $NDB_MGMD_EXE -f config.ini -c hostname --initial --nowait-nodes=0 > $dump_file 2>&1
64 --echo # verify that mgmd throws warning when -c option is provided along with -f
65 --let $assert_text= Do not accept -c option when starting with -f
66 --let $assert_select= WARNING: --ndb-connectstring is ignored when mgmd is started with -f or config-file.
67 --let $assert_file= $dump_file
68 --let $assert_count= 1
69 --source include/assert_grep.inc
70
71 # To validate Mgmd gives error when -f is not specified
72 --echo #
73 --echo # Bug32554492 NDB_MGMD SHOULD REPORT ERROR WHEN STARTED
74 --echo # WITHOUT -F AND BINARY CONFIG
75 --echo #
76 --error 1
77 --exec $NDB_MGMD_EXE config.ini --initial > $dump_file 2>&1
78 --echo # verify that mgmd throws error when -f is not specified
79 --let $assert_text= Mgmd gives error when -f is not specifed
80 --let $assert_select= ERROR: Unknown option - config.ini specified.
81 --let $assert_file= $dump_file
82 --let $assert_count= 1
83 --source include/assert_grep.inc
84
85 # Validates Mgmd gives error when relative path is specified for configdir
86 --echo #
87 --echo # Bug11755867 NDB_MGMD MISMATCH BETWEEN --CONFIGDIR AND DATADIR
88 --echo #
89 --error 1
90 --exec $NDB_MGMD_EXE -f config.ini --initial --configdir=. > $dump_file 2>&1
91 --echo # verify that mgmd throws error when --configdir=. is specified
92 --let $assert_text= Mgmd gives error when relative path is specified for configdir
93 --let $assert_select= ERROR: Relative path \('.'\) not supported for configdir, specify absolute path.
94 --let $assert_file= $dump_file
95 --let $assert_count= 1
96 --source include/assert_grep.inc
97
98 # Bug#32901321
99 --echo #
100 --echo # check if NDB_MGMD hangs when the hostname is not proper
101 --echo #
102 --error 1
103 --exec $NDB_MGMD_EXE -c localhst,localggg --ndb-nodeid=3 --configdir=$MYSQLTEST_VARDIR > $dump_file 2>&1
104 --let $assert_text= Mgmd gives error when can not resolve address in connectstring
105 --let $assert_select= ERROR -- Illegal connect string : Unable to resolve any of the address in connect string
106 --let $assert_file= $dump_file
107 --let $assert_count= 1
108 --source include/assert_grep.inc
109
110 --remove_file $dump_file