Add dbreplica CNAME
Related T1234
Test Plan
$ bin/octocatalog-diff ... pergamon
Found host pergamon.softwareheritage.org
*** Running octocatalog-diff on host pergamon.softwareheritage.org
diff origin/production/pergamon.softwareheritage.org current/pergamon.softwareheritage.org
*******************************************
File[/etc/bind/keys/local-update] =>
parameters =>
content =>
[36m@@ -2,4 +2,4 @@[0m
key local-update {
algorithm hmac-sha256;
[31m- secret "redacted";[0m
[32m+ secret "redacted";[0m
};
*******************************************
File[/etc/bind/rndc.key] =>
parameters =>
content =>
[36m@@ -2,4 +2,4 @@[0m
key rndc-key {
algorithm hmac-md5;
[31m- secret "redacted";[0m
[32m+ secret "redacted";[0m
};
*******************************************
[0;32;49m+ Resource_record[dbreplica/CNAME] =>[0m
[0;32;49m parameters =>[0m
[0;32;49m[0;32;49m "data": "somerset.internal.softwareheritage.org"[0m[0m
[0;32;49m[0;32;49m "keyfile": "/etc/bind/keys/local-update"[0m[0m
[0;32;49m[0;32;49m "record": "dbreplica.internal.softwareheritage.org"[0m[0m
[0;32;49m[0;32;49m "type": "CNAME"[0m[0m
*******************************************
*** End octocatalog-diff on pergamon.softwareheritage.org
Migrated from D1516 (view on Phabricator)
Merge request reports
Activity
I'm not convinced this is such a good idea; this machine is way more than a "db replica" server (it only has one replica, most its databases are actually primary) and I don't think DNS provides the appropriate granularity level to record this information.
I think configuring pgbouncer to have transparent access to read-only/read-write databases would be more appropriate and flexible than doing dns hacks.
! In !181 (closed), @olasd wrote: I'm not convinced this is such a good idea; this machine is way more than a "db replica" server (it only has one replica, most its databases are actually primary) and I don't think DNS provides the appropriate granularity level to record this information.
Right, the machine does multiple things, but CNAMEs are not mutually exclusive.
I think configuring pgbouncer to have transparent access to read-only/read-write databases would be more appropriate and flexible than doing dns hacks.
Can we have both?
See T1234's amended description