Ronen Friedman [Thu, 20 Feb 2025 16:15:44 +0000 (10:15 -0600)]
qa/standalone/scrub: retry in TEST_abort_periodic_for_operator()
The scenario created in the test requires two PGs that share the same
Primary, and at least one more member of their active sets.
The PR handles the (unlikely) case where the first PG tried does not
have a counterpart that matches the requirements.
A minor related fix in scrub-helpers.sh: using 'printf' to
return a value, instead of an out (ref) parameter.
ceph-volume: migrate unit tests from 'mock' to 'unittest.mock'
unit tests in ceph-volume was still using the external 'mock' library
for unit tests, which is unnecessary since 'unittest.mock' is part
of the Python standard library (available since Python 3.3).
This commit updates all imports to use 'unittest.mock' instead,
ensuring better maintainability and removing the need for an extra
dependency.
This refactors `get_physical_osds()`.
The calculation of `data_slots` is now more concise. The handling of
`dev_size`, `rel_data_size`, and `abs_size` is standardized.
The initialization of `free_size` is moved outside the loop
for clarity. Redundant checks and assignments are removed to simplify
the code.
ceph-volume: support splitting db even on collocated scenario
This change enables ceph-volume to create OSDs where the DB is
explicitly placed on a separate LVM partition, even in collocated
scenarios (i.e., block and DB on the same device).
This helps mitigate BlueStore fragmentation issues.
Given that ceph-volume can't automatically predict a proper default size for the db device,
the idea is to use the `--block-db-size` parameter:
Passing `--block-db-size` and `--db-devices` makes ceph-volume create db devices
on dedicated devices (current implementation):
```
Total OSDs: 2
Type Path LV Size % of device
----------------------------------------------------------------------------------------------------
data /dev/vdb 200.00 GB 100.00%
block_db /dev/vdd 4.00 GB 2.00%
----------------------------------------------------------------------------------------------------
data /dev/vdc 200.00 GB 100.00%
block_db /dev/vdd 4.00 GB 2.00%
```
Passing `--block-db-size` without `--db-devices` makes ceph-volume create a separate
LV for db device on the same device (new behavior):
```
Total OSDs: 2
Type Path LV Size % of device
----------------------------------------------------------------------------------------------------
data /dev/vdb 196.00 GB 98.00%
block_db /dev/vdb 4.00 GB 2.00%
----------------------------------------------------------------------------------------------------
data /dev/vdc 196.00 GB 98.00%
block_db /dev/vdc 4.00 GB 2.00%
```
This new behavior is supported with the `--osds-per-device` parameter:
```
Total OSDs: 4
Type Path LV Size % of device
----------------------------------------------------------------------------------------------------
data /dev/vdb 96.00 GB 48.00%
block_db /dev/vdb 4.00 GB 2.00%
----------------------------------------------------------------------------------------------------
data /dev/vdb 96.00 GB 48.00%
block_db /dev/vdb 4.00 GB 2.00%
----------------------------------------------------------------------------------------------------
data /dev/vdc 96.00 GB 48.00%
block_db /dev/vdc 4.00 GB 2.00%
----------------------------------------------------------------------------------------------------
data /dev/vdc 96.00 GB 48.00%
block_db /dev/vdc 4.00 GB 2.00%
```
Nizamudeen A [Thu, 20 Feb 2025 09:10:28 +0000 (14:40 +0530)]
Merge pull request #61225 from rhcs-dashboard/rgw-ratelimit-integration1
mgr/dashboard: Rgw ratelimit feature for user and bucket
Reviewed-by: Aashish Sharma <aasharma@redhat.com> Reviewed-by: Ankush Behl <cloudbehl@gmail.com> Reviewed-by: Mark Nelson <mnelson@redhat.com> Reviewed-by: Nizamudeen A <nia@redhat.com> Reviewed-by: Naman Munet <nmunet@redhat.com>
Ronen Friedman [Mon, 17 Feb 2025 14:58:41 +0000 (08:58 -0600)]
qa/standalone/scrub: fix osd-scrub-repair()
following changes to 'scrub while recovering' logic, the
'what type of scrubs are allowed to run when recovering'
tests were broken, and are now fixed.
Expand scrub-helpers.sh::standard_scrub_cluster() to cater for
non-standard (i.e. - not "3") pool default size. Also - to
allow clients to specify a "nopool" pool name, preventing the
automatic creation of a pool.
The option was used to allow repair to be explicitly ordered by the
operator, even if the Primary OSD was in the middle of a recovery.
This is no longer necessary, as the code now accepts both repair and
scrub operator requests, even during recovery.
mgr/dashboard: add actions to create, edit and delete smb join-auth and usersgroups resources
Add join-auth and usersgroups resources management and improve the way to select those from the smb cluster form using a dropdown.
Add option to navigate to join-auth/usersgroups resource create form from smb form
Add some additional fixes left over from previous work, such as adding helper texts or adding missing smb cluster form fields
Fixes: https://tracker.ceph.com/issues/69483 Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
Ronen Friedman [Thu, 20 Feb 2025 08:01:44 +0000 (10:01 +0200)]
Merge pull request #61812 from ronen-fr/wip-rf-fstab
qa/standalone: do not use /etc/fstab as an always-there bytes source Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Max Kellermann [Mon, 17 Feb 2025 07:30:18 +0000 (08:30 +0100)]
include/unordered_{map,set}: remove, use `std` directly instead
This is only an alias for the `std` classes anyway. This effectively
reverts commit 8e8672047ccc which added these aliases, probably
because C++11 was new and not all compilers supported it properly, but
that was 12 years ago and we're onl C++20 meanwhile.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Ronen Friedman [Thu, 13 Feb 2025 16:53:53 +0000 (10:53 -0600)]
qa/standalone: do not use /etc/fstab as an always-there bytes source
Multiple tests use /etc/fstab when a small data file is
required as input. After all, as some comments say:
# something that is always there
Alas - it's not always there. Not in containers.
Replacing with a newly-created temporary file filled with
random bytes.
For completeness - replacing similar references to
/etc/resolv.conf (as a source for random objects) in
the standalone tests, too.
See: https://github.com/llvm/llvm-project/commit/f46d1463b835560d90ad3ac02b63c771e4ebe566
```
common/interruptible_future.h:1182:16: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
1182 | ).template handle_interruption(std::move(efunc));
| ^
1 error generated.
```
Matan Breizman [Mon, 17 Feb 2025 10:00:34 +0000 (10:00 +0000)]
crimson/common/operation: fix decltype usage
```
ceph/src/crimson/common/operation.cc
In file included from /home/matan/ceph/src/crimson/common/operation.cc:4:
/home/matan/ceph/src/crimson/common/operation.h:312:31: error: no member named 'events' in 'AggregateBlockingEvent<T>'
312 | typename decltype(event.events)::iterator iter;
| ~~~~~ ^
1 error generated.
```
Ilya Dryomov [Tue, 18 Feb 2025 16:51:47 +0000 (17:51 +0100)]
test/rbd_mirror: clear Namespace::s_instance at the end of a test
TestMockPoolReplayer.Namespaces and NamespacesError tests leave behind
a dangling pointer to a stack-allocated MockNamespace which leads to an
easily reproducible use-after-free and segfault when tests are shuffled.
Zac Dover [Tue, 18 Feb 2025 13:44:15 +0000 (23:44 +1000)]
doc/mgr: edit grammar and formatting of rgw.rst
Improve the grammar and correct the formatting of the "Upgrading root ca
certificates" procedure that was added to the documentation in https://github.com/ceph/ceph/pull/61867
Naman Munet [Wed, 22 Jan 2025 10:59:20 +0000 (16:29 +0530)]
mgr/dashboard: Add confirmation textbox for resource name on delete action
Before:
=====
User was able to delete a single or multiple critical resources like ( images, snapshots, subvolumes, subvolume-groups, pools, hosts , OSDs, buckets, file system, services ) by just clicking on a checkbox.
After:
=====
User now has to type the resource name that they are deleting in the textbox on the delete modal, and then only they will be able to delete the critical resource.
Also from now onwards multiple selection for deletions of critical resources is not possible. Hence, user can delete only single resource at a time. On the other side, non-critical resources can be deleted in one go.