Root password update via config can cause hook failure

Bug #1838124 reported by Liam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
Fix Released
High
Liam Young

Bug Description

There is a race when changing the root password. If the leader completes its config-changed hook before another unit has started then the later units config-changed hook will fail. This is because the root password is not replicated and the charm uses the leader db to extract the current password.

Reproduce:
1) Enter a debug-hooks session on a non-leader and wait for it to enter an update-status hook.
2) Change the root password via config.
3) Once the leader has completed config changed run the queued hooks in the debug-hooks session.

Liam Young (gnuoy)
Changed in charm-percona-cluster:
assignee: nobody → Liam Young (gnuoy)
status: New → Confirmed
importance: Undecided → High
Liam Young (gnuoy)
summary: - Root password update via config can fail to apply
+ Root password update via config can cause hook failure
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.opendev.org/673132

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

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

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

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

commit e27006e98b9d0c090c2b07ead0ef12cd1630fe03
Author: Liam Young <email address hidden>
Date: Tue Jul 30 15:57:01 2019 +0000

    Switch to using DDL for root password update

    Using DDL for the root password update triggers the cluster to
    replicate the password rather than relying on the charm to apply it
    to each unit. This means that only the leader should update the
    password.

    To avoid a password update via config being missed the implicit save
    of config data is turned off on update-status hooks.

    Change-Id: I00fe3c7c32a000c6b697263a9ad32273515952a7
    Closes-Bug: #1838124
    Closes-Bug: #1838125

Changed in charm-percona-cluster:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-percona-cluster:
milestone: none → 19.07
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-percona-cluster (master)

Change abandoned by Liam Young (<email address hidden>) on branch: master
Review: https://review.opendev.org/673132
Reason: Superseded by later change

David Ames (thedac)
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.