From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org, Georgy Kirichenko <georgy@tarantool.org> Subject: [tarantool-patches] Re: [PATCH] Don't raise on box.cfg for instance_uuid and replicaset_uuid Date: Mon, 28 May 2018 16:30:27 +0300 [thread overview] Message-ID: <e52989ee-bf59-d5ac-4ab9-a2bdb9b75c81@tarantool.org> (raw) In-Reply-To: <35328a1dcd8edadbbeda7286b7e9b8024e98adc9.1527511892.git.georgy@tarantool.org> Hello. Thanks for the patch! See my 3 comments below. 1. Please, send a patch copy to ones who might review it. On 28/05/2018 15:53, Georgy Kirichenko wrote: > Handle cases if instance_uuid and replicaset_uuid are present in > box.cfg and have same values as already set. > > Fixes #3421 > --- > Branch: https://github.com/tarantool/tarantool/tree/gh-3421-box-cfg-instance-uuid > Issue: https://github.com/tarantool/tarantool/issues/3421 > src/box/lua/load_cfg.lua | 14 ++++++++++++++ > test/box/cfg.result | 15 +++++++++++++++ > test/box/cfg.test.lua | 6 ++++++ > 3 files changed, 35 insertions(+) > > diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua > index d4f2128db..142c1bd04 100644 > --- a/src/box/lua/load_cfg.lua > +++ b/src/box/lua/load_cfg.lua > @@ -183,6 +183,18 @@ local dynamic_cfg = { > force_recovery = function() end, > replication_timeout = private.cfg_set_replication_timeout, > replication_connect_quorum = private.cfg_set_replication_connect_quorum, > + instance_uuid = function() > + if box.cfg.instance_uuid ~= box.info.uuid then > + box.error(box.error.CFG, 'instance_uuid', > + 'Can\'t change instance uuid') > + end > + end, > + replicaset_uuid = function(new_value) > + if box.cfg.replicaset_uuid ~= box.info.cluster.uuid then > + box.error(box.error.CFG, 'replicaset_uuid', > + 'Can\'t change replicaset uuid') > + end > + end, 2. Please, use box.error.RELOAD_CFG like it is done for all non-dynamic options. > } > > local dynamic_cfg_skip_at_load = { > @@ -194,6 +206,8 @@ local dynamic_cfg_skip_at_load = { > wal_dir_rescan_delay = true, > custom_proc_title = true, > force_recovery = true, > + instance_uuid = true, > + replicaset_uuid = true, 3. Why?
next prev parent reply other threads:[~2018-05-28 13:30 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-28 12:53 [tarantool-patches] " Georgy Kirichenko 2018-05-28 13:30 ` Vladislav Shpilevoy [this message] 2018-05-29 16:44 ` [tarantool-patches] " Konstantin Osipov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e52989ee-bf59-d5ac-4ab9-a2bdb9b75c81@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=georgy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH] Don'\''t raise on box.cfg for instance_uuid and replicaset_uuid' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox