Skip to content

Commit 3996599

Browse files
committed
WL#15524 patch #13 ndb_waiter and new MTR tests
Post push fix. Change printout 'Using TLS' to ' trying TLS' added to printout of 'Connecting to management server ...' line for ndb_waiter tool. Adjust test ndb.ndb_tools_result to ignore wheter TLS is tried or not to be able to run test suite ndb with or without TLS. Change-Id: I6fb98b20eda21871248f3b85586c8f2a4cce93eb
1 parent 6136389 commit 3996599

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

mysql-test/suite/ndb/r/ndb_tools_connect.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ Unable to connect to management server.
7979
'
8080

8181
Testing ndb_waiter
82-
Connecting to management server at nodeid=0,localhost:<MGMD-PORT>
82+
Connecting to management server at nodeid=0,localhost:<MGMD-PORT><MAYBE-TLS>
8383
Node 1: STARTED
8484
Node 2: STARTED
85-
Connecting to management server at nodeid=0,no_such_host:1186
86-
Unable to resolve any of the address in connect string: nodeid=0,no_such_host:1186
85+
Connecting to management server at nodeid=0,no_such_host:1186<MAYBE-TLS>
86+
Unable to resolve any of the address in connect string: nodeid=0,no_such_host:1186<MAYBE-TLS>
8787
latest_error=1001, line=no_such_host

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ drop table t1;
6363
--echo
6464

6565
--echo Testing ndb_waiter
66-
--replace_regex /localhost:[0-9]*/localhost:<MGMD-PORT>/
66+
replace_regex /localhost:[0-9]+ trying TLS/localhost:<MGMD-PORT><MAYBE-TLS>/
67+
/localhost:[0-9]+/localhost:<MGMD-PORT><MAYBE-TLS>/;
6768
--exec $NDB_WAITER
68-
--replace_regex /line.*/line=no_such_host/
69+
replace_regex /line.*/line=no_such_host/
70+
/no_such_host:1186( trying TLS)?/no_such_host:1186<MAYBE-TLS>/;
6971
--error 1
7072
--exec $NDB_WAITER --ndb-connectstring=no_such_host --connect-retry-delay=1 --connect-retries=3
7173

storage/ndb/tools/waiter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ int main(int argc, char** argv){
182182
}
183183

184184
tlsKeyManager.init_mgm_client(opt_tls_search_path);
185-
if(tlsKeyManager.ctx())
186-
ndbout_c("Using TLS.");
187185

188186
if (waitClusterStatus(connect_string, wait_status) != 0)
189187
return NdbToolsProgramExitCode::FAILED;
@@ -320,7 +318,9 @@ waitClusterStatus(const char* _addr,
320318

321319
char buf[1024];
322320
ndbout << "Connecting to management server at "
323-
<< ndb_mgm_get_connectstring(handle, buf, sizeof(buf)) << endl;
321+
<< ndb_mgm_get_connectstring(handle, buf, sizeof(buf))
322+
<< (tlsKeyManager.ctx() ? " trying TLS" : "")
323+
<< endl;
324324
if (ndb_mgm_connect_tls(handle,
325325
opt_connect_retries - 1, opt_connect_retry_delay, 1,
326326
opt_mgm_tls)) {

0 commit comments

Comments
 (0)