Commit Graph

8 Commits

Author SHA1 Message Date
David Ames b2ed9aa73c Enable MySQL TLS
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
2020-06-30 15:24:52 -07:00
David Ames c31027400a Specify the port for Shared DB connections
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
2020-05-04 15:42:15 -07:00
David Ames 7c50d9e1dc Pass wait timeout all the way through to clients
Pass the non-interactive wait timeout value through.

Change-Id: I25c2e982ebabe09385e52fef0fb8c97cabe60756
Closes-Bug: #1841063
2020-04-17 07:38:48 -07:00
Liam Young 1099a6b3ec Ensure unit acl before raising 'available' state
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
2020-02-03 10:54:44 +00:00
Liam Young 6c1b8d4192 Remove DB available states if maintenance mode
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
2020-01-30 19:40:21 +00:00
David Ames efa7cb3d5a Check if any HA units remain on departed
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
2018-11-16 14:04:55 -08:00
James Page 7b9fc4e9aa Automatically set hostname relation data
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
2017-01-25 10:47:19 +00:00
Corey Bryant 79c265c408 Initial commit 2015-11-30 15:33:53 +00:00