You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WL#12209 SUPPORT ATRT CLUSTER CONFIG VIA .INI FILE
Add option to [atrt] group configuration to enable cluster configuration
to read from config.ini files.
When configuring this option, *.cnf options are read by atrt (to know
which procsses to start), config.ini files existence is checked, and
cluster is started with a config.ini instead of my.cnf.
Note that ndb_mgmd, ndb_api, mysqld, and client can still read settings
from my.cnf.
To choose from cnf or ini files a new [atrt] group setting 'config_type'
was introduced. Possible values are: 'cnf' (default) or 'ini'.
When 'ini' is used, atrt checks that config files for all defined
clusters exist. Config files must have both configuration name and
cluster name as file name, and .ini extension.
Example, for someconf.cnf having:
[atrt]
config_type = ini
clusters = .2node
atrt will check for someconf.2node.ini file in the same path as
someconf.cnf (i.e. $MYSQL_DIR/mysql-test/ndb) and generate appropriate
command-line arguments to start cluster processes using file
config.2node.ini.
When using config.ini files, atrt will not automatically append
settings for ndb, mysqld, or client processes as it does when using
my.cnf files.
Settings generation for my.cnf is as simple as appending them to the end
of the file. For config.ini files, however, we need to parse the file,
detect beginning and ending for each configuration group, handle
duplicate settings, and only then add settings.
To make matters worse, mysqld, clients, custom processes all read
my.cnf. Generating my.cnf configurations could also make config.ini
settings to be inconsistent.
Because of all that, when using config.ini files both .cnf and .ini
files must include all settings:
* define ports for all processes (overriding atrt's baseport command
line argument). This applies to [cluster_config.ndb_mgmd.NSUFFIX] and
[mysqldSUFFIX] and [clientSUFFIX] configuration options.
* define mysqld datadir (can be specified using CHOOSE_dir placeholder)
* define ndb-connectstring under [mysql_cluster] configuration group
* define any other [mysqld] and [client] settings whenever appropriate
(applies to .atrt cluster as well).
* define [ndb] FileSystemPath setting.
* enable [atrt] configuration group's full qualified path names
An minimal configuration example someconf.cnf is:
[atrt]
basedir = CHOOSE_dir # base path replaced by autotest-run.sh
clusters = .2node # cluster name suffix
fqpn = 1 # use full qualified path names
config_type = ini # configure cluster using .ini file
mysqld = CHOOSE_host1 # configure atrt database under .atrt cluster
mt = 2 # Use ndbmt (0 = never, 1 = round-robin, 2 = only)
fix-nodeid = 0 # management server decides NodeId order
[cluster_config.2node]
ndb_mgmd=CHOOSE_host1
ndbd=CHOOSE_host1,CHOOSE_host1
mysqld=CHOOSE_host1
ndbapi=CHOOSE_host1,CHOOSE_host1,CHOOSE_host1
[cluster_config.ndb_mgmd.1.2node]
PortNumber=14000
[cluster_config.ndb_mgmd.2.2node]
PortNumber=14001
[mysqld.1.2node]
port=14002
datadir=CHOOSE_dir/cluster.2node/mysqld.1/data
[client.1.2node]
host=CHOOSE_host1 # must match what was defined in [cluster_config]
port=14002 # must match what was defined in [mysqld.1.2node]
Then, someconf.2node.ini must contain:
[ndb default]
NoOfReplicas=2
DataMemory=512M
BackupMemory=64M
[ndb_mgmd]
NodeId=1 # atrt starts defining id numbers from ndb_mgmd
HostName=CHOOSE_host1 # must match definition in cluster_config
PortNumber=14000 # must match definition in cluster_config.ndb_mgmd.1
[ndb_mgmd]
NodeId=2
HostName=CHOOSE_host1
PortNumber=14001
[ndbd]
NodeId=3 # Sequential number after all ndb_mgmd ids
HostName=CHOOSE_host1 # must match definiton in cluster_config
FileSystemPath=CHOOSE_dir/cluster.2node/ndbd.1
[ndbd]
NodeId=4
HostName=CHOOSE_host1
FileSystemPath=CHOOSE_dir/cluster.2node/ndbd.2
0 commit comments