Bug #44689 ndb_config suddenly writes warnings to stdout, not stderr
Submitted: 6 May 2009 11:24 Modified: 8 Dec 2009 16:35
Reporter: Hartmut Holzgraefe 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:Linux
Assigned to: Jonas Oreland CPU Architecture:Any

[6 May 2009 11:24] Hartmut Holzgraefe
Description:
With the ndb-6.3.x version of ndb_config warnings about ndb_mgmd and ndbd on the same host were printed to stderr (as expected), with ndb-7.0.4 the warnings are printed to stdout though which makes parsing and using the actual output of ndb_config next to impossible in shell scripts

How to repeat:
Create a minimal config.ini with ndb_mgmd and one ndbd on the same machine:

  [NDBD DEFAULT]
  NoOfReplicas= 2

  [NDB_MGMD]
  HostName = 192.169.1.1

  [NDBD]
  HostName = 192.169.1.1

  [NDBD]
  Hostname = 192.168.1.2

  [MYSQLD]

$ ndb-6.3.22/bin/ndb_config --config-file=config.minimal --query=DataMemory --type=ndbd 
Warning line 13: Cluster configuration warning:
  arbitrator with id 1 and db node with id 2 on same host 192.169.1.1
  Running arbitrator on the same host as a database node may
  cause complete cluster shutdown in case of host failure.
83886080 83886080

$ /ndb-6.3.22/bin/ndb_config --config-file=config.minimal --query=DataMemory --type=ndbd 2>/dev/null 
83886080 83886080

$ ndb-7.0.4/bin/ndb_config --config-file=config.minimal --query=DataMemory --type=ndbd 2>/dev/null 
2009-05-06 13:13:26 [EventLogger] WARNING  -- at line 13: Cluster configuration warning:
  arbitrator with id 1 and db node with id 2 on same host 192.169.1.1
  Running arbitrator on the same host as a database node may
  cause complete cluster shutdown in case of host failure.

83886080 83886080

Suggested fix:
Make warnings go to stderr again
[11 May 2009 13:17] Jonathan Miller
mysql-5.1.34-ndb-7.0.4
[30 Nov 2009 13:40] Hartmut Holzgraefe
This also breaks ndb_error_reporter (bug #49160) so may need higher priority?
[30 Nov 2009 14:26] Jørgen Austvik
Breaks ndb_error_reporter
[7 Dec 2009 12:43] 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/93052

3261 Jonas Oreland	2009-12-07
      ndb - bug#44689 - remove hard-coded usage of ndbout in ConsoleLogger, and use output stream given as input
[7 Dec 2009 13:11] 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/93057

3182 Jonas Oreland	2009-12-07
      ndb - bug#44689 - add testcase to 6.3 (which does not currently have bug) to prevent it creaping in again
[7 Dec 2009 13:15] Bugs System
Pushed into 5.1.39-ndb-6.3.29 (revid:jonas@mysql.com-20091207130702-sktcoyukavgcvhip) (version source revid:jonas@mysql.com-20091207130702-sktcoyukavgcvhip) (merge vers: 5.1.39-ndb-6.3.29) (pib:13)
[7 Dec 2009 13:15] Bugs System
Pushed into 5.1.39-ndb-7.0.10 (revid:jonas@mysql.com-20091207131038-nskuda73cq6l4nw4) (version source revid:jonas@mysql.com-20091207131038-nskuda73cq6l4nw4) (merge vers: 5.1.39-ndb-7.0.10) (pib:13)
[7 Dec 2009 13:18] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091207131405-pyqdj87ob97wo1oy) (version source revid:jonas@mysql.com-20091207131405-pyqdj87ob97wo1oy) (merge vers: 5.1.39-ndb-7.1.0) (pib:13)
[7 Dec 2009 13:21] Jonas Oreland
pushed to 7.0.10
for docs: Note that it also affected ndb_error_reporter as described in other bug referred above
[8 Dec 2009 13:59] 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/93199

3181 Martin Skold	2009-12-08 [merge]
      Merge
      modified:
        configure.in
        mysql-test/std_data/ndb_config_mycnf1.cnf
        mysql-test/suite/ndb/r/ndb_config.result
        mysql-test/suite/ndb/t/ndb_config.test
        sql/ha_ndbcluster_binlog.cc
        storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
        storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
        storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
        storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
        storage/ndb/src/ndbapi/Ndb.cpp
        storage/ndb/test/ndbapi/testBlobs.cpp
[8 Dec 2009 16:35] Jon Stephens
Documented in the NDB-7.0.10 changelog as follows:

        In MySQL Cluster NDB 7.0, ndb_config and ndb_error_reporter were
        printing warnings about management and data nodes running on the
        same host to stdout instead of stderr, as was the case in
        earlier MySQL Cluster release series.

        See also Bug #49160.

Closed.