Comment 4 for bug 1760390

I did a bootstrap on bionic with the updated hacked branch mentioned in the
previous comment.
As expected 'juju enable-ha' failed with the mongo peers not being
healthy. (since all replicas were only binding to localhost, none of them
could talk to each other.)

While they were running, I used "lxc exec ... bash" to get into each
machine, and then edited:
/var/lib/juju/init/juju-db/juju-db.service
to set it to:
ExecStart=/usr/bin/mongod --dbpath '/var/lib/juju/db' --sslPEMKeyFile
'/var/lib/juju/server.pem' --sslPEMKeyPassword=ignored --port 37017
--syslog --journal --replSet juju --quiet --oplogSize 512 --ipv6 --auth
--keyFile '/var/lib/juju/shared-secret' --sslMode requireSSL
--storageEngine wiredTiger --wiredTigerCacheSizeGB 1 --bind_ip_all

(I just appended --bind_ip_all)

I then ran
systemctl daemon-reload
systemctl restart juju-db

After doing that on all 3 units, the replicaset became happy, and juju
status
Machine State DNS Inst id Series AZ Message
0 started 10.16.17.198 juju-160f73-0 bionic Running
1 started 10.16.17.138 juju-160f73-1 bionic Running
2 started 10.16.17.238 juju-160f73-2 bionic Running

juju show-controller
...
  controller-machines:
    "0":
      instance-id: juju-160f73-0
      ha-status: ha-enabled
    "1":
      instance-id: juju-160f73-1
      ha-status: ha-enabled
    "2":
      instance-id: juju-160f73-2
      ha-status: ha-enabled

So everything seems to be happy.
John
=:->

On Mon, Apr 2, 2018 at 5:32 PM, John A Meinel <email address hidden>
wrote:

> Note that those associated patches get the unit tests to run with Mongo
> 3.6 (if you have it locally), but does not provide everything needed to
> support 3.6 for "juju bootstrap". (We know we at least need to be
> passing --bind_ip_all to mongod startup when in HA mode.)
>
> We are currently waiting for a 3.6 to be available in some sort of PPA
> or the Bionic archive to finish testing bootstrap.
>
> See also bugs that were about upgrading to mongo 3.4 like:
> https://bugs.launchpad.net/juju/+bug/1672967
> https://bugs.launchpad.net/bugs/1756432
>
> And
> https://github.com/jameinel/juju/tree/2.3-bionic-mongodb-server-core
>
> which is a spike to have Juju 2.3 support installing 'mongodb-server-
> core' on Bionic. Which might evolve to be Mongo 3.6 at which point we'll
> need to change the command line parameters we are passing.
>
> There may be other issues supporting 3.6 but at least the test suite
> passes.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1760390
>
> Title:
> support mongo 3.6
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1760390/+subscriptions
>