Enable passing the certificate authority on the relation in order to
enable TLS communication to the MySQL DB.
In order to enable MySQL to use TLS for client connections all that
is required is the CA certificate. A certificate and key may be used
for client certificate authentication. However, since almost all
deployments will not use certificate authentication, focusing on the CA as SSL
data complete makes sense.
Change-Id: I785afe7f64cb57caa857178d529e3cabdcf63517
Prior to this change there was no way to specify a port for mysql
connections. Add this to the Shared DB connection information.
Change-Id: Iafcc106fca44479e89b4b66a0a3988ffeee01f04
Closes-Bug: #1876188
Check the allowed_units list past back by the db before raising the
'available' state to ensure charms do not try to connect to the db
before they are allowed.
Change-Id: I17228ba5d82249f0a5baffab1c2d200963b55b10
Closes-Bug: #1861665
If the DB is in maintance mode then remove the 'availble' states
to let the charms now the db cannot be accessed.
Depends-On: I5d8ed7d3935db5568c50f8d585e37a4d0cc6914f
Change-Id: If31eaad0b781d4250524335377152f3bd140f57b
If there are still HA units in the relation when a single unit departs
re-evaluate state. If it is the last unit, unset all relation states.
Handle the case juju remove-relation and juju add-relation.
Change-Id: I92909d6203fc00d45d7d6edf0a981f9d759add53
Partial-Bug: #1800730
Instead of relying on the user of the interface to set the correct
hostname parameter when configuring database access request,
automatically determine the correct hostname using:
1) In Juju >= 2.0, using the network space binding of the
named relation.
2) In Juju < 2.0, using the units private-address.
The hostname relation value can be overridden using the hostname
parameter of the configure method.
Change-Id: Id69a3786d2ac754aa8659b8cde977c4d86a37fc8