Comment 2 for bug 1972883

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-interface-mysql-router (master)

Reviewed: https://review.opendev.org/c/openstack/charm-interface-mysql-router/+/841581
Committed: https://opendev.org/openstack/charm-interface-mysql-router/commit/77dc778e6060a9bcdc49490c3e782b2204ba7454
Submitter: "Zuul (22348)"
Branch: master

commit 77dc778e6060a9bcdc49490c3e782b2204ba7454
Author: Liam Young <email address hidden>
Date: Thu May 12 12:11:05 2022 +0000

    Wipe 'prefixes' key on relation departed

    The prefix key is used to track requests that have been proxied
    to mysql-innodb-cluster. When a request for a username and password
    is made the prefix used is stored locally in a list *1. This list
    of prefixes is also used to check that requests are complete *2
    However the list presists after a relation is removed. If
    the relation is added back the charm reads the old list of
    prefixes and will not raise the db-router.available flag
    because it thinks there is an oustanding request *3.

    *1 https://opendev.org/openstack/charm-interface-mysql-router/src/branch/master/requires.py#L61
    *2 https://opendev.org/openstack/charm-interface-mysql-router/src/branch/master/requires.py#L151
    *3 https://opendev.org/openstack/charm-interface-mysql-router/src/branch/master/requires.py#L20

    Closes-Bug: #1972883
    Change-Id: I8ce022a44db37ab83c03442c5f97a843521286d2