For some reason test cases are sometimes executed out of order and so
test_921_remove_unit is sometimes run before the pause_and_resume test
case which results in an error.
While the root cause for it must be found it would also be good to avoid
side-effects in individual test cases and return the environment back to
its original state.
There is no 'start' hook implementation for charm-rabbitmq-server,
however, changes that close to the 20.05 release are discouraged so this
change uses an upgrade-charm event simulation to re-trigger the addition
of a unit (which was previously removed) to the cluster.
NOTE: after an execution of hooks/upgrade-charm finishes, the charm will
stay in the waiting state with the following status until the next
update-status event: 'Unit has peers, but RabbitMQ not clustered'
Related-Bug: #1730709
The image used for the tests is just treated as a blob, no guests
are booted using it so to speed up the tests when using slow
storage by switching to using cirros image. The cirros image is ~20
times smaller than the bionic one.
It's a bit too optimistic to expect an instance to respond to the first
ping. This patch gives the instance up to 8 retries with increasingly
lengthened waits to respond to a ping. This should help with Juju
storage backed nova instances.
Fixes: #265
Add functional test case to verify new config param
quota-count-usage-from-placement in nova-cloud-controller
charm.
Charm changes - https://review.opendev.org/#/c/715182/
Related-Bug: #1864859
* Add method for deleteing pacemaker nodes.
* Due to LP #1874719 use above to delete node1
* During test cleanup the tests re-enable hosts from a masakari pov,
if that host still has outstanding notifications it will fail so
retry the enable.
* pacemakerd process name has changed on focal so account for that
when killing it.
The test won't pass on serverstack due to the snapd taking a copy of the
/mnt/vdb info at boot time and thus not being able to umount it is root
without also running through all of the procs and checking if they also
have it mounted. Thus, this just disables the test on focal and newer.
Most api charms test restart on changed by flipping the value of
debug. This has led to the same test being copied around. To reduce
the boiler plate code this change adds a new test helper which can
be used instead.
The hacluster tests assume that all the subordinates are hacluster.
However, with mysql8 there is a mysql-router subordinate as well, and it
doesn't support the clean-up action. This change ensures that the tests
checks that the subordinate IS hacluter prior to applying the
action/test.