Commit Graph

101 Commits

Author SHA1 Message Date
Ionut Balutoiu d2b38e6279 CephRGWTest: Deduplicate code to create multi-site relation
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2024-04-25 10:46:43 +03:00
Ionut Balutoiu 5054a7992c CephRGWTest: Add integration test for multisite sync policies feature
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2024-04-24 19:24:09 +03:00
Ionut Balutoiu e68c902fc8 CephRGWTest: Wait for sites to be syncronised before recovery scenario
If `self.promote_rgw_to_primary(self.primary_rgw_app)` is executed
before sites are syncronised, the sites will not be syncronised after.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2024-04-24 19:23:03 +03:00
Ionut Balutoiu c0f0474762 CephRGWTest: Reorder test cases
* Rename `test_004_migration_and_multisite_failover` to `test_100_migration_and_multisite_failover`
    * This will allow us to insert more multi-site tests after `test_003`,
      before scale-down scenario is run in `test_100_migration_and_multisite_failover`.
* Rename `test_005_virtual_hosted_bucket` to `test_101_virtual_hosted_bucket`.
    * This was previously run after `test_004_migration_and_multisite_failover`.
      So, we rename the test case to `test_101` to keep the same order.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2024-04-24 12:12:25 +03:00
Peter Sabaini 2e0beacad4 Merge pull request #1195 from lmlg/ceph-key-tests
Implement tests for ceph-mon's rotate-key action
2024-04-22 19:04:02 +02:00
Luciano Lo Giudice e083e56ee7 Remove OSD tests for initial release 2024-04-19 15:36:00 -03:00
Peter Sabaini da3463cb94 Fix: ceph-radosgw test should only check radosgw app
Don't block on global app state waiting but only check the SUT app
state.
2024-04-17 16:38:39 +02:00
Luciano Lo Giudice aa7d619a24 Add some time to get the unit to settle 2024-04-15 13:55:44 -03:00
Luciano Lo Giudice e574fc0019 Temporarily revert OSD testing to get RGW changes merged 2024-04-15 11:18:08 -03:00
Luciano Lo Giudice 06e876a7ad Uncomment ceph-osd tests 2024-04-12 13:34:11 -03:00
Luciano Lo Giudice 2f557c531d Use the correct callable 2024-04-11 16:06:19 -03:00
Luciano Lo Giudice cbc117208e Use the right unit to get the RGW client 2024-04-11 13:14:45 -03:00
Luciano Lo Giudice 7f913c7be2 Merge remote-tracking branch 'canonical/master' into ceph-key-tests 2024-04-11 10:58:10 -03:00
Luciano Lo Giudice eee7611ccb PEP8 fix 2024-04-10 13:45:12 -03:00
Luciano Lo Giudice d10c243f8d Comment out OSD tests until PR is ready 2024-04-10 13:41:40 -03:00
Luciano Lo Giudice f411c0b0b1 Use already existing functionality to fetch RGW client 2024-04-10 13:08:41 -03:00
Peter Sabaini 99167326ce Fix race in setting up certs
Closes bug #2060785
2024-04-10 11:50:12 +02:00
Luciano Lo Giudice 8fe9a110ed Also test key rotation in OSD's 2024-04-09 19:47:24 -03:00
Luciano Lo Giudice 761913176c Make sure the result is the type of entity we're after 2024-04-09 19:28:40 -03:00
Luciano Lo Giudice b99a6c428a Fix access to keys 2024-04-09 13:47:25 -03:00
Luciano Lo Giudice 99456d9229 Adjust test so it can be used for more than managers 2024-04-09 11:59:43 -03:00
Luciano Lo Giudice 3989d543f6 Get the keys for all managers to compare 2024-04-08 11:20:48 -03:00
Luciano Lo Giudice 5d45789726 Implement tests for ceph-mon's rotate-key action
This PR implements tests for the ceph-mon charm's action 'rotate-key'.
For now, the charm only supports key rotation for managers, but
more entities will be added. This PR will be used to test those
new entities as well.
2024-04-05 18:05:40 -03:00
Shunde Zhang ff58f1a129 delete whitespace in blank line 2024-04-03 15:40:04 +11:00
Shunde Zhang 9bdaf703d2 skip virtual hosted bucket test after multi site tests 2024-04-03 15:38:05 +11:00
Shunde Zhang 56776d0bb2 Fixed pep8 errors. 2024-04-02 21:00:39 +11:00
Shunde Zhang 374bde62ce add test for virtual hosted bucket 2024-04-02 17:48:19 +11:00
Luciano Lo Giudice f61ccd44f8 Make Ceph tests self-contained.
This PR implements the needed changes so that the Ceph charms
can be run without a full Openstack environment. In particular,
the RBD mirror charm needed tweaking so as to not depend on
Cinder, using pools of its own creating.
2024-01-02 19:26:28 -03:00
Peter Sabaini 2968bf8e31 Retry ceph-proxy pool test
When running the pool setup we test after the model is idle, but that
is not a guarantee that all pools have finished setup, so that the test
could race the pool creation.

