Skip to content

Commit fdb43bc

Browse files
committed
Bug#35306351 ndb_restore can exit with code 1 without any error messages if it fails to connect to cluster
The ndb_restore command can exit with code 1 without any error messages if it fails to connect to the cluster due to no free slots etc. This is a very unkind behavior. Fix by add some error messages like "Connection to cluster failed" before exit. Change-Id: I0c65751b11feeb7ea48009159c48141a35baad32
1 parent b86d02d commit fdb43bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

storage/ndb/tools/restore/restore_main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,9 @@ static void init_restore()
19231923
if (g_cluster_connection->connect(opt_connect_retries - 1,
19241924
opt_connect_retry_delay, 1) != 0)
19251925
{
1926+
err << "Could not connect to cluster: '"
1927+
<< g_cluster_connection->get_latest_error() << " - "
1928+
<< g_cluster_connection->get_latest_error_msg() << "'" << endl;
19261929
delete g_cluster_connection;
19271930
g_cluster_connection = NULL;
19281931
exitHandler(NdbToolsProgramExitCode::FAILED);

0 commit comments

Comments
 (0)