New description:
Old description:
For some Data Engineering workflows, we depend on knowing which datacenter is active and producing event data so that our pipelines can ingest it. Right now, we modify the pipelines manually, and we invariably forget till the SLA alarms remind us.
It would be nice to have an API to know what datacenter is active. Nothing fancy, just an HTTP GET that would tell me whether its eqiad or the like.
While reviewing the new Datacenter Switchover Policy, I suggested such an API and @akosiaris quickly pointed me to an existing endpoint at https://config-master.wikimedia.org/mediawiki.yaml that spits out:
# the master datacenter for mediawiki primary_dc: eqiad # read-only settings read_only: codfw: false eqiad: false
What we want is the primary_dc.
In this task we should:
- Investigate the stability of this API.
- If deemed stable, then modify our codebase so that we don't have to manually do these changes.
- Make sure we can override if necessary.