charm-percona-cluster/unit_tests
David Ames 7c83c3c95f
Cluster peers notify readiness
The percona-cluster charm was rendering, and therefore, restarting
after each peer joined. This causes race conditions with the leader
handing out client credentials.

This is due to the parallel but conflicting goals of building the
cluster as quickly as possible but also delaying client relations until
the full cluster is completely ready.

The charm relied on the bootstrap_uuid being set among peers. However,
the bootstrap_uuid is set intentionally early in pursuit of the first
goal building the cluster quickly. It did not signify true readiness.

This change adds another peer relation setting, "ready", that each node
sets when it has bootstrapped, its hacluster is complete, and it has a
sufficient number of peers.

The cluster is considered ready when (min-cluster-size) peers have
indicated readiness. This fulfils goal number two delaying client
relations until the full cluster is ready.

Change-Id: I0998407fcb5efbdb0f7734ac39363e8d41088c79
Closes-Bug: #1775682
(cherry picked from commit 055d2bb17f)
2018-06-25 05:30:51 +02:00
..
__init__.py Enhanced pause/resume for maintenance mode 2016-04-05 14:46:03 +00:00
test_actions.py Replace 'MagicMock' with 'Mock' 2016-10-11 09:45:12 +08:00
test_percona_hooks.py Cluster peers notify readiness 2018-06-25 05:30:51 +02:00
test_percona_utils.py Cluster peers notify readiness 2018-06-25 05:30:51 +02:00
test_utils.py Retrieve root password from leaderdb if needed 2018-01-24 11:40:35 +00:00