Issues with the current mariadb code:
- There's a lot of duplication. E.g `mariadb::core::multinstance` has a bunch of duplication with `mariadb::core`.
- It's very hard to follow the structure. These are the notes i wrote when trying to get my head around it: P11725
- Inconsistent use of roles vs profiles (some roles like `mariadb::core` do everything in the role itself, others have very slim roles that defer the real work to profiles).
- Inconsistent use of heira vs site.pp parameters. E.g. the mysql_role for core dbs is in hiera, but for `role::mariadb::misc` it's in site.pp. Same goes for shard/section.
- Because of the confusing structure and the amount of duplication it's very hard to
- see what's different between different profiles
- make sure that any change touches all of the relevant profiles
- see what the effect of any change is
- A lot of the code doesn't follow the modern WMF puppet style. E.g. - `profile::mariadb::monitor::prometheus` uses `role::prometheus::mysqld_exporter`.
- Inconsistent use of "shard" vs "section"
- Multiinstance profiles are very repetitive, with a repeated block per possible section.