charm no longer works with latest mysql-router version

Bug #1971565 reported by Edward Hope-Morley
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
MySQL Router Charm
Fix Released
Undecided
Felipe Reyes
mysql-8.0 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It appears the the latest version [1] is not compatible with our charms (even latest/edge). I tried deploying using 8.0.19/edge and then upgrading to latest/edge and the mysql-router service fails to start. With latest/edge it seems that it is having trouble with our /var/lib/mysql/neutron-api-mysql-router/mysqlrouter.conf e.g. the error I get is:

2022-05-04 10:35:02 main ERROR [7fb2ec62ee00] Error: option 'DEFAULT.name' is not supported

If I remove the "name" setting from the DEFAULT section and restart the service it works.

This is problematic because anyone that has unattended-upgrades enabled is going to have their mysql-router automatically upgraded and then it will no longer be able to speak to mysql.

[1] https://launchpad.net/ubuntu/+source/mysql-8.0/8.0.29-0ubuntu0.20.04.2

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-8.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Felipe Reyes (freyes) wrote :

worth to mention that the [DEFAULT].name key is set by "mysqlrouter --bootstrap" and not by the charm, more details at https://bugs.launchpad.net/charm-mysql-router/+bug/1907250/comments/10

Revision history for this message
Felipe Reyes (freyes) wrote :

From a charm's perspective, I believe we should be setting [DEFAULT].unknown_config_option to "warning", so (possible) future changes in this area won't break a running cluster.

From the docs https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-conf-options.html#option_mysqlrouter_unknown_config_option :
"""
A warning is default behavior, and bootstrapping defines it as error in the generated configuration file. MySQL Router versions before 8.0.29 ignore unknown configuration options. A warning logs a warning message but does not halt, whereas an error means Router fails to initialize and exits.
"""

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-mysql-router (master)
Changed in charm-mysql-router:
status: New → In Progress
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-mysql-router (master)

Reviewed: https://review.opendev.org/c/openstack/charm-mysql-router/+/840454
Committed: https://opendev.org/openstack/charm-mysql-router/commit/9563b204ad838529c17a155274f5815de595f6dc
Submitter: "Zuul (22348)"
Branch: master

commit 9563b204ad838529c17a155274f5815de595f6dc
Author: Felipe Reyes <email address hidden>
Date: Wed May 4 09:10:39 2022 -0400

    Set [DEFAULT].unknown_config_option to warning.

    This change sets the configuration option
    [DEFAULT].unknown_config_option to warning on upgrade-charm and on
    config-changed, this allows clusters running mysql-8.0.29 with the
    "name" key set to run.

    This option is set to "warning" by default, although mysqlrouter set it
    to "error". More details at
    https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-conf-options.html#option_mysqlrouter_unknown_config_option

    Closes-Bug: #1971565
    Change-Id: I9613706f1e2b573af10562fb6fbf0b9a7aedf6da

Changed in charm-mysql-router:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-mysql-router (stable/jammy)

Fix proposed to branch: stable/jammy
Review: https://review.opendev.org/c/openstack/charm-mysql-router/+/840583

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-8.0 - 8.0.29-0ubuntu0.22.04.2

---------------
mysql-8.0 (8.0.29-0ubuntu0.22.04.2) jammy-security; urgency=medium

  * SECURITY REGRESSION: 8.0.29 breaks existing charm configurations
    (LP: #1971565)
    - debian/patches/lp1971565.patch: add "name" to the supported global
      options list so existing configurations keep working.

 -- Marc Deslauriers <email address hidden> Wed, 04 May 2022 08:49:55 -0400

Changed in mysql-8.0 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-8.0 - 8.0.29-0ubuntu0.21.10.2

---------------
mysql-8.0 (8.0.29-0ubuntu0.21.10.2) impish-security; urgency=medium

  * SECURITY REGRESSION: 8.0.29 breaks existing charm configurations
    (LP: #1971565)
    - debian/patches/lp1971565.patch: add "name" to the supported global
      options list so existing configurations keep working.

 -- Marc Deslauriers <email address hidden> Wed, 04 May 2022 08:49:02 -0400

Changed in mysql-8.0 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-mysql-router (stable/jammy)

Reviewed: https://review.opendev.org/c/openstack/charm-mysql-router/+/840583
Committed: https://opendev.org/openstack/charm-mysql-router/commit/18cff04cc585ee476af1b814d8e364d9257593fb
Submitter: "Zuul (22348)"
Branch: stable/jammy

commit 18cff04cc585ee476af1b814d8e364d9257593fb
Author: Felipe Reyes <email address hidden>
Date: Wed May 4 09:10:39 2022 -0400

    Set [DEFAULT].unknown_config_option to warning.

    This change sets the configuration option
    [DEFAULT].unknown_config_option to warning on upgrade-charm and on
    config-changed, this allows clusters running mysql-8.0.29 with the
    "name" key set to run.

    This option is set to "warning" by default, although mysqlrouter set it
    to "error". More details at
    https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-conf-options.html#option_mysqlrouter_unknown_config_option

    Closes-Bug: #1971565
    Change-Id: I9613706f1e2b573af10562fb6fbf0b9a7aedf6da
    (cherry picked from commit 9563b204ad838529c17a155274f5815de595f6dc)

tags: added: in-stable-jammy
Felipe Reyes (freyes)
Changed in charm-mysql-router:
milestone: none → 22.04
assignee: nobody → Felipe Reyes (freyes)
Robie Basak (racb)
tags: added: regression-update
Changed in charm-mysql-router:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.