Bug #47479 Confusing error message for Id: value between 0 and 1, but 0 not allowed
Submitted: 21 Sep 2009 10:59 Modified: 22 Sep 2009 8:30
Reporter: Jørgen Austvik Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: CPU Architecture:Any

[21 Sep 2009 10:59] Jørgen Austvik
Description:
config.ini:

----------8<------------------8<------------------8<--------
[ndb_mgmd]
Id=0
[ndbd]
Id=1
----------8<------------------8<------------------8<--------

Start ndb_mgmd:
----------8<------------------8<------------------8<--------
ndb_mgmd --initial -f config.ini:
2009-09-21 12:53:46 [MgmSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.37 ndb-7.0.8
2009-09-21 12:53:47 [MgmSrvr] INFO     -- Reading cluster configuration from 'config.ini'
2009-09-21 12:53:47 [MgmSrvr] ERROR    -- at line 49: Illegal value 0 for parameter Id.
Legal values are between 0 and 1
2009-09-21 12:53:47 [MgmSrvr] ERROR    -- at line 49: Could not parse name-value pair in config file.
----------8<------------------8<------------------8<--------

Id is integer. If legal values != 0, then "between" means "not including end points", and therefore 1 should not be legal either?

Maybe "Id must be a positive integer above 0. 1 is the maximum value." or something like that would be more correct.

How to repeat:
see description

Suggested fix:
Fix error message
[21 Sep 2009 11:14] Peter Laursen
"Id must be a positive integer above 0. 1 is the maximum value." 
and
"Id can be 1 only" 
.. is the same for me. :-)
[21 Sep 2009 11:24] Jørgen Austvik
He, he, yes - but I think the maximum allowed value can change based on some other config value (NoOfReplicas? the number of ndb_mgmd blocks?)
[22 Sep 2009 7:32] Sveta Smirnova
Thank you for the report.

Which version do you use?

With mysql-5.1-telco-7.0 from bzr I get "Illegal value 0 for parameter Id.
Legal values are between 1 and 255":

$$BASEDIR/libexec/ndb_mgmd -f etc/ndb_mgmd.cfg
2009-09-22 09:31:56 [MgmSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.37 ndb-7.0.8
2009-09-22 09:31:56 [MgmSrvr] INFO     -- Reading cluster configuration from 'etc/ndb_mgmd.cfg'
2009-09-22 09:31:56 [MgmSrvr] ERROR    -- at line 8: Illegal value 0 for parameter Id.
Legal values are between 1 and 255
2009-09-22 09:31:56 [MgmSrvr] ERROR    -- at line 8: Could not parse name-value pair in config file.
2009-09-22 09:31:56 [MgmSrvr] ERROR    -- Could not load configuration from 'etc/ndb_mgmd.cfg'
2009-09-22 09:31:56 [MgmSrvr] ERROR    -- Could not determine which nodeid to use for this node. Specify it with --ndb-nodeid=<nodeid> on command line
[22 Sep 2009 7:40] Jørgen Austvik
branch nick: mysql-5.1-telco-7.0
revno: 3015 [merge]
[22 Sep 2009 8:30] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with revision 3026. Please upgrade.