Add retry to the test to give the system another chance to complete
pool creation
2023-09-01 13:19:42 +02:00
Felipe Reyes 7ec9b9198c Make CephProxyTest wait on the defined states in tests.yaml 2023-06-16 22:54:04 -04:00
Peter Sabaini 0f26ac6266 Merge pull request #1047 from jneo8/bug/2007976
feat(zaza/ceph): Check persistent config is working
2023-05-25 07:40:26 +02:00
Peter Sabaini 54da3aa331 Update ceph user creation test
Upstream cli changed output, see https://tracker.ceph.com/issues/61362
2023-05-23 19:03:09 +02:00
jneo8 5fc5679e18 feat(zaza/ceph): Check persistent config is working
Add zaza test to check persistent config will update after config change.
2023-05-09 13:53:22 +08:00
Luciano Lo Giudice e4a9aadf05 Make Ceph tests more generic (#1034) 2023-04-10 22:25:06 +02:00
Peter Sabaini 9880637aa1 Move pristine test to ceph-osd tests
Pristine status test was applied to all ceph related charms, but only
really is relevant for the ceph-osd charm.
2023-03-31 12:45:49 +02:00
Peter Sabaini ef62272bbf Unblock after pristine status (#1025)
When a charm has a non-pristine status, it should leave the
previously-set blocked state (LP #1988088) if there are no
non-pristine disks

Also: seeing some spurious test failures due to timeouts
waiting on disk removal -- wait a bit longer
2023-03-21 19:26:15 +00:00
Chris MacNaughton f5cfd59a80 Requiring that a bundle defines more than one OSD is unecessary
While the disk replacement rests are good for the OSD charm,
and it's useful to have more disks by default in that case,
requiring extra disk for all applications that tun the Ceph tests
is an unreasonable burden, requiring additional changed just
to accommodate the OSD charm tests.

This change updates to check if we have enough disks available
before running the disk replacement tests.
2023-03-10 14:43:26 -05:00
Utkarsh Bhatt cd0ae7c0d8 Replaced Loopback with block device from bundle. (#989) 2023-03-10 13:05:47 +00:00
Felipe Reyes 618fb7b6e9 Retry when checking ceph pool compression mode.
The compression mode after it's set via config-changed might take a
while to fully propagate to the whole cluster, hence the hook may be
done before the cluster is fully configured with the new compression
mode. This is more noticeable in the gate when there are many jobs
running in parallel.

This patch modes the check to its own method wrapped with a
tenacity.retry decorator to make the test more robust.

Closes #946
2023-02-20 11:31:45 -03:00
Felipe Reyes 2cd18b484d Replace assertEquals with assertEqual.
DeprecationWarning: Please use assertEqual instead.
2023-02-14 14:45:20 -03:00
Chris MacNaughton 1a529276df Migrate several Ceph test cases to not use the openstack base 2023-01-23 09:43:23 -05:00
Peter Sabaini 74bca90a6f Ceph: also check ceph-mgr (#973)
In the ceph lowlevel test, also check for ceph-mgr process and
service.
2022-10-27 13:46:08 +02:00
Chris MacNaughton 98a1c8948a [ceph] remove white-box testing migrated from amulet (#951) 2022-10-12 15:34:14 +01:00
Utkarsh Bhatt 6a222d1210 replaced deprecated relation (#926)
Co-authored-by: utkarshbhatthere <utkarsh.bhatt@canonical.com>
2022-09-24 15:01:49 +02:00
Utkarsh Bhatt 91748b598c Adds scaledown check and verification for stoppage of synchronisation. (#863) 2022-09-12 18:37:06 +00:00
Luciano Lo Giudice acf30b3a8a Add functional tests for ceph-mon actions. (#866)
* Add functional tests for ceph-mon actions.

This PR adds functional validation for 2 actions of the ceph-mon
charm that are currently being rewritten.

Cleanup after the tests run.

Co-authored-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
2022-09-09 11:24:10 +00:00
Luciano Lo Giudice 5da70ae0fd Move tests that aren't in stable to a different class (#849)
In order to correctly test the upgrade from stable, we have to
move the tests that haven't landed yet to a different class so
that the charm can select to run them only after performing the
upgrade to the locally built charm.
2022-08-09 12:57:18 +00:00
Utkarsh Bhatt efdb1ae4e3 Add Testcases for Ceph-RGW multisite migration (#840)
The updated testcase handles verifying the expected states
that are safe to migrate, as well as verifying that pre- and post-
migration data are correctly synced.
2022-08-08 12:03:35 +00:00
Liam Young 4a6418e939 Prometheus has registered a non-zero num of osds (#820)
Change prometheus test to check it has a non-zero amount of OSDs
registered rather than a specific number. This stops the number of
OSDs having to be managed in the tests.
2022-07-08 11:17:28 +01:00
Luciano Lo Giudice be70ef7529 Make Ceph tests idempotent (#795)
With the upcoming transition to an operator-framework charm, the
Ceph tests need to be idempotent, since we'll be testing the upgrade
path from classical to operator. The tests that need fixing are the
ones that call out to add/remove disks, since they create loopback
devices to back the OSD's but never remove them.
2022-06-27 20:44:24 +02:00