As originally reported on https://bugs.launchpad.net/juju/2.2/+bug/1701275
See especially:
https://bugs.launchpad.net/juju/2.2/+bug/1701275/comments/6
https://bugs.launchpad.net/juju/2.2/+bug/1701275/comments/21
https://bugs.launchpad.net/juju/2.2/+bug/1701275/comments/24
https://bugs.launchpad.net/juju/2.2/+bug/1701275/comments/29
https://bugs.launchpad.net/juju/2.2/+bug/1701275/comments/30
One possibility that I may have encountered is that we traditionally try to use the machine id as the mongo replica-set id. Something seems to have changed where 'machine-0' no longer gets id=0, and instead gets id=1.
Which then means if your next machine to be added to the replica set is 'machine-1', then it, too, wants 'id=1', and you get a collision.
That would seem to match what I saw locally, and what was reported with
https://bugs.launchpad.net/juju/2.2/+bug/1701275/comments/30
I wonder if it is a case of Mongo 3.2.X starting with id=0, and now Mongo 3.2.Y is forcing our first entry to be id=1 somehow.
rs.conf shared on bug 1704075