Comment 12 for bug 1813953

Revision history for this message
Joseph Phillips (manadart) wrote :

I think I understand what is happening here.

Juju should not be selecting a machine-local address for peer group usage, as you correctly state. But we should not be falling through to that choice at all, because the machines have addresses in subnets that are on the "oam" space.

I believe the reason they are not chosen by space is due to a bug that we fixed in this patch:
https://github.com/juju/juju/pull/8283

That bug was to do with sourcing machine addresses directly from the machine, instead of through the provider (MAAS) which is space aware; thus the addresses are not decorated with the information required to select them by space.

This could be confirmed by looking directly at the documents for these machines in the MongoDB "machines" collection. If the members of "addresses" don't have a "spacename", then it is definitely the issue.

The best option is to move forward to the latest Juju 2.4 version. This has fixes particular to this area, namely:

- The space for Mongo peer group communication can be user set (juju-mongo-space) and is in fact mandatory if more than one address on the machine is usable for such a purpose.
- There is no longer a fall-back to to choosing a scoped (machine-local) address if a Mongo space is set.
- MAAS machines get addresses via the MAAS provider, which decorates them appropriately with space information so they can be filtered properly.