Commit Graph

144 Commits

Author SHA1 Message Date
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
Liam Young 251d6a85a0 Merge pull request #765 from jpnorenam/ceph-auth-actions
Add test for ceph auth actions get-or-create-user and delete-user
2022-06-09 13:00:28 +01:00
Juan Pablo Noreña-Monsalve 0f867b476d update test.py 2022-06-09 06:53:13 -05:00
Juan Pablo Noreña-Monsalve 72e2979901 update test.py 2022-06-09 06:47:47 -05:00
Ethan Myers 9974c3849b no more print 2022-06-02 14:12:05 +00:00
Ethan Myers 197504a728 switched to query ceph daemon vs checking config 2022-05-31 22:03:31 +00:00
Ethan Myers 3719349773 Using retry and better assert 2022-05-27 19:39:24 +00:00
Ubuntu 3c609adde8 Add new ceph-fs configuration test 2022-05-26 19:00:17 +00:00
Juan Pablo Norena 8cba107f3a add test for deleting non-existing user 2022-05-18 11:57:29 +00:00
Juan Pablo Norena a8f71c8e05 Add test for ceph auth actions get-or-create-user and delete-user 2022-05-15 20:13:26 +00:00
Billy Olsen 0d07a39d60 Merge pull request #667 from gnuoy/ceph-radosgw-multi
Add wait for sync to ceph RGW tests
2022-05-10 10:11:28 -07:00
Luciano Lo Giudice 1a5b3f6152 Also wait for the SAML 'enabled' message 2022-05-02 17:31:27 -03:00
Luciano Lo Giudice eaf33ab2bd Add docstring to public method 2022-05-02 14:43:36 -03:00
Luciano Lo Giudice a6846dd161 Add a few retries to avoid race conditions 2022-05-02 14:37:54 -03:00
Luciano Lo Giudice 7d70b22846 PEP8 style fixes 2022-04-29 18:04:15 -03:00
Luciano Lo Giudice d9a2c95cd5 Fix ceph-dashboard SAML tests
This PR ensures that the SAML tests are using a fully valid IDP
metadata (Ceph's dashboard doesn't report its validity until SAML
features are used), as well as using TLS in the requests, in addition
to some cleanups here and there.
2022-04-29 18:00:18 -03:00
Luciano Lo Giudice a7f4e92e02 Reorder storage operation 2022-04-12 21:16:27 -03:00
Luciano Lo Giudice b7bb8597ce Sync kernel partitions 2022-04-12 19:47:43 -03:00
Luciano Lo Giudice f09bc087b3 Setup loop devices early on in the Ceph tests
There appears to be a race condition between the loop device creation
and its actual usage. In order to prevent that, this PR setups these
devices during the test initialization instead of right before using
them in the 'add-disk' tests.
2022-04-12 17:30:25 -03:00
Luciano Lo Giudice b7d7588f46 Test SAML redirect and presence of metadata 2022-04-05 14:50:15 -03:00
Luciano Lo Giudice 99b3cd6dec Use ceph-mon as application 2022-04-04 19:59:43 -03:00
Luciano Lo Giudice d1ad9f7a2a Use an existing application for version fetching 2022-04-04 18:21:31 -03:00
Luciano Lo Giudice 124d16acbb Add test for ceph-dashboard SAML functionality 2022-04-04 15:49:34 -03:00
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