Conflicts:
qa/cephfs/overrides/ignorelist_health.yaml
- this file in main had more entries than on this (squid) branch,
resulting in cherry-picking conflict.
qa/tasks/cephfs/test_admin.py
- this file in main had more tests and a new set of test adjacent to
tests added by this patch-series, resulting in cherry-picking conflict.
Add a new command ("ceph mgr module force disable <module>") that allows
forcibly disabling an always-on module. This command should ideally only
be used to for cluster recovery.
Fixes: https://tracker.ceph.com/issues/66005 Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 9962772358048a98a6e871dccf1bfd0a15b4d791)
Rishabh Dave [Wed, 17 Jul 2024 12:35:33 +0000 (18:05 +0530)]
mon/MgrMonitor: improve a log message
Following log message has 3 distinct information (enabled modules,
modules that are alwats on and total number of commands enabled) printed
on the same line which makes it hard to find one of the information and
also makes it comparatively hard to read -
In case of corrupted data invalid iterator could be dereferenced. Fixes: https://tracker.ceph.com/issues/66361 Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit e59495b331765f4081d5aab66c939ec10b4b8344)
Aashish Sharma [Fri, 28 Feb 2025 06:12:13 +0000 (11:42 +0530)]
monitoring: Fix OSDs panel in host-details grafana dashboard
OSDs panel in host-details grafana dashboard shows total of all OSDs
across all hosts even if a particular host is selected from the
ceph_hosts filter. This PR intends to fix this issue
Kefu Chai [Sun, 30 Mar 2025 03:59:12 +0000 (11:59 +0800)]
cephfs-top: Removes unused `global` statements
Recent flake8 runs were failing with:
```
py3: flake8==7.2.0,mccabe==0.7.0,pip==25.0.1,pycodestyle==2.13.0,pyflakes==3.3.0,setuptools==75.8.0,wheel==0.45.1
py3: commands[0] /home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/cephfs/top> flake8 --ignore=W503 --max-line-length=100 cephfs-top
cephfs-top:344:9: F824 `global fs_list` is unused: name is never assigned in scope
cephfs-top:466:13: F824 `global current_states` is unused: name is never assigned in scope
cephfs-top:872:9: F824 `global metrics_dict` is unused: name is never assigned in scope
cephfs-top:872:9: F824 `global current_states` is unused: name is never assigned in scope
cephfs-top:911:9: F824 `global fs_list` is unused: name is never assigned in scope
cephfs-top:981:9: F824 `global current_states` is unused: name is never assigned in scope
cephfs-top:1126:13: F824 `global current_states` is unused: name is never assigned in scope
py3: exit 1 (0.77 seconds) /home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/cephfs/top> flake8 --ignore=W503 --max-line-length=100 cephfs-top pid=2309605
py3: FAIL code 1 (8.15=setup[7.38]+cmd[0.77] seconds)
evaluation failed :( (8.24 seconds)
```
Since these variables are only being referenced and not assigned within
their scopes, the `global` declarations are unnecessary and can be
safely removed. This change:
- Removes all flagged `global` statements
- Fixes the failing flake8 checks in the CI pipeline
- Maintains the original code behavior as variable references still work without the `global` keyword
The `global` keyword is only needed when assigning to global variables
within a function scope, not when simply referencing them.
Kefu Chai [Sun, 30 Mar 2025 03:48:28 +0000 (11:48 +0800)]
qa: Remove unnecessary global statements in tests
Removes unused `global` statements from Python test files to fix flake8
F824 errors.
Recent flake8 runs were failing with:
```
./tasks/radosgw_admin.py:330:5: F824 `global log` is unused: name is never assigned in scope
./workunits/dencoder/test_readable.py:99:5: F824 `global incompat_paths` is unused: name is never assigned in scope
./workunits/dencoder/test_readable.py:164:5: F824 `global backward_compat` is unused: name is never assigned in scope
./workunits/dencoder/test_readable.py:165:5: F824 `global fast_shouldnt_skip` is unused: name is never assigned in scope
```
Since these variables are only being referenced and not assigned within
their scopes, the `global` declarations are unnecessary and can be
safely removed. This change:
- Removes all flagged `global` statements
- Fixes the failing flake8 checks in the CI pipeline
- Maintains the original code behavior as variable references still work
without the `global` keyword
The `global` keyword is only needed when assigning to global variables
within a function scope, not when simply referencing them.
Patrick Donnelly [Mon, 24 Mar 2025 15:50:50 +0000 (11:50 -0400)]
mgr: add status command
The Rook operator relies on a `status` (asok) command to the mgr to verify it
is operational. However, this command was actually served by the CephFS
`Client` library that the ceph-mgr daemon statically linked in and used for
sending MDS commands. That statically linked client was removed via 048fc68c
(case insensitive directory tree feature).
So, add a legitimate ceph-mgr status command which simply outputs an empty
dictionary and returns success (0). TBD on adding useful information.
Fixes: 048fc68c517f50b9978457f478ca4638f01caa09 Fixes: https://tracker.ceph.com/issues/70571 Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 4a7976a57c1ff823753c1c25274b6482f0a8c8ea)
Laura Flores [Fri, 7 Mar 2025 06:22:00 +0000 (06:22 +0000)]
mon, osd: add command to remove invalid pg-upmap-primary entries
The current rm-pg-upmap-primary command checks that the pgid exists
in the pgmap before continuing to remove it. Due to https://tracker.ceph.com/issues/66867,
some invalid pg-upmap-primary entires may exist for pools that have been removed.
Currently, these mappings are impossible to remove since the pgids no longer
exist in the pgmap.
This new command, rm-pg-upmap-primary-all, allows users the ability to remove
any and all pg-upmap-primary mappings in the osdmap at once, which includes
valid and invalid entries.
This command may also be helpful when upgrading from versions where users
are plagued by https://tracker.ceph.com/issues/61948. Users may use an upgraded
mon to remove all pg-upmap-primray entries (valid and invalid) so they continue
to upgrade to a safe version.
See manual testing for this patch here: https://tracker.ceph.com/issues/67179#note-12
Fixes: https://tracker.ceph.com/issues/67179 Fixes: https://tracker.ceph.com/issues/69760 Signed-off-by: Laura Flores <lflores@ibm.com>
(cherry picked from commit 6e9e2033bf0f4779bdfac9a3a4f29115459c8c0e)
Seena Fallah [Mon, 19 Aug 2024 12:30:51 +0000 (14:30 +0200)]
rgw: respect location constraint in master zonegroup
When creating a bucket with a location constraint specified by the
user, this constraint is not included in createparams. Therefore,
to create the bucket in the requested location, createparams and
bucket_zonegroup must be replaced with the user-provided values.
Seena Fallah [Mon, 19 Aug 2024 12:15:59 +0000 (14:15 +0200)]
rgw: send self zonegroup on forward to master
When creating a bucket in the secondary zonegroup, the `rgwx-zonegroup`
is mistakenly set to the master zonegroup when forwarding the request.
Instead, it should be set to the secondary zonegroup so that the master
zonegroup creates the bucket for the intended zonegroup rather than
for itself.
Seena Fallah [Thu, 10 Oct 2024 20:55:44 +0000 (22:55 +0200)]
rgw: initialize createparams zone_placement to avoid garbage value
When creating a bucket from a secondary zonegroup and forwarding
the request to the master zonegroup
(i.e., when `bucket_zonegroup != &my_zonegroup`), the
`createparams.zone_placement` may remain uninitialized. This can
lead to garbage values and result in a segmentation fault due to
invalid memory access.
By explicitly initializing `zone_placement` to `nullptr`, we can
eliminate this issue in cases where zone_placement is referenced
like `init_default_bucket_layout`.
rgw/multisite: the create_bucket forward request omits the
the request body, thus missing some data if specified inside
CreateBucketConfiguration xml on the non-master zone.
also, now that we perform cksum validation against empty payloads,
such a request would fail with -ERR_AMZ_CONTENT_SHA256_MISMATCH due
to a zero content-length but a non-empty payload hash.
this fix ensures that request body is forwarded during create_bucket
This commit fixes documentation about many-to-many topic relationship for notifications. The current sentence states the same fact twice instead of clarifying.