commit 5a2da1800272af2875064a295b8ba7044cf7bcea
Author: Billy Olsen <email address hidden>
Date: Fri Mar 18 15:11:42 2022 -0700
Configure mysqlrouter.conf sections based on wildcards
Upon bootstrap, the mysqlrouter will create a mysqlrouter.conf file for
the cluster it is connecting to. This creates sections such as
metadata_cache:<cluster_name>, routing:<cluster_name>_rw,
routing:<cluster_name>_ro, etc. The cluster name is not provided on the
mysql-router interface so this information is not available in
determining the correct section name. Since the mysql-router is designed
to work with a single cluster, the need to update the interface which in
turn requires the user to update a number of deployed charms in the
environment, an approach is taken to allow regular expressions to be
used when matching the section name.
There is some risk to this in that it requires that future edits
carefully consider the possible section names when future sections are
added. However, this developer cost is traded off in order to ease the
burden of operators.
For the upgrade scenario, this patch also checks to see if the file
rendered on disk contains multiple 'metadata_cache' sections, and if so
rewrites the mysqlrouter.conf file with the hardcoded
metadata_cache:jujuCluster section removed.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- mysql-router/ +/834359 /opendev. org/openstack/ charm-mysql- router/ commit/ 5a2da1800272af2 875064a295b8ba7 044cf7bcea
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 5a2da1800272af2 875064a295b8ba7 044cf7bcea
Author: Billy Olsen <email address hidden>
Date: Fri Mar 18 15:11:42 2022 -0700
Configure mysqlrouter.conf sections based on wildcards
Upon bootstrap, the mysqlrouter will create a mysqlrouter.conf file for cache:< cluster_ name>, routing: <cluster_ name>_rw, <cluster_ name>_ro, etc. The cluster name is not provided on the
the cluster it is connecting to. This creates sections such as
metadata_
routing:
mysql-router interface so this information is not available in
determining the correct section name. Since the mysql-router is designed
to work with a single cluster, the need to update the interface which in
turn requires the user to update a number of deployed charms in the
environment, an approach is taken to allow regular expressions to be
used when matching the section name.
There is some risk to this in that it requires that future edits
carefully consider the possible section names when future sections are
added. However, this developer cost is traded off in order to ease the
burden of operators.
For the upgrade scenario, this patch also checks to see if the file cache:jujuClust er section removed.
rendered on disk contains multiple 'metadata_cache' sections, and if so
rewrites the mysqlrouter.conf file with the hardcoded
metadata_
Closes-Bug: #1927981 6429fbafb041e6f c11887dbfb9
Change-Id: Iad44744ad01c0b