Skip to content

[BB-856] Use locks when updating Consul.

Uman Shahzad requested to merge uman/bb-856 into master

Test instructions:

  1. Go to https://stage.console.opencraft.com/instance/3360/edx-appserver/1064/
  2. SSH into haproxy-stage-1.net.opencraft.hosting and haproxy-stage-2.net.opencraft.hosting
  3. On one server run consul watch -type=keyprefix -prefix=lock/ consul kv get -recurse -detailed lock/
  4. On the other server run consul watch -type=keyprefix -prefix=ocim/instances/362/ consul kv get -recurse ocim/instances/362
  5. Deactivate one server, activate another
  6. After some time passes, check the spam from the watches - the lock is being worked on by both Ocim and consul-template across the HAProxy servers.
  7. After it's settled down, check consul kv export lock/ and notice no lock is taken anymore by anyone.

Merge request reports