The linked bug occurred due to a new header for the config file being in
the upgraded charm, but not in the previous version of the charm. As
the config file is read, updated, and then written, new headings in the
INI file would crash the charm code with a KeyError.
This patch just sets the header and parameter if it is missing.
Closes-Bug: #1927981
Change-Id: I18a6a4143ee0a1144eade5caa50611b802cba28a
Ensure that a location in /run is used for the PID file for
the mysqlrouter instance - this ensures that in the event
of a power outage, the old PID file will not be present and
the daemon will correctly startup when the machine starts up.
Update systemd configuration to create /run/mysql and to use
the mysql user and group to execute the daemon.
Switch to 'forking' mode to ensure that the mysqlrouter process
gets tracked by systemd.
Closes-Bug: 1931095
Change-Id: Id3f7605ad1e9e4a6e4b0a1abe8000abd75b5b0fd
Having the zaza test configuration charm_name = mysql-router adds
mysql-router as an application that is never actually instantiated. This
leads to zaza failures looking for a unit of that application.
Simply change the charm_name to an instantiation of mysql-router
resolves this. i.e. keystone-mysql-router which is in each bundle.
Change-Id: Ib89d11352635e077f062b3f86a4024802f59419f
Closes-Bug: #1931117
These are the test bundles (and any associated changes) for
focal-wallaby and hirsute-wallaby support.
hisute-wallaby test is disabled (moved to dev) due to [1].
[1] https://github.com/juju-solutions/layer-basic/issues/194
Change-Id: I16b04aab3ad2438b4c2ecabb697d24c7725e316b
This patchset updates all the requirements for charms.openstack,
charm-helpers, charms.ceph, zaza and zaza-openstack-tests back
to master branch.
Change-Id: Id6c48e13015db148357fe656592fb1864e36fe0b
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure stable/21.04 branch for charms.openstack
- ensure stable/21.04 branch for charm-helpers
Change-Id: Ifcfdc4d51204d8bf39eecc33c45ad312ca87deb2
If for any reason the first attempt to add an instance to cluster fails,
subsequent attempts would fail with:
Error: It appears that a router instance named <name> has been
previously configured in this host. If that instance no longer exists,
use the --force option to overwrite it.
This change avoids this error by adding the --force switch on subsequent
attempts.
Closes-Bug: #1919560
Change-Id: Icb0b10d6a5e3fe902c7ea56dbcb2f04d1129cd5f
This update adds the new hirsute Ubuntu release (21.04) and
removes trusty support (14.04 which is EOL at 21.04).
Change-Id: I65c6b94e87c094953229c26f6b24cc61c1608f0e
We were getting "Error: It appears that a router instance named '' has been
previously configured in this host. If that instance no longer exists, use the
--force option to overwrite it." when co-locating mysql-routers. Specify the
name of the mysql-router to allow co-location.
Closes-Bug: #1918726
Change-Id: I65c2730dcb5ffb240bf57c9e0b0cb1a1735a4525
* Update requirements.txt to pin charm-tools to 2.8.3
* Update tox.ini to change the build parameters.
* This upgrades from <2.7 which adds reproducible charms
* Bug was fixed that controlled the default output directory
doesn't get 'builds' appended. The tox change puts it
back so that stable & master both build to the same
directory. This may be reviewed in the future.
Change-Id: Ifd1393cc9f417bc5dc4bad6f72e925dd89ff73de
LP Bug #1914649 saw an edge case where --report-host was necessary for
mysql-router bootstrap. Adding it to cover this edge case.
Change-Id: I0ea751aa4015ad6e569d9c3e9f8364cf36801c18
Closes-Bug: #1914649
When vault certificates are being used and passed to the mysql-router
via the db-router relation use client_ssl_mode = PASSTHROUGH. This
maintains the < 8.0.23 behavior terminating TLS at the
mysql-innodb-cluster nodes.
If not using vault certificates from the db-router relation use
client_ssl_mode = PREFERRED, 8.0.23's new behavior. This TLS encrypts
with self-signed certificates. This covers TLS for the deployment
process.
If ssl_ca is unset on the db-router relation, unset it on the shared-db
relation to guarantee the requestor uses the correct communication
method.
Closes-Bug: #1914299
Change-Id: I1e66aca79df83b41072bb5df2cfb1708c8259cb4
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
Reverting to an earlier version of charm-tools to
resolve some building issues seen with latest 2.8.2
version.
Change-Id: I6b2d422b8bef71e703b3f1ff3d8200dc3dfd23a3
Disble the rest API to avoid a clash if multiple mysql router
subordinates are deployed on the same node.
Closes-Bug: #1911907
Change-Id: Id15744bcdb0cab5786d745e76e69223415a38ced
Includes updates to charmhelpers/charms.openstack for cert_utils
and unit-get for the install hook error on Juju 2.9
* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure master branch for charms.openstack
- ensure master branch for charm-helpers
Change-Id: Ib0e48fb7bb640e489c94b20b62f6084b35591b1e
If the local mysql router fails to connect (or work) with the clustered
MySQL8 instance, then the MySQLHelper.connect() call will hang
indefinitely. Unfortunately, this happens during an update-status hook,
which is not visible (due to juju status not showing update-status hooks
executing). Although this has no impact on the running cloud, it does
mean that nothing else happens on the machine (update-status, upgrades,
hooks, config-changed, etc.). This allows the connect to fail and thus
for the charm to go into error so that the local mysql router instance
can be restarted.
Note that this depends on [1] landing in charm-helpers.
[1]: https://github.com/juju/charm-helpers/pull/550
Closes-bug: #1907250
Change-Id: I030d7caa8cc41aaf89ade25e5be196fb602d466c
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard
Change-Id: I3c3b4faa4dffd39356d20dba55f41afc652d66e8
Enable passing the certificate authority on the relation in order to
enable TLS communication to the MySQL DB.
Depends-On: I785afe7f64cb57caa857178d529e3cabdcf63517
Change-Id: I26d7ec4cf9a2e99d9d1cb573ad40f6f4e53f56b5
- Adds groovy to the series in the metadata
- Classic charms: sync charm-helpers.
- Classic ceph based charms: also sync charms.ceph
- Reactive charms: trigger a rebuild
Change-Id: I18c07a75617d7b7343c1cc42a64548a8d1db6729
The connections from a client only come from inside the same machine
since the router works as a subordinate charm.
Change-Id: I636065bc02ab0fa5dde9c5a7d6a35003019982a4
Closes-Bug: #1880333
The charm provided systemd unit file currently does not set number
of file descriptors. The default value of 1024 may be too low.
Change-Id: If80c7c900bff940eb1035d54e81297fc8b5dd016