Commit Graph

134 Commits

Author SHA1 Message Date
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
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