Bug #47701 ndb_mgmd miusmatch between --configdir and DataDir
Submitted: 29 Sep 9:43
Reporter: Magnus Blaudd
Status: Verified
Category:Server: Cluster Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Magnus Blaudd Target Version:
Tags: 7.0
Triage: Triaged: D4 (Minor) / R6 (Needs Assessment) / E6 (Needs Assessment)

[29 Sep 9:43] Magnus Blaudd
Description:
Mismatch between --configdir=. and DataDir, looks like the ndb_mgmd put the config.bin in
DataDir since that is current working directory.

How to repeat:
$ pwd
/home/msvensson/run

config.ini has one ndb_mgmd with DataDir=/home/msvensson/run/mgmd.1

$ ~/mysql/7.0-bug45497/storage/ndb/src/mgmsrv/ndb_mgmd --config-dir=. --ndb-nodeid=2 -f
config.ini --nodaemon --verbose

^This works fine the first time, but fails like below  next time

$ ~/mysql/7.0-bug45497/storage/ndb/src/mgmsrv/ndb_mgmd --config-dir=. --ndb-nodeid=2 -f
config.ini --nodaemon --verbose
2009-09-29 09:42:18 [MgmtSrvr] ERROR    -- The file './ndb_2_config.bin.1' already exist
while preparing
2009-09-29 09:42:18 [MgmtSrvr] ERROR    -- Configuration change failed! error: 6 'Prepare
of config change failed'

Suggested fix:
Convert the . to a realpath