Commit Graph

50 Commits

Author SHA1 Message Date
Dariusz Smigiel 4df0cbee8c Moved block_until_idle immediately after force-quorum cmd 2021-04-02 11:40:07 -07:00
Dariusz Smigiel 0858f016cd Fixed TokenError 2021-04-02 11:29:44 -07:00
Dariusz Smigiel 9a5e334b44 Addressed review comments 2021-04-02 11:05:52 -07:00
Dariusz Smigiel 795272269f Fixed typo 2021-04-02 07:52:18 -07:00
Dariusz Smigiel 8b47c8a37f Change the way how I'm checking state 2021-04-02 07:40:00 -07:00
Dariusz Smigiel 51a53d4e86 Verify at the end that cluster is in operable state 2021-04-02 07:12:06 -07:00
Dariusz Smigiel 66fd299f16 Fixed typo 2021-04-01 21:30:13 -07:00
Dariusz Smigiel e8157f0df8 Addressed flake8 violations 2021-04-01 20:44:23 -07:00
Dariusz Smigiel a891ff28d5 Added 'i-really-mean-it' tick to force-quorum 2021-04-01 16:38:21 -07:00
Dariusz Smigiel fe8b78b7c6 Functional testing for mysql-innodb-cluster
This is a change with functional test for mysql-innodb-cluster
implementing `force-quorum-using-partition-of` feature.
It is addressing bug:
https://bugs.launchpad.net/charm-mysql-innodb-cluster/+bug/1917332
2021-04-01 14:08:54 -07:00
David Ames 2a6517f6fd Add restart on change test (#527)
Add the restart on change test for mysql-router.
2021-03-23 15:32:01 +00:00
David Ames adda372699 Show cluster status before removal 2021-03-02 22:44:40 +00:00
David Ames 135da1e1a3 Fix reboot-cluster-from-complete-outage race 2021-02-18 09:38:05 -08:00
David Ames af2c6243e2 Fix race condition in MySQL tests
In the MySQL test we destroy a unit and then attempt to remove it from
metadata. The metadata removal (remove_instance action) gets stuck when it is
started while the destroyed unit has not been entirely removed and is still
running MySQL.

Wait for all the units to have cluster incomplete workload status message
before attempting the remove_instance.
2021-02-12 14:23:00 -08:00
Alex Kavanagh 7ced54b382 Concurrent series upgrade updates (#466)
* Updates to concurrent series upgrade

Updates to make it run more in parallel and spend less time waiting on
the whole model when updating machines.

* Make the concurrent series upgrade tests work

This is a number of changes to get the concurrent (here called
'parallel' historically) series upgrade tests to work.  A number of
changes were required which included limiting the number of concurrent
async co-routines (futures) that could be run as with large models it
hits the limits of the Py3 runtime.

* Fix the tests and change pause order in maybe_pause_things

Due to an additional model helper call, an additional model AsyncMock is
required.  Also the pause order had changed, and this is restored to
ensure the original design is retained (for pause order).

Clean up some commented out code and sort out a few PEP8 errors.

* Update comment to reflect code (3 -> 4)

* Fix tests that fail on bionic but pass on focal

Essentially, asyncio.gather has different behaviour on bionic that
focal.  Although this doesn't affect testing, it does affect the unit
tests.  These changes are simply to normalise the behaviour of unit
tests on focal and bionic.
2020-12-02 11:22:00 +01:00
Alex Kavanagh 19c626e120 Merge pull request #203 from freyes/bug/1868326
mysql: add check for seeded file in pxc
2020-08-24 14:38:59 +01:00
David Ames 4546e821c1 Wait for resolving update-status hook errors
The cold boot restart takes too long on update-status. Make the timeout
longer.
2020-07-09 09:27:25 -07:00
David Ames 7265b79769 Fixes for MySQL testing
* Better handle workload state checking during cold start
* Switch from debug to info to see log messages
2020-07-08 10:27:01 -07:00
coreycb 754a709083 Merge pull request #291 from thedac/reboot-from-outage-fixes
Handle reboot_from_complete_outage for mysql-innodb-cluster
2020-05-21 18:31:51 -04:00
David Ames d45e1a655c Merge pull request #272 from mfmsilva/add_mysqldump_to_common
Add mysqldump test to MySqlCommonTests
2020-05-21 15:21:35 -07:00
David Ames 4802e632bd lint fix 2020-05-20 15:05:37 -07:00
David Ames e347f0cb7a Handle reboot_from_complete_outage for mysql
Test updates to re-enable reboot_from_complete_outage testing on
mysql-innodb-cluster.
2020-05-20 11:56:55 -07:00
Marco Silva 28924d2909 Move mysqldump from MySQLInnoDBClusterTests to MySQLCommonTests
Moved mysqldump function. Added check for percona-cluster application
on the function, to avoid breaking checks on non-percona applications.
2020-05-20 13:05:43 +01:00
David Ames c06cb8d625 MySQL 8 Scale-in and Scale-out tests (#275)
* MySQL 8 Scale-in and Scale-out tests

Depends-On: https://github.com/openstack-charmers/zaza/pull/353

* Review requests

* Typo
2020-05-19 09:47:55 -05:00
Marco Silva a56fa1fd74 Add mysqldump test to MySqlCommonTests
Copy function from MySQLInnoDBClusterTests to test mysqldump
as standard on mysql applications.

DocImpact
Closes-Bug: #0000000
Implements: MySQL dump test
2020-05-14 09:34:44 +01:00
Aurelien Lourot ac227eab08 Fix copy-paste mistakes and typos and remove dead code 2020-04-16 15:10:03 +02:00
Chris MacNaughton 27e5f7d8bc We must have async functions for the before/after callables 2020-04-10 16:51:41 +02:00
Chris MacNaughton 2a98274d67 Add a few more function hooks to the series upgrade process
By including pre and pos-application functions, charm
series upgrades can be handled in a more generic way,
even when they require running additional actions
before a unit is upgraded, or after the whole application
is upgraded.
2020-04-10 10:50:43 +02:00
Felipe Reyes 8e55f588c8 mysql: add check for seeded file in pxc
Verify the seeded file is present with the expected content since it will
be used by *-relation-changed hook to determine if it can process requests
of related units.

Related-Bug: #1868326
2020-03-24 18:26:57 -03:00
David Ames 23cc3e2a9a Lint fix 2020-02-27 16:18:19 +00:00
David Ames 27407998a9 Allow for no charm_name setting 2020-02-26 22:18:56 +00:00
David Ames e22d55d966 Enable for full stack 2020-02-25 18:47:20 +00:00
David Ames 0dc16b289a Lint fixes 2020-02-18 15:57:13 -08:00
David Ames 6b110335a5 Percona to MySQL InnoDB Cluster migration
Validate the migration from percona-cluster to mysql-innodb-cluster by
dumping databases from percona and restoring them in mysql8.
2020-02-18 15:26:26 -08:00
David Ames af64a75fd7 Use model.run_action_on_leader
Address reveiw requests
Use model.run_action_on_leader
Log action.data on action failure
2019-11-19 11:51:04 -08:00
David Ames 9c75b89273 Reboot cluster from complete outage tests
Testing for cold start scenario for MySQL InnoDB Cluster.
2019-11-18 16:46:08 -08:00
David Ames 9cd26e9e4c Add mysqldump action test 2019-11-12 14:17:08 -08:00
David Ames 55c2e60b8e Fix generator sort failure 2019-11-07 15:55:35 -08:00
Alex Kavanagh ca98d2af7f Merge pull request #107 from thedac/mysql8-actions
MySQL 8 specific tests
2019-11-07 16:00:29 +00:00
David Ames 22614a3099 Get leaders and non-leaders 2019-11-06 15:35:56 -08:00
David Ames 25b3932ce9 MySQL 8 zaza tests
* Re-arrange the MySQL, Percona-cluster classes to avoid code
  duplication
* cluster-status action
2019-11-06 15:28:20 -08:00
Frode Nordahl 8d676bf9fa Make non-existent tests/tests.yaml non-fatal where possible
Not all test environments or runners are equal, don't crash on
non-existent test config.
2019-11-05 16:38:06 +01:00
Ryan Beisner 9333b47a86 Flag existing time.sleep usage for refactor
https://github.com/openstack-charmers/zaza-openstack-tests/issues/46
2019-08-30 15:41:28 -05:00
Camille Rodriguez 9061ad9847 Verify instances status before going starting the instances 2019-08-30 15:26:54 -04:00
Camille Rodriguez 94e1d8f7ed Verify instances status before going starting the instances 2019-08-30 15:01:36 -04:00
Liam Young 0f9fc9c49b Only auto-resolve update-status hooks
If a unit is rebooted while executing a hook Juju will mark it as
errored when it comes back. To work around this in tests, units in
an error state are resolved on reboot. However, this could mask a
genuine error. So, to minimise the risk only resolve units that
went into an error state when running update-status as the system
was in a stable state prior to reboot so that should have been the
only hook running.

Charm going into an error state on reboot applies equally to
subordinates so use the same logic for hacluster.

block_until_all_units_idle can return when a subordinate hook is
still queued so check for update-status errors when manually
queuing update-status run via action.
2019-07-30 14:23:31 +00:00
Liam Young 7c0ee7389f Resolve hook errors after pxc reboot 2019-07-25 13:58:29 +00:00
David Ames 81604c399b Review requests for Liam 2019-07-17 11:07:52 -07:00
David Ames 05517b566e Review requests for Alex 2019-07-17 08:50:07 -07:00
David Ames 138bd11207 Zaza tests for percona-cluster
Port over amulet tests to zaza for percona-cluster.
Add testing of new feature actions for cold start tests: bootstrap-pxc
and notify-bootstrapped.
2019-07-15 07:51:54 -07:00