Page MenuHomePhabricator

Support aliases in cumin
Closed, ResolvedPublic

Description

Debdeploy uses server groups, which assign a descriptive name to a group of servers (which cover both groups of servers assigned via roles and specific hosts (e.g. for canaries). That's currently handled via Salt grains. With cumin we can simply specify the canaries by FQDN, the role are available via puppetdb.

It would be nice if Cumin would gain the option to assign a descriptive name to Cumin query, e.g. with a config file which assigns those, some kind of aliases.

Cumin will have to look for ${backend_name}.aliases files in the configuration directory and load the aliases defined there like (aliases are specific to a backend to reduce complexity):

cp-ulsfo:  R:class = role::cache::text or R:class = role::cache::upload or R:class = role::cache::misc and R:class%site = ulsfo
cp-canaries: cp4001.ulsfo.wmnet
dc-codfw:  R:class = profile::cumin::target and R:class%site = codfw

These aliases could then be assigned with something like A:cp-canaries

Event Timeline

Volans triaged this task as Medium priority.

Change 363746 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/cumin@master] Move configuration loader from cli to main module

https://gerrit.wikimedia.org/r/363746

Change 363747 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/cumin@master] Configuration: automatically load backend's aliases

https://gerrit.wikimedia.org/r/363747

Change 363748 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/cumin@master] Query and grammar: add support for aliases

https://gerrit.wikimedia.org/r/363748

Change 363746 merged by jenkins-bot:
[operations/software/cumin@master] Move configuration loader from cli to main module

https://gerrit.wikimedia.org/r/363746

Change 363747 merged by jenkins-bot:
[operations/software/cumin@master] Configuration: automatically load backend's aliases

https://gerrit.wikimedia.org/r/363747

Change 363748 merged by jenkins-bot:
[operations/software/cumin@master] Query and grammar: add support for aliases

https://gerrit.wikimedia.org/r/363748

Volans moved this task from In Code Review to Done on the SRE-tools board.
Volans removed a project: Patch-For-Review.