Aug 5 07:40:47 tesla mongod.37017[4419]: Tue Aug 5 07:40:47.799 [conn1] replSet replSetInitiate exception: can't find self in the replset config my port: 37017
I suspect that relSetInitiate failed, will never finish and therefore Juju fails to get the repl set config.
Comparing the logs between the one that failed (http:// paste.ubuntu. com/7958976/) and the one that succeeded (http:// paste.ubuntu. com/7959898/). We can see this line which looks rather suspicious:
Aug 5 07:40:47 tesla mongod.37017[4419]: Tue Aug 5 07:40:47.799 [conn1] replSet replSetInitiate exception: can't find self in the replset config my port: 37017
I suspect that relSetInitiate failed, will never finish and therefore Juju fails to get the repl set config.