You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

User:Razzi/Notes on clouddb views

From Wikitech-static
Jump to navigation Jump to search

clouddb1013

DB section s1 (alias: mysql.s1) DB section s3 (alias: mysql.s3)

so for s3, the other hosts are:

puppet $ grep s3 hieradata/hosts/clouddb10*.yaml hieradata/hosts/clouddb1013.yaml: s3: 100G hieradata/hosts/clouddb1017.yaml: s3: 100G hieradata/hosts/clouddb1021.yaml: s3: 40G

but is there something different about 1021?

node /^clouddb10(13|14|15|16)\.eqiad\.wmnet$/ {
   role(wmcs::db::wikireplicas::web_multiinstance)
}
node /^clouddb10(17|18|19|20)\.eqiad\.wmnet$/ {
   role(wmcs::db::wikireplicas::analytics_multiinstance)
}
node 'clouddb1021.eqiad.wmnet' {
   role(wmcs::db::wikireplicas::dedicated::analytics_multiinstance)
}

In the aliases I see:

db-wikireplica: P{O:wmcs::db::wikireplicas::web_multiinstance or O:wmcs::db::wikireplicas::analytics_multiinstance or O:wmcs::db::wikireplicas::dedicated::analytics_multiinstance}

So they all work together. But I think I'll ignore 1021 for now.

So I need 1017 to be applied for

OK FORGET ALL THAT

1014 has s2 and s7

puppet $ cat hieradata/hosts/clouddb1014.yaml

  1. clouddb1014

profile::wmcs::db::wikireplicas::mariadb_multiinstance::instances:

 s2: 95G
 s7: 185G

Links

https://wikitech.wikimedia.org/wiki/Portal:Data_Services/Admin/Wiki_Replicas#Physical_database_server_layer

Useful commands

sudo maintain-views --table localuser --databases centralauth --dry-run --debug
MariaDB [centralauth_p]> show create table localuser \G

output

Changes that could be taken outside of puppet

puppet $ sshrc dbproxy1018.eqiad.wmnet 'sudo puppet agent -t'
welcome
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for dbproxy1018.eqiad.wmnet
Info: Applying configuration version '(3a316eda0e) Razzi - Revert "clouddb: depool clouddb1018 to update views"'
Notice: /Stage[main]/Profile::Mariadb::Proxy::Multiinstance_replicas/File[/etc/haproxy/conf.d/multi-db-replicas.cfg]/content:
--- /etc/haproxy/conf.d/multi-db-replicas.cfg   2022-01-06 00:13:46.797350853 +0000
+++ /tmp/puppet-file20220106-4650-1xelh3c       2022-01-06 18:54:08.925579607 +0000
@@ -80,7 +80,8 @@
     log /dev/log local0 crit
     option tcpka
     option mysql-check user haproxy
-    server clouddb1014.eqiad.wmnet 10.64.0.29:3317 weight 1 check inter 3s fall 20 rise 99999999
+    server clouddb1018.eqiad.wmnet 10.64.32.62:3317 weight 1 check inter 3s fall 20 rise 99999999
+    server clouddb1014.eqiad.wmnet 10.64.0.29:3317 check backup

 listen mariadb-s8
     bind 0.0.0.0:3318

Info: Computing checksum on file /etc/haproxy/conf.d/multi-db-replicas.cfg
Info: /Stage[main]/Profile::Mariadb::Proxy::Multiinstance_replicas/File[/etc/haproxy/conf.d/multi-db-replicas.cfg]: Filebucketed /etc/haproxy/conf.d/multi-db-replicas.cfg to puppet with sum 4bc361639cf72b0c8751361e4bf2f66c
Notice: /Stage[main]/Profile::Mariadb::Proxy::Multiinstance_replicas/File[/etc/haproxy/conf.d/multi-db-replicas.cfg]/content: content changed '{md5}4bc361639cf72b0c8751361e4bf2f66c' to '{md5}73caeeb2f66db15cc413a9382a56536f'