Bug #49519 misleading error or silent failure with ndb_config --xml
Submitted: 7 Dec 2009 18:36 Modified: 11 Dec 2009 8:51
Reporter: Jon Stephens Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Linux (opensuse11.1/x64)
Assigned to: CPU Architecture:Any
Tags: NDB-7.0.10-bzr-rev3258

[7 Dec 2009 18:36] Jon Stephens
Description:
With ndb_config, it's known and documented that you must use the --configinfo option with the --xml.

However, we could handle the situation when someone forgets the --configinfo option better. When you do so, ndb_config tries to connect to a management server, which it doesn't need to do, and, if it can't connect to one, it fails.

If it can connect to a management server, it fails silently.

How to repeat:
No MGM, tries to connect and fails:

jon@grindval:~/bin/mysql-5.1-telco-7.1/bin> ./ndb_config --xml
Unable to connect with connect string: nodeid=0,localhost:1186
Retrying every 5 seconds. Attempts left: 2 1, failed.
Connect failed code: 1011, msg: Could not connect to socket

Start MGM:

jon@grindval:~/bin/mysql-5.1-telco-7.1/bin> ../libexec/ndb_mgmd
2009-12-07 19:07:54 [MgmtSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.39 ndb-7.1.0
2009-12-07 19:07:54 [MgmtSrvr] INFO     -- Loaded config from '/home/jon/bin/mysql-5.1-telco-7.1/mysql-cluster/ndb_10_config.bin.1'

Try again, now fails silently:

jon@grindval:~/bin/mysql-5.1-telco-7.1/bin> ./ndb_config --xml

jon@grindval:~/bin/mysql-5.1-telco-7.1/bin>                      

Suggested fix:
If user invokes 'ndb_config --xml', either one of the following should happen IMO:

1. Program fails with an error stating that --xml option can be only be used together with --configinfo option. Program should never try to connect to MGM.

or...

2. Handle it as thought the user tried to run 'ndb_config --configinfo --xml'. (IOW ignore the requirement that --configinfo also be used.)
[11 Dec 2009 8:51] Sveta Smirnova
Thank you for the report.

Verified as described.