Acceptance test for this is system-tests' test_replication, but unfortunately this is somewhat random.
What can happen is:
a node starts trying to follow the master
the master dies before the follow process is completed
that node is then elected the new master
a retry of the previous follow runs at the same time or after the promote, breaking that node's nginx config
Relevant log (from "that node") - attached as "cloudify-cluster.log"