Commit Graph

170 Commits

Author SHA1 Message Date
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
Peter Sabaini 99167326ce Fix race in setting up certs
Closes bug #2060785
2024-04-10 11:50:12 +02: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 4716fd5db9 Don't cache whether cinder is present 2024-01-05 20:40:36 -03:00
Luciano Lo Giudice ad246b1a14 Improve exception handling, comments and naming 2024-01-03 16:50:02 -03:00
Luciano Lo Giudice 9a8b7650a0 PEP8 changes 2024-01-02 19:35:13 -03: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 cfcee88c20 Retry ceph-dashboard ssl verification test
Avoid a race in configuring ssl on endpoints and services
2023-09-26 15:55:35 +02: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
Utkarsh Bhatt c0b2a2cdb0 Adds SSL config switch test to ceph-dashboard
Signed-off-by: Utkarsh Bhatt <utkarsh.bhatt@canonical.com>
2023-08-14 16:41:02 +05:30
Alex Kavanagh 6896da206f Merge pull request #558 from freyes/bug/1922195
Add support for testing CephFS and ceph-proxy.
2023-08-08 09:53:48 +01:00
Peter Sabaini 9e5f2e829d Merge pull request #1066 from sabaini/bug/1968369
Add a new TestClass that verifies test permissions change on charm up…
2023-06-30 14:56:09 +02:00
Peter Sabaini a0c8576bfa Fix dashboard test
Remove old and broken guard in ceph-dashboard testing
2023-06-26 13:51:41 +02:00
Felipe Reyes 7ec9b9198c Make CephProxyTest wait on the defined states in tests.yaml 2023-06-16 22:54:04 -04:00
Felipe Reyes 4b7d97168c Add support for testing CephFS and ceph-proxy.
This change allows to use ceph-mon or ceph-proxy for testing ceph-fs.

Closes-Bug: https://pad.lv/1922195
2023-06-16 22:54:01 -04:00
Peter Sabaini b9ef2a30ec Fix: retry rbd pool status command
The rbd mirror status command has spurious faults on occasion. Retry
after some waiting.
2023-06-14 12:59:30 +02:00
Chris MacNaughton 7edf82503e Add a new TestClass that verifies test permissions change on charm upgrade 2023-05-30 11:18:34 +02:00
Peter Sabaini 6f7b8794e8 Fix: upstream tooling output change
Ceph rbd mirroring fixes:

- Upstream ceph mirror tooling modernized its output, need to update
test to reflect that.

- Avoid spamming run-action in a loop

- Don't consider system pools for failover

- Remove obsolete workaround for LP: #1820976
2023-05-26 16:39:03 +02: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
Luciano Lo Giudice 1e12a7a6a1 This fixes flakyness with iscsi tests. There was a previous fix that
did mostly the same, but this PR makes it more similar to what we
have pending for the stable branches.

This PR is being tested in this gerrit patchset:
https://review.opendev.org/c/openstack/charm-ceph-iscsi/+/871154
2023-03-03 13:37:21 -03: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
Chris MacNaughton 36b267ba50 Update the CephFS tests with newer requirements
This change removes a repeated call to ceph daemon config
show and replaces it with a single call that we then
parse in Python.

It also removes a deprecated usage of handling async
code in Zaza that causes an infinite block in the test
code.
2022-08-30 18:38:37 -04:00
Chris MacNaughton 54dd97dfeb Migrate CephFS tests to not use OpenStack 2022-08-30 13:12:33 -04:00
Chris MacNaughton 6590172d87 Strip trailing slash from dashboard URL
The trailing slash gets handled badly by the Ceph dashboard when
the auth URL ends up looking like https://ip.address//api/auth
2022-08-16 14:06:37 +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
Samuel Walladge c396608daa Fix pep8 lint errors
One of the pep8 target dependencies must have updated,
causing a bunch of new lint errors in these categories:
- line length > 79 chars
- no whitespace after keyword
2022-08-03 13:44:22 +09:30
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
Felipe Reyes 54eb24ffdf Merge pull request #803 from openstack-charmers/ceph-dashboard-errors
Get ceph-dashboard's public addresses from the mon
2022-06-28 14:25:06 -04: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
Chris MacNaughton a6040e2e03 Get ceph-dashboard's public addresses from the mon
At some point, Juju stopped returning a list of units for subordinate
charms, so this test now fails to find the address for the dashboard units
2022-06-24 22:55:08 +02:00
Felipe Reyes f02beca790 Reduce the number of pgs on pool creation. (#794)
This change reduces the number of pgs requested on the creation of a
test pool to make it suitable for a 3 OSDs cluster.

Fixes: #647
2022-06-23 15:58:07 +02:00
Luciano Lo Giudice 3ab81b4ebb Refresh kernel partition table between tests (#779)
The test suite for ceph-iscsi does a bunch of operations on filesystems
in quick succession, so some tests are prone to fail if the kernel doesn't
update the partition table. This PR does this manually between tests by
calling the 'partprobe' command.

Co-authored-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
2022-06-09 16:58:37 +02:00