Commit Graph

97 Commits

Author SHA1 Message Date
Luciano Lo Giudice 3a7afecf4d Remove spurious loop device 2022-03-21 19:51:59 -03:00
Luciano Lo Giudice e1d10f9359 Use the correct module 2022-03-21 18:44:42 -03:00
Luciano Lo Giudice 1b01ff2c51 Merge branch 'master' into osd-remove-test 2022-03-21 18:39:59 -03:00
Chris MacNaughton a45db73007 Merge pull request #675 from openstack-charmers/osd-add-disk-test
Osd add disk test
2022-02-22 07:47:52 +00:00
Luciano Lo Giudice 11fa17fc6e Correctly prefix module access 2022-02-17 18:19:49 -03:00
Luciano Lo Giudice ed47cb718a Correctly indent docstring 2022-02-17 18:15:46 -03:00
Luciano Lo Giudice e6d6b9e4b5 Run command on ceph-mon since some versions don't allow ceph-osd for it 2022-02-17 18:12:05 -03:00
Luciano Lo Giudice e751e4a989 Rearrange functions into separate modules 2022-02-10 14:28:50 -03:00
Luciano Lo Giudice c8302161a1 Also test that the new number of OSD's is correct. 2022-01-20 20:47:12 -03:00
Alex Kavanagh 0af4c93d52 Switch unit.public_address to unit.get_public_address()
Due to the bug [1] on OpenStack providers, unit.public_address doesn't
actually work reliably.  The fix [2] is only for the async function
unit.get_public_address().  Sadly, zaza relied on unit.public_address
and so it needs this patch for juju 2.9 support on OpenStack providers.

This patch relies on an associated patch in zaza [3]; thus this will
fails its tests until that passes.

[1]: https://github.com/juju/python-libjuju/issues/551
[2]: https://github.com/juju/python-libjuju/pull/600
[3]: https://github.com/openstack-charmers/zaza/pull/468
2022-01-14 15:21:32 +00:00
Luciano Lo Giudice 4ecea0ee06 Remove unused variable 2021-12-09 19:10:43 -03:00
Luciano Lo Giudice efc30389d6 Implement test for disk replacement
This PR builds on the add-disk one, testing the complete flow
of adding a disk, removing it and finally re-adding it after
recycling the original OSD id.
2021-12-09 19:08:11 -03:00
Luciano Lo Giudice f6a0b14df4 Fix import of juju utilities 2021-11-29 16:00:26 -03:00
Luciano Lo Giudice 7933615a7e Remove unused import 2021-11-29 12:09:28 -03:00
Luciano Lo Giudice 97f1ea5693 Move functions into juju utilities. 2021-11-29 12:08:28 -03:00
Luciano Lo Giudice 4a52ba1dba Add docstrings. 2021-11-26 18:40:14 -03:00
Luciano Lo Giudice a7865afb64 Test the enhancements of the 'add-disk' action for ceph-osd
This PR tests that a new device is succesfully added to the OSD
charm, and that it's done so via the 'bcache' mechanism. The
backing storage is provided via a loopback device, whereas the
caching storage is provided by Juju itself.
2021-11-26 18:29:29 -03:00
Corey Bryant 11f956b81b Skip failing ceph test
Skip test_ceph_pool_creation_with_text_file for releases >= victoria
until the issue is properly fixed.

