config: verify replicaset to contain an instance
It is very easy to misplace a config option to a different level, for example create an empty replicaset `sharding` with storage role, instead of configuring sharding option to `storage`: ``` groups: g-001: replicasets: sharding: roles: - storage r-001: instances: i-001: {} ``` This patch adds validation that forbids creating an empty group or replicaset. Note that a group or a replicaset could still be defined in multiple config sources and may appear empty in one of them, the check is performed on the merged cluster config. Closes #9895 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-9895-forbid-empty-group-or-replicaset.md 5 additions, 0 deletions...gs/unreleased/gh-9895-forbid-empty-group-or-replicaset.md
- src/box/lua/config/configdata.lua 20 additions, 0 deletionssrc/box/lua/config/configdata.lua
- test/config-luatest/cluster_config_test.lua 30 additions, 0 deletionstest/config-luatest/cluster_config_test.lua
Please register or sign in to comment