Merge lp://staging/~freyes/charms/trusty/percona-cluster/lp1426508 into lp://staging/~openstack-charmers-archive/charms/trusty/percona-cluster/next
Status: | Superseded |
---|---|
Proposed branch: | lp://staging/~freyes/charms/trusty/percona-cluster/lp1426508 |
Merge into: | lp://staging/~openstack-charmers-archive/charms/trusty/percona-cluster/next |
Diff against target: |
2350 lines (+2141/-3) 25 files modified
.bzrignore (+3/-0) Makefile (+7/-0) charm-helpers-tests.yaml (+5/-0) copyright (+22/-0) hooks/percona_hooks.py (+35/-3) hooks/percona_utils.py (+17/-0) ocf/percona/mysql_monitor (+636/-0) setup.cfg (+6/-0) templates/my.cnf (+1/-0) tests/00-setup.sh (+29/-0) tests/10-deploy_test.py (+29/-0) tests/20-broken-mysqld.py (+38/-0) tests/30-kill-9-mysqld.py (+38/-0) tests/basic_deployment.py (+151/-0) tests/charmhelpers/__init__.py (+38/-0) tests/charmhelpers/contrib/__init__.py (+15/-0) tests/charmhelpers/contrib/amulet/__init__.py (+15/-0) tests/charmhelpers/contrib/amulet/deployment.py (+93/-0) tests/charmhelpers/contrib/amulet/utils.py (+316/-0) tests/charmhelpers/contrib/openstack/__init__.py (+15/-0) tests/charmhelpers/contrib/openstack/amulet/__init__.py (+15/-0) tests/charmhelpers/contrib/openstack/amulet/deployment.py (+137/-0) tests/charmhelpers/contrib/openstack/amulet/utils.py (+294/-0) unit_tests/test_percona_hooks.py (+65/-0) unit_tests/test_utils.py (+121/-0) |
To merge this branch: | bzr merge lp://staging/~freyes/charms/trusty/percona-cluster/lp1426508 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Page | Needs Fixing | ||
Mario Splivalo | Pending | ||
OpenStack Charmers | Pending | ||
Review via email: mp+255393@code.staging.launchpad.net |
This proposal supersedes a proposal from 2015-03-17.
This proposal has been superseded by a proposal from 2015-04-17.
Description of the change
Dear OpenStack Charmers,
This patch configures mysql_monitor[0] to keep updated two properties (readable and writable) on each node member of the cluster, these properties are used to define a location rule[1][2] that instructs pacemaker to run the vip only in nodes where the writable property is set to 1.
This fixes scenarios where mysql is out of sync, stopped (manually or because it crashed).
This MP also adds functional tests to check 2 scenarios: a standard 3 nodes deployment, another where mysql service is stopped in the node where the vip is running and it's checked that the vip was migrated to another node (and connectivity is OK after the migration). To run the functional tests a file called `local.yaml` has to be dropped in the charm's directory with the vip that has to be used, for instance if you're using lxc with the local provider you can run:
$ cat<<EOD > local.yaml
vip: "10.0.3.3"
EOD
Best,
Note0: This patch doesn't take care of starting mysql service if it's stopped, it just take care of monitor the service.
Note1: this patch requires hacluster MP available at [2] to support location rules definition
Note2: to know if the node is capable of receiving read/write requests the clustercheck[3] is used
[0] https:/
[1] http://
[2] https:/
[3] http://
Felipe
This looks like a really good start to resolving this challenge; generally you changes look fine (a few inline comments) but I really would like to see upgrades for existing deployments handled as well.
This would involve re-executing the ha_relation_joined function from the upgrade- charm/config- changed hook so that corosync can reconfigure its resources as required.