module runs the same lua code on all instances, but I want to run some lua code only on router, some only on storage. So, i have to write something like this
local function is_storage_master()
if box.info.ro then
return false
end
local roles = cartridge_api_topology.get_enabled_roles_without_deps()
for _, rname in pairs(roles) do
if rname == 'crud-storage' then
return true
end
end
return false
end
please add in utils something like this utils.check_roles_enabled({'crud-storage', 'my_super_role'})
module runs the same lua code on all instances, but I want to run some lua code only on router, some only on storage. So, i have to write something like this
please add in utils something like this
utils.check_roles_enabled({'crud-storage', 'my_super_role'})