Commit Graph

142539 Commits

Author SHA1 Message Date
John Mulligan
e71e7c1445 pybind/mgr/cephadm: fix incorrect return type
Found using mypy 0.990. Newer versions of mypy see that the callback
function passed to `addFilter` are expected to return a bool.  Update
`cherrypy_filter` to do have the correct type.

I did not try to fix the issue that this same function seems copy-pasted
into three different files. >:-}

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-01-23 09:45:40 -05:00
John Mulligan
c14287f749 pybind/mgr/orchestrator: workaround spurious mypy issue
When run locally mypy complains about the `name` field, possibly due to
us using an old mypy version on newer versions of python (we're stuck on
a Sept. 2022 version if you weren't aware). However, this could still be
an issue in mypy as there are open issues related to the `.name` field
of an enum. Regardless, we wouldn't know - so just work around it.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-01-23 09:45:40 -05:00
John Mulligan
f557827011 src/mypy.ini: disable namespace packages
Configure mypy not to use namespace packages as the cython source dirs
in src/pybind/{cephfs,rados,rbd}, etc. confuse mypy into thinking
it's an empty namespace package rather than a missing module.
Found using mypy 0.990.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-01-23 09:45:40 -05:00
Casey Bodley
aa42bf14cf
Merge pull request #55277 from yuvalif/wip-yuval-63578
rgw/lua: fix compilation issue when lua packages are disabled

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2024-01-23 14:18:22 +00:00
Yuval Lifshitz
e539ca98d6 rgw/lua: fix compilation issue when lua packages are disabled
Fixes: https://tracker.ceph.com/issues/63578#change-253102

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2024-01-23 11:09:26 +00:00
Ronen Friedman
ee8e4150e4
Merge pull request #55107 from ronen-fr/wip-rf-rm-penaltyq
osd/scrub: remove the 'penalty queue' from the scrubber

Reviewed-by: Samuel Just <sjust@redhat.com>-
2024-01-23 07:57:39 +02:00
zdover23
27a0fc52f1
Merge pull request #55269 from zdover23/wip-doc-2024-01-23-radosgw-admin-read-write-global-rate-limit-config
doc/radosgw: edit "read/write global rate limit" admin.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2024-01-23 12:31:46 +10:00
Zac Dover
c67a5e5d4b doc/radosgw: edit "read/write global rate limit" admin.rst
Edit "Reading/Writing Global Rate Limit Configuration" in
doc/radosgw/admin.rst.

Signed-off-by: Zac Dover <zac.dover@proton.me>
2024-01-23 12:13:10 +10:00
Samuel Just
e50c80d682
Merge pull request #55223 from athanatos/sjust/wip-64055
crimson: clear obc_registry on interval change

Reviewed-by: Matan Breizman <mbreizma@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2024-01-22 13:26:19 -08:00
Yuri Weinstein
18149a703b
Merge pull request #55070 from pdvian/wip-fix-progressevent
mon: initialize ProgressEvent::add_to_ceph_s

Reviewed-by: Laura Flores <lflores@redhat.com>
2024-01-22 08:18:41 -08:00
Yuri Weinstein
4bc02269cb
Merge pull request #53154 from ifed01/wip-ifed-no-death-tests
test/store_test: get rid off assert_death.

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
2024-01-22 08:17:35 -08:00
Yuri Weinstein
9ea5edeb04
Merge pull request #49415 from ljflores/wip-update-telemetry-upgrade
qa/workunits: update telemetry quincy workunits with `basic_pool_options_bluestore` collection

Reviewed-by: Yaarit Hatuka <yaarithatuka@gmail.com>
2024-01-22 08:13:17 -08:00
Ronen Friedman
375d01a6aa osd/scrub: update job's NB on failure
When a scrub job fails, update its NB to the current time plus a
fixed delay.  This prevents the job from being scheduled again
immediately.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2024-01-22 08:29:35 -06:00
Ronen Friedman
af8939dd88 osd/scrub: fix set_last_deep_scrub_stamp()
The call should update last_scrub_stamp, too, without
requiring an extra call to on_scrub_schedule_input_change()

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2024-01-22 08:29:25 -06:00
Ronen Friedman
d294ea80cc osd/scrub: introduce a 'not before' attribute for scrub jobs
The NB enables the OSD to delay the next attempt to schedule a specific
scrub job.  This is useful for jobs that have failed for whatever
reason, especially if the primary has failed to acquire the replicas.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2024-01-22 07:25:25 -06:00
Ronen Friedman
e60c698338 osd/scrub: remove the 'penalized jobs' queue
The 'penalized jobs' queue was used to track scrub jobs that had failed
to acquire their replicas, and to prevent those jobs from being retried
too quickly.  This functionality will be replaced by a
simple 'not before' delay (see the next commits).

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2024-01-22 07:25:25 -06:00
Matan Breizman
62be5c7cae
Merge pull request #55262 from Matan-B/wip-matanb-crimson-bluestore-submit
crimson/os/alienstore/alien_log: _flush concurrently

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
2024-01-22 10:44:23 +02:00
Matan Breizman
511af83e27 crimson/os/alienstore/alien_log: _flush concurrently
In continuation to c15e56e386

Authored-by: Yingxin Cheng <yingxin.cheng@intel.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2024-01-21 09:48:39 +00:00
zdover23
f265c99628
Merge pull request #55190 from zdover23/wip-doc-2024-01-16-radosgw-admin-enable-disable-bucket-rate-limit
doc/radosgw: edit "Enable/Disable Bucket Rate Limit"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2024-01-21 19:47:10 +10:00
Matan Breizman
5ba24c0454
Merge pull request #53288 from rzarzynski/wip-crimson-dont-shadow-store-in-ecbackend
crimson: drop store from ECBackend to not shadow PGBackend::store

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
2024-01-21 10:44:29 +02:00
Matan Breizman
5365f70a92
Merge pull request #54813 from amathuria/wip-crimson-amat-fix-config-set-cmd
src/crimson: Add support for the OSD to receive config changes

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
2024-01-21 10:43:59 +02:00
Ilya Dryomov
5cbc4d7e7d
Merge pull request #55127 from idryomov/wip-63341
librbd: improve rbd_diff_iterate2() performance in fast-diff mode

Reviewed-by: Mykola Golub <mgolub@suse.com>
2024-01-20 18:43:35 +01:00
Ilya Dryomov
40e8813e9c PendingReleaseNotes: add rbd_diff_iterate2 note
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
89b0d9e7b4 librbd: try to preserve object map for diff-iterate in fast-diff mode
As an optimization, try to ensure that the object map for the end
version is preloaded through the acquisition of exclusive lock and
as a consequence remains around until exclusive lock is released.
If it's not around, DiffRequest would (re)load it on each call.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
0c4bb58c90 librbd/object_map: potentially use in-memory object map in DiffRequest
If the object map for the end version is around (already loaded in
memory, either due to the end version being a snapshot or due to
exclusive lock being held), use it to run diff-iterate against the
beginning of time.  Since it's the only object map needed in that
case, such calls would be satisfied locally.

Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
dabb677ba5 librbd/object_map: decouple object map processing in DiffRequest
In preparation for potentially using in-memory object map, decouple
object map processing from loading object maps and place the logic in
prepare_for_object_map() and process_object_map().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
45d534553a common/bit_vector: fix iterator vs reference constness confusion
T (ConstIterator or Iterator) is confused with const T here:
IteratorImpl dereference operator is wrongly overloaded on const
and returns Reference instead of ConstReference for ConstIterator.
This then fails inside bufferlist bowels because Reference is
incompatible with bufferlist::const_iterator.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
232ad1a5fb librbd/object_map: make object map in handle_load_object_map() local
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
275a299cd4 librbd/object_map: don't resize object map in handle_load_object_map()
Currently it's done in two cases:

- if the loaded object map is larger than expected based on byte size,
  it's truncated to expected number of objects
- in case of deep-copy, if the loaded object map is smaller than diff
  state, it's expanded to get "track the largest of all versions in the
  set" semantics

Both of these cases can be easily dealt with without modifying the
object map.  Being able to process a const object map is needed for
working on in-memory object map which is external to DiffRequest.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
2ab5b52f71 common/bit_vector: fix IteratorImpl post-increment operator
It's totally broken: instead of returning the current position and
moving to the next position, it returns the next position and doesn't
move anywhere.  Luckily it hasn't been used until now.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
1503b96bf9 librbd: drop DiffIterate::diff_object_map() declaration
This is a leftover from commit 2b3a46801d ("librbd: switch
diff-iterate API to use new object-map diff helper").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
7677d4b1b5 librbd: propagate diff-iterate range to parent in fast-diff mode
When getting parent diff, pass the overlap-reduced image extent instead
of the entire 0..overlap range to avoid a similar quadratic slowdown on
cloned images.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
0b5ba5fedf librbd/object_map: add support for ranged diff-iterate
Currently diff-iterate in fast-diff mode is performed on the entire
image no matter what image extent is passed to the API.  Then, unused
diff just gets discarded as DiffIterate ends up querying only objects
that the passed image extent maps to.  This hasn't been an issue for
internal consumers ("rbd du", "rbd diff", etc) because they work on the
entire image, but turns out to lead to quadratic slowdown in some QEMU
use cases.

0..UINT64_MAX range is carved out for deep-copy which is unranged by
definition.  To get effectively unranged diff-iterate, 0..UINT64_MAX-1
range can be used.

Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
94bf3a5d74 include/intarith: introduce round_down_to()
Same as with round_up_to(), d isn't required to be a power of two.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
9931282bfd test/librbd: expand TestMockObjectMapDiffRequest edge case coverage
For each covered edge case or error, run through the following
scenarios:

- where the edge case concerns snap_id_start
- where the edge case concerns snap_id_end
- where the edge case concerns intermediate snapshot and
  snap_id_start == 0 (diff against the beginning of time)
- where the edge case concerns intermediate snapshot and
  snap_id_start != 0 (diff from snapshot)

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
23c675f04a librbd/object_map: allow intermediate snaps to be skipped on diff-iterate
In case of diff-iterate against the beginning of time, the result
depends only on the end version.  Loading and processing object maps
or intermediate snapshots is redundant and can be skipped.

This optimization is made possible by commit be507aaed1 ("librbd:
diff-iterate shouldn't ever report "new hole" against a hole") and, to
a lesser extent, the previous commit.

Getting FastDiffInvalid, LoadObjectMapError and ObjectMapTooSmall to
pass required tweaking not just expectations, but also start/end snap
ids and thus also the meaning of these tests.  This is addressed in the
next commit.

Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
19c7c4a535 librbd/object_map: resurrect diff-iterate behavior when image is shrunk
The new "track the largest of all versions in the set, diff state is
only ever grown" semantics introduced in commit 330f2a7bb9 ("librbd:
helper state machine for computing diffs between object-maps") don't
make sense for diff-iterate.  It's a waste because DiffIterate won't
query beyond the end version size -- this is baked into the API.

Limit this behavior to deep-copy and resurrect the original behavior
from 2015 for diff-iterate.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
34386d29a8 librbd/object_map: fix diff from snapshot when image is grown
Commit 399a45e113 ("librbd/object_map: rbd diff between two
snapshots lists entire image content") fixed most of the damage caused
by commit b81cd2460d ("librbd/object_map: diff state machine should
track object existence"), but the case of a "resize diff" when diffing
from snapshot was missed.  An area that was freshly allocated in image
resize is the same in principle as a freshly created image and objects
marked OBJECT_EXISTS_CLEAN are no exception.  Diff for such objects in
such an area should be set to DIFF_STATE_DATA_UPDATED, however
currently when diffing from snapshot, it's set to DIFF_STATE_DATA.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
4e036d65b9 librbd/object_map: drop bogus if in handle_load_object_map()
It became redundant with commit b81cd2460d ("librbd/object_map: diff
state machine should track object existence") -- it != end_it condition
in the loop is sufficient.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
718f6b5546 test/librbd: refactor TestMockObjectMapDiffRequest tests
In preparation for multiple similarly configured MockTestImageCtx
objects being used in a single test, centralize their creation and add
a couple of helpers for setting expectations from a callback.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
64a5afcaad test/librbd: improve TestMockObjectMapDiffRequest.InvalidStartSnap
Use a range where only snap_id_start is invalid.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
zdover23
010b1fb4e7
Merge pull request #55177 from zdover23/wip-doc-2024-01-15-radosgw-admin-get-bucket-rate-limit
doc/radosgw: edit admin.rst "Get Bucket Rate Limit"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2024-01-20 17:34:44 +10:00
Zac Dover
7c4fdd3762 doc/radosgw: edit admin.rst "Get Bucket Rate Limit"
Edit "Get Bucket Rate Limit" in doc/radosgw/admin.rst.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
2024-01-20 16:55:56 +10:00
Samuel Just
b6436f47e8 crimson/osd/ops_executor: simplify prepare_clone, use set_clone_state
- Remove static_snap_oi name -- left over from old classic implementation,
  misleading.
- OpsExecutor::prepare_clone can only be invoked on a primary, remove
  the branch.
- Create the obs directly and pass to obc via set_clone_state, which
  sets fully_loaded.

Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-19 17:42:09 -08:00
Samuel Just
83d535cd27 crimson/osd: invalidate contents of obc_registry on interval_change
We can't guarantee that all continuations will complete before on_flush,
so we unhook and invalidate all live obcs from the registry upon
interval_change.  As long as any lingering continuations simply note the
interval change and terminate, this should be safe.

Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-19 17:42:06 -08:00
Venky Shankar
d7e2a322a5 Merge PR #54869 into main
* refs/pull/54869/head:
	mds: dump sr objects in debug output

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2024-01-19 13:19:21 +05:30
Venky Shankar
51487f8cd2 Merge PR #54915 into main
* refs/pull/54915/head:
	doc/cephfs/client-auth.rst: correct `This so because` to  `This is because`
	doc/cephfs/client-auth.rst: correct ``fs authorize cephfs1 /dir1 client.x rw``

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-19 13:16:19 +05:30
Venky Shankar
b96f345ae9 Merge PR #54972 into main
* refs/pull/54972/head:
	src: kernel mount command returning misleading error message

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-19 13:04:18 +05:30
zdover23
6f0afdb7bd
Merge pull request #55170 from zdover23/wip-doc-2024-01-14-radosgw-admin-set-bucket-rate-limit
doc/radosgw: edit admin.rst "set bucket rate limit"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2024-01-19 15:54:08 +10:00
Samuel Just
9fd22e142f common/intrusive_lru: add clear() mechanism and state for removed items with live references
We need to be able to clear the lru without waiting for all outstanding
references to be released.  Items with such references enter an
invalidated state where references can still be added and removed with
deletion at use_count == 0, but can't be accessed any longer via the lru.

Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-18 11:56:10 -08:00