Bug #25941 ndb_config --config-file=... prints warnings to stdout, not stderr
Submitted: 30 Jan 2007 11:59 Modified: 23 Jul 2007 12:34
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.0, 5.1 OS:Any (any)
Assigned to: li zhou CPU Architecture:Any

[30 Jan 2007 11:59] Hartmut Holzgraefe
Description:
When trying to extract information from a cluster configuration file with "ndb_config --config-file=..." warnings like "Running arbitrator on the same host as a database node" are printed to stdout, not stderr. There is no option to turn these warnings off or to redirect them so any tool parsing the output of ndb_config has to add extra parsing code to distinguish between warnings and actual results.

How to repeat:
$ ndb_config --config-file=config.ini --rows='\n' --query=hostname
Cluster configuration warning:
  arbitrator with id 62 and db node with id 1 on same host ndbsup-1
  arbitrator with id 63 and db node with id 2 on same host ndbsup-2
  Running arbitrator on the same host as a database node may
  cause complete cluster shutdown in case of host failure.
ndbsup-1
ndbsup-2
ndbsup-3
ndbsup-4
ndbsup-1
ndbsup-2

Suggested fix:
either print warnings to stderr instead of stdout or add a --quiet option
[30 Jan 2007 12:19] Hartmut Holzgraefe
configuration file showing the ndb_config warning problem

Attachment: config.ini (application/octet-stream, text), 510 bytes.

[13 Jun 2007 10:31] 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/28640

ChangeSet@1.2476, 2007-06-13 18:21:19+00:00, lzhou@dev3-63.(none) +1 -0
  BUG#25941 Output warning messages from stdout to stderr when abitrator warnings exist
[13 Jun 2007 12:18] Jonas Oreland
patch as such is ok.

but check/make sure that *all* printouts are being made using ctx

ok?

/Jonas
[15 Jun 2007 1:33] 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/28831

ChangeSet@1.2476, 2007-06-15 09:23:27+00:00, lzhou@dev3-63.(none) +1 -0
  BUG#25941 Output warning messages from stdout to stderr when abitrator warnings exist
[19 Jul 2007 15:48] Bugs System
Pushed into 5.1.21-beta
[19 Jul 2007 15:50] Bugs System
Pushed into 5.0.48
[23 Jul 2007 12:34] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.48 and 5.1.21 changelogs.