Bug #45588 ndb_mgmd outputs to logs but not to console without --nodaemon
Submitted: 18 Jun 2009 12:44 Modified: 11 Sep 2009 13:49
Reporter: jack andrews 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:Microsoft Windows
Assigned to: jack andrews
Triage: Triaged: D4 (Minor) / R6 (Needs Assessment) / E6 (Needs Assessment)

[18 Jun 2009 12:44] jack andrews
Description:
unless --nodaemon, ndb_mgmd won't show output to console.

How to repeat:
.
[27 Aug 2009 10:32] jack andrews
ndbd.exe and ndb_mgmd.exe are not --nodaemon be default.
as it makes no sense to run an exe as a service from the
command line, lets make --nodaemon set by default
(when not running as a service)
[27 Aug 2009 11:30] Magnus Blåudd
Ok, go ahead and write a patch.
[28 Aug 2009 11:09] jack andrews
bzr barfed on the post-commit mail, so pasting diff here

=== modified file 'storage/ndb/src/kernel/main.cpp'
--- storage/ndb/src/kernel/main.cpp     2009-08-03 15:38:54 +0000
+++ storage/ndb/src/kernel/main.cpp     2009-08-28 10:13:56 +0000
@@ -59,11 +59,11 @@
     GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
   { "daemon", 'd', "Start ndbd as daemon (default)",
     (uchar**) &opt_daemon, (uchar**) &opt_daemon, 0,
-    GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 },
+    GET_BOOL, NO_ARG, IF_WIN(0,1), 0, 0, 0, 0, 0 },
   { "nodaemon", 256,
     "Do not start ndbd as daemon, provided for testing purposes",
     (uchar**) &opt_no_daemon, (uchar**) &opt_no_daemon, 0,
-    GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
+    GET_BOOL, NO_ARG, IF_WIN(1,0), 0, 0, 0, 0, 0 },
   { "foreground", 256,
     "Run real ndbd in foreground, provided for debugging purposes"
     " (implies --nodaemon)",
[31 Aug 2009 8:28] Magnus Blåudd
Ok to push in to 7.0
[31 Aug 2009 11:18] jack andrews
the windows user doesn't need to worry about the --daemon/--nodaemon command line switches so maybe document these features as unix only.  and the main change is that ndbd and ndb_mgmd now behaves like mysqld -- it runs in the foreground by default.
[1 Sep 2009 14:12] Jon Stephens
Documented bugfix in the NDB-7.0.8 changelog as follows:

        Previously, the MySQL Cluster management node and data node 
        programs, when run on Windows platforms, required the --nodaemon 
        option in order to produce console output. Now, these programs 
        run in the foreground by default when invoked from the command 
        line  on Windows, which is the same behavior that mysqld.exe 
        displays on Windows.
[9 Sep 2009 5:34] jack andrews
forgot to fix ndb_mgmd behaviour.
notice this is double maintenance.
in my patch for my_daemon, these
common opts were put in one file.
[9 Sep 2009 5:40] 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/82760

2977 jack andrews	2009-09-09
      Bug #45588 ndb_mgmd outputs to logs but not to console without --nodaemon
        . previous fix only fixed ndbd, this fix does ndb_mgmd
[11 Sep 2009 13:49] Jon Stephens
Already documented, error in original fix caught before release, so nothing new to document. Closed without further action.