One of the ways that I was able to reproduce this, is by getting Juju into a state where it wants to change the replicaset to exclude whoever the current primary of Mongo is.
The specific steps I used was:
$ juju bootstrap lxd
$ juju switch controller
$ juju ssh 0
# connect to Mongo, inject bad data into the db.presence.pings table so that the presence data is
# forced to say that machine 0 is dead
# I did that with:
$$ agent=$(cd /var/lib/juju/agents; echo machine-*)
$$ pw=$(sudo grep statepassword /var/lib/juju/agents/${agent}/agent.conf | cut '-d ' -sf2)
$$ /usr/lib/juju/mongo3.2/bin/mongo --ssl -u ${agent} -p $pw --authenticationDatabase admin --sslAllowInvalidHostnames --sslAllowInvalidCertificates localhost:37017/juju
One of the ways that I was able to reproduce this, is by getting Juju into a state where it wants to change the replicaset to exclude whoever the current primary of Mongo is.
The specific steps I used was: juju/agents; echo machine-*) juju/agents/ ${agent} /agent. conf | cut '-d ' -sf2) juju/mongo3. 2/bin/mongo --ssl -u ${agent} -p $pw --authenticatio nDatabase admin --sslAllowInval idHostnames --sslAllowInval idCertificates localhost: 37017/juju
$ juju bootstrap lxd
$ juju switch controller
$ juju ssh 0
# connect to Mongo, inject bad data into the db.presence.pings table so that the presence data is
# forced to say that machine 0 is dead
# I did that with:
$$ agent=$(cd /var/lib/
$$ pw=$(sudo grep statepassword /var/lib/
$$ /usr/lib/