Bug #52268 Location of cluster logs it not retained in cached binary configuration
Submitted: 22 Mar 2010 9:05 Modified: 12 May 2010 10:02
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: John David Duncan CPU Architecture:Any
Tags: mysql-5.1.41-ndb-7.0.11

[22 Mar 2010 9:05] Geert Vanderkelen
Description:
Cluster logging fails when the LogDestination option is used with a relative path and we restart the mgm node without using the --initial or --reload options.

How to repeat:
Setup the Management node like this:

[ndb_mgmd default]
datadir = /opt/mysql/clusters/machA/logs
LogDestination=FILE:filename=ndb_1_cluster.log,maxsize=10000,maxfiles=5

Start ndb_mgmd with --initial; configuration cache is created.

Stop ndb_mgmd and restart without --initial or --reload. This read the information from the cached configuration.

Nothing goes anymore to /opt/mysql/clusters/machA/logs/ndb_1_cluster.log
No error is given either.

Suggested fix:
Take the DataDir option and when caching the LogDestination information, make the 'filename' an absolute path? Or when reading the cached information.
[22 Mar 2010 9:07] Geert Vanderkelen
Workaround is to give the full-path or absolute path to the log file in LogDestination.

Verified using 7.0.11 on MacOSX, reported by user using Linux.
[30 Apr 2010 1:44] 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/107022

3514 John David Duncan	2010-04-29
      Possible fix for bug#52268
[10 May 2010 21:35] 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/107899

3514 John David Duncan	2010-05-10
      bug#52268: ndb_mgmd could fail to set its working directory before creating 
      a cluster log, when starting up from a cached configuration; this would 
      cause the cluster log file to be placed in the wrong directory.
[11 May 2010 9:48] Jonas Oreland
given that this is approved, can you please push it ?
[11 May 2010 22:12] 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/108050

3531 John David Duncan	2010-05-11 [merge]
      Merge (local fix for bug#52268)
[11 May 2010 22:15] Bugs System
Pushed into 5.1.44-ndb-7.0.15 (revid:jdd@mysql.com-20100511221056-e4ai82rf7sqird5f) (version source revid:jdd@mysql.com-20100511221056-e4ai82rf7sqird5f) (merge vers: 5.1.44-ndb-7.0.15) (pib:16)
[12 May 2010 10:02] Jon Stephens
Documented in the NDB-7.0.15 and 7.1.4 changelogs as follows:

      When the LogDestination parameter was set using a relative 
      path, the management server failed to store its value unless 
      started with --initial or --reload.

Closed.