allowed_units should be propagated to and by all peer units

Bug #1712383 reported by Edward Hope-Morley
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
Fix Released
High
Liam Young

Bug Description

The percona-cluster charm uses the allowed_units setting on the shared-db interface to notify relations that they are ready to use their mysql credentials by virtue of the fact that their access grants have been configured. Currently this setting is applied by the leader unit but is not propagated to peer units so that they can also set it for their relations. This is not a problem until you delete/remove the leader unit. As of that point units related to the mysql cluster whose db was initialised by that (removed) mysql unit will no longer have allowed_units set anywhere and will likely defer all actions until it is restored (proven with keystone charm) e.g.

  * deploy 3 node percona-cluster and keystone

  * confirm that allowed_units is present on the shared-db relation

  * delete the leader percona unit and add a new unit

  * confirm that allowed_units is no longer present on the shared-db relation from any percona unit

Tags: openstack sts
James Page (james-page)
Changed in charm-percona-cluster:
milestone: 17.08 → 17.11
Liam Young (gnuoy)
Changed in charm-percona-cluster:
assignee: Edward Hope-Morley (hopem) → Liam Young (gnuoy)
Revision history for this message
Felipe Reyes (freyes) wrote :

I think we should migrate the allowed_units to the leader settings, otherwise we will risk to have yet-another possible *-changed hook spinning issue.

The approach of relation-set for all the peers in case the leader unit goes away is what leader-set/leader-get solves.

allowed_units is read via leader-get, and the relation-set -r xxx:n allowed_units=... just to notify the other side of shared-db that the database is ready to be consumed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-percona-cluster (master)

Fix proposed to branch: master
Review: https://review.openstack.org/512354

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

Reviewed: https://review.openstack.org/512354
Committed: https://git.openstack.org/cgit/openstack/charm-percona-cluster/commit/?id=a92cfd6a8a78016fac887c789b950bd08b572195
Submitter: Zuul
Branch: master

commit a92cfd6a8a78016fac887c789b950bd08b572195
Author: Liam Young <email address hidden>
Date: Mon Oct 16 16:38:01 2017 +0000

    Non-leaders set allowed_units down shared-db rel

    The allowed_units key needs to be set by all units rather than
    just the leader incase the leader dies and the setting is lost.

    Change-Id: I0ed687e5615ee1de5ea34c9169e2728fe557886b
    Closes-Bug: #1712383

Changed in charm-percona-cluster:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-percona-cluster:
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.