I'm trying to use the same config file for master-master replication of tarantool. Here is the tester.lua for host1 and host2.
box.cfg{
listen=3301,
custom_proc_title='tester',
memtx_memory=6442450944,
replication={'replicator:password@host1:3301','replicator:password@host2:3301'}
}
box.schema.space.create('tester',{id=512, if_not_exists=true})
box.schema.user.grant('guest', 'read,write,execute', 'universe')
s=box.space.tester
s:create_index('primary',{type='tree',parts={1,'unsigned'}})
box.schema.user.create('replicator',{password='password'})
box.schema.user.grant('replicator','execute','role','replication')
box.snapshot()
But when I run on host1
tarantoolctl start tester
and on host2
tarantoolctl start tester
I found this config file create two separated tarantool without replication function.
If I change the tester.lua of host2 as follow, it works.
box.cfg{
listen=3301,
custom_proc_title='tester',
memtx_memory=6442450944,
replication={'replicator:password@host1:3301','replicator:password@host2:3301'}
}
I'm wonder how to use the same config file?