This works around issue #647
2021-11-03 21:24:45 +00:00
Liam Young d689fb91fc Add retries when accessing Ceph dashboard (#646) 2021-10-04 12:16:43 +01:00
Liam Young 6918f9ebb3 Extend Ceph Dashboards tests to check ceph services are registered (#643) 2021-10-03 16:13:50 +01:00
James Page 66b1c35d94 Merge pull request #631 from gnuoy/ceph-dash-grafana-url
Add setup method for setting grafana api for ceph dashboard
2021-09-13 10:47:02 +01:00
Liam Young 23f95655b9 Add setup method for setting grafana api for ceph dashboard 2021-09-08 17:44:11 +00:00
Liam Young 36d85aece5 Pacific requires client to set accepted api version 2021-09-08 13:34:30 +00:00
Liam Young 5993f3f2c5 Dashboard test updates
Verify CA now that bug is fix released *1.
Check logging in to the dashbaord works
Use a random username for tests so a test reruns work.

*1 https://bugs.launchpad.net/cloud-archive/+bug/1933410
2021-09-06 12:17:41 +00:00
Liam Young 5baf16237f Add certificate check for Ceph dashboard
Add setup step for the dashboard which will block until the
certificates are present and the model is idle. This is to prevent
the tests from continuing when the certificates are not ready.
Also up CephDashboardTest to use standard tools for collecting
ca cert.
2021-08-31 17:24:15 +00:00
Liam Young 7cec6a27b5 Fix doc string 2021-06-24 11:57:21 +00:00
Liam Young dc78fb6616 Add missing __init__ 2021-06-24 09:51:06 +00:00
Liam Young 110df7f2c7 Add very basic ceph dashboard tests. 2021-06-24 09:19:34 +00:00
Billy Olsen a6cd0ea62a Fix Ceph service action tests
The ServiceTest.test_start_specific under the ceph osd tests stops all
services using ceph-osd.target. This will stop all the OSDs, but the
restarting of any single OSD will restart all the OSDs. This behavior
causes the charm test to fail.

Unfortunately, this wasn't caught in the initial review because the test
is skipped when there are fewer the 2 OSDs on a unit and the final test
run skipped the test due to this condition.

Fixes #542

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-04-08 14:12:11 -07:00
Ionut Balutoiu 2fefca5a40 Code cleanup
* Move general function out of the testing class. This will make them
  easy to be reused.
* Properly organize the tests, and add tons of docstrings and comments
  to have them as clear as possible.
* Add `failover_cinder_volume_host` to the Zaza `utilities/openstack.py`,
  since this is a general purpose function.
2021-03-03 13:56:36 +02:00
Ionut Balutoiu d41f8b3724 Update Ceph RBD Mirror tests
The updated tests add the possibility of testing deployments
with `image` RBD mirroring mode implemented as part of the
Cinder Ceph Replication charm spec.
2021-02-25 11:01:54 +02:00
Garrett Thompson 33ab875eb2 Replace get_relation_from_unit for ceph test 2021-02-02 09:58:13 -08:00
Aurelien Lourot bf4f412135 Merge pull request #456 from gnuoy/support-multiple-iscsi-gws
Stop assuming there are two iscsi gateways
2021-01-08 09:44:47 +01:00
Liam Young ddd9c74028 Use keystone in the first instance 2021-01-06 12:12:42 +00:00
Liam Young ed3b2737d1 Use ceph-mon to check ceph version not keystone
The test class BlueStoreCompressionCharmOperation gates tests on
whether the ceph release is mimic or newer but it uses the
keystone application to calculate the currently deployed version.
This PR switches the test class to ceck the version of ceph-mon
instead which makes more sense and the keystone application may
not always present in a ceph deployment.
2021-01-06 11:38:41 +00:00
Martin Kalcok 96592c6a85 Rename parameter disks to osds 2020-12-11 16:16:15 +01:00
Martin Kalcok cfdabe273a Adjust tests after rework of the 'service' action into start and stop actions 2020-12-11 09:49:33 +01:00
Aurelien Lourot a8ca4720a3 Fix BlueStoreCompressionCharmOperation on Victoria (#468)
Before this fix, the test tried to determine the OpenStack
release based on the ceph-mon charm. Unfortunately Ceph has
the same version on Ussuri and Victoria. As a consequence
the test would wrongly conclude that it's testing against
"groovy_ussuri", which isn't a valid Ubuntu/OpenStack pair.

With this fix, the test now determines the OpenStack
release based on the keystone charm, with which we are able
to tell Ussuri and Victoria apart. This test class is being
run against the following charm functional tests at the
moment, which all have a keystone charm in their test
bundles: nova-compute, cinder-ceph, glance, ceph-fs,
ceph-radosgw and gnocchi.
2020-11-27 09:53:12 +01:00
Martin Kalcok d6f719e331 Skip 'service' action tests on systems without systemd 2020-11-26 14:42:12 +01:00
Liam Young a91ae76975 Stop assuming there are two iscsi gateways
The tests assume there are two iscsi gateways which is not a
safe assumption.
2020-11-06 14:12:59 +00:00
Martin Kalcok 991d7ea7a4 Removed typing usage 2020-11-03 15:47:18 +01:00
Martin Kalcok 990be12171 Fix async_wait_for_service_status() checking only first service in the list 2020-10-28 13:58:49 +01:00
Martin Kalcok 12db27016e Fix typos 2020-10-14 13:55:23 +02:00
Martin Kalcok 24755c2382 Add function that waits on desired service status using systemctl 2020-10-14 13:47:20 +02:00
Martin Kalcok 1889d0db53 Add func-tests for ceph-osd 'service' action 2020-10-12 17:51:04 +02:00
Dmitrii Shcherbakov 0a0a7afa2b Merge pull request #423 from gnuoy/extend-ceph-iscsi-checks
Extend ceph iscsi checks
2020-09-25 10:57:25 +03:00
James Page 018f1eac96 Merge pull request #398 from openstack-charmers/ceph-bluestore-compression
Ceph bluestore compression
2020-09-24 11:30:50 +01:00
Liam Young 7e0eaf919f Stdout v stdout now handled by zaza 2020-09-24 08:59:46 +00:00
Liam Young ad1ea7667d handle stdout v Stdout 2020-09-23 17:04:19 +00:00
Liam Young 76e7666f9c Fix typo 2020-09-23 11:25:00 +00:00