Page MenuHomePhabricator
Paste P5138

(An Untitled Masterwork)
ActivePublic

Authored by jcrespo on Mar 27 2017, 2:41 PM.
Tags
None
Referenced Files
F7037981:
Mar 27 2017, 2:41 PM
Subscribers
None
# this is a constant for now
tendril_db_host=db1011.eqiad.wmnet
# for each shard, new master and shard name
new_shard_master_fqdn=db1052.eqiad.wmnet
shard=s1
# actual command to run, needs to have rights (saltmaster)
mysql -h $tendril_db_host tendril -e "UPDATE shards SET master_id = (SELECT id FROM servers WHERE host = '$new_shard_master_fqdn') WHERE name = '$shard'"