interface does not check acl has been setup for unit

Bug #1861665 reported by Liam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-shared charm interface
Fix Released
High
Liam Young

Bug Description

The interface gates raising the state '{relation_name}.available' on the presence of the allowed_units key in the relation data. But it does not check that the unit in question is in the list. This means that the available state is raised potentially triggering charms to run actions against the database before the unit acl has been created. This situation caused a test failure with gnocchi recently.

I believe the reason this hasn't caused too many problems before now is that most reactive openstack charms wait until all interfaces are complete before doing anything (including db migrations). So they will be waiting on keystone to complete the identity relation which usually will take quite a long time and in that window the db will have processed all the acl requests.

Liam Young (gnuoy)
Changed in charm-interface-mysql-shared:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Liam Young (gnuoy)
milestone: none → 20.02
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-interface-mysql-shared (master)

Fix proposed to branch: master
Review: https://review.opendev.org/705402

Changed in charm-interface-mysql-shared:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-interface-mysql-shared (master)

Reviewed: https://review.opendev.org/705402
Committed: https://git.openstack.org/cgit/openstack/charm-interface-mysql-shared/commit/?id=1099a6b3ec1024a61fc4616378d01c642eb549c2
Submitter: Zuul
Branch: master

commit 1099a6b3ec1024a61fc4616378d01c642eb549c2
Author: Liam Young <email address hidden>
Date: Mon Feb 3 09:41:09 2020 +0000

    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

Changed in charm-interface-mysql-shared:
status: In Progress → 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.