Bug #47595 Don't print log lines to STDOUT for ndb_mgmd
Submitted: 24 Sep 2009 10:09 Modified: 19 Aug 2010 8:20
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: mysql-5.1.35-telco-7.0.7

[24 Sep 2009 10:09] Geert Vanderkelen
Description:
When you start ndb_mgmd you have 2 lines which are actually lines belonging in the cluster log. They should instead be showing as normal messages, or show up with the --verbose option.

How to repeat:
shell> ndb_mgmd 2>/dev/null
2009-09-24 12:03:52 [MgmSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.35 ndb-7.0.7
2009-09-24 12:03:52 [MgmSrvr] INFO     -- Loaded config from '/data2/users/geert/cluster/master/ndb_1_config.bin.1'

Suggested fix:
The 'Loaded config from..' should actually be in the cluster logs, it is not currently.
Both lines can show up, but I would rather show them asd normal messages:

shell> ndb_mgmd
NDB Cluster Management Server. mysql-5.1.35 ndb-7.0.7
Loaded config from '/data2/users/geert/cluster/master/ndb_1_config.bin.1'

Even better, show them with the --verbose option only.
[28 Sep 2009 13:52] Magnus Blåudd
I think we need to decide what(if any) the ndb_mgmd should print to console when it has been started to become a daemon, but not yet has become one.
[28 Sep 2009 14:07] Geert Vanderkelen
Since ndb_mgmd is a deamon and started usually inside (init.d) scripts, one should not rely on giving any 'useful' information on STDOUT/STDERR, but give it in logs.
Unless --verbose is given.

I'm usually starting such processes with 2>/dev/null 1>&2 </dev/null to make sure STD* are 'detached'.
[29 Sep 2009 13:07] Magnus Blåudd
Ok, so you are saying that "nothing" is fine. I tend to agree, it just looks like the original intention(by someone) was to just print "MySQL Cluster Management server X.X.X" and then go into background.

I guess that would be ok? Or should we not write anything after option parsing?
[30 Sep 2009 9:04] Geert Vanderkelen
I guess printing out the version is owkay. Most folks will pipe them into /dev/null anyway :)
[13 Aug 2010 13:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/115674
[17 Aug 2010 13:28] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.47-ndb-7.0.18 (revid:magnus.blaudd@sun.com-20100817132340-14ccxkvt8x88y4vi) (version source revid:magnus.blaudd@sun.com-20100817132340-14ccxkvt8x88y4vi) (merge vers: 5.1.47-ndb-7.0.18) (pib:20)
[17 Aug 2010 13:29] Magnus Blåudd
Pushed to 7.0.18 and 7.1.7
[18 Aug 2010 17:54] Jon Stephens
Documented change in the NDB-7.0.18 and 7.1.7 changelogs as follows:

      Startup messages previously written by ndb_mgmd to stdout are 
      now written to the cluster log instead.

Closed.
[19 Aug 2010 7:46] Magnus Blåudd
comment should should end with: "if LogDestination is set"
[19 Aug 2010 8:20] Jon Stephens
This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

http://lists.mysql.com/commits/116187