Commit Graph

141745 Commits

Author SHA1 Message Date
Ilya Dryomov
cc1951a5d6
Merge pull request #54377 from baergj/fix-journal-tid-association-try2-upstream
librbd: Append one journal event per image request

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-06 21:11:19 +01:00
Casey Bodley
77e2e02079
Merge pull request #54799 from cbodley/wip-osd-scrub-signed-warning
osd/scrubber: fix signed comparison warning

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
2023-12-06 13:12:57 +00:00
Ilya Dryomov
1ce887c639
Merge pull request #54755 from idryomov/wip-63654
librbd: fix regressions in ObjectListSnapsRequest

Reviewed-by: Mykola Golub <mgolub@suse.com>
2023-12-06 11:49:32 +01:00
Nizamudeen A
1039443c0f
Merge pull request #54804 from rhcs-dashboard/upgrade-grafana-9.4.12
monitoring: upgrade grafana container to 9.4.12

Reviewed-by: Ankush Behl <cloudbehl@gmail.com>
2023-12-06 15:38:41 +05:30
Ilya Dryomov
05c4c92505
Merge pull request #54670 from trociny/wip-cython-3
pybind/rbd: fix compilation with cython3

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-06 10:52:09 +01:00
zdover23
7aa81b735d
Merge pull request #54790 from zdover23/wip-doc-2023-12-05-radosgw-rgw-cache-nginx-link-update
doc/radosgw: update link in rgw-cache.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2023-12-06 09:32:27 +01:00
Yuval Lifshitz
70fbeb1746
Merge pull request #54215 from kchheda3/wip-fix-kafka-break
rgw/notification: Kafka persistent notifications not retried and removed even when the broker is down 

reviewd-by: cbodley, yuvalif
2023-12-06 10:21:42 +02:00
Nizamudeen A
dd0a5aac96 monitoring: upgrade grafana container to 9.4.12
Fixes the CVEs mentioned here: https://grafana.com/blog/2023/06/06/grafana-security-release-new-grafana-versions-with-security-fixes-for-cve-2023-2183-and-cve-2023-2801/

Signed-off-by: Nizamudeen A <nia@redhat.com>
2023-12-06 11:56:44 +05:30
Casey Bodley
8cd25c3624
Merge pull request #54787 from cbodley/wip-versioned-variant-inline
common: use inline for monostate dencoders

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2023-12-06 01:55:57 +00:00
Joshua Baergen
7436b4c990 test/librbd: Add workaround for a journaling deadlock that this test exposes
Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
2023-12-05 14:25:46 -07:00
Joshua Baergen
4a8fa2da72 librbd: Append one journal event per image request
In the case where an image request is split across multiple object
extents and journaling is enabled, multiple journal events are appended.
Prior to this change, all object requests would wait for the last
journal event to complete, since journal events complete in order and
thus the last one completing implies that all prior journal events were
safe at that point.

The issue with this is that there's nothing stopping that last journal
event from being cleaned up before all object requests have stopped
referring to it. Thus, it's entirely possible for the following sequence
to occur:
1. An image request gets split into two image extents and two object
   requests. Journal events are appended (one per image extent).
2. The first object request gets delayed due to an overlap, but the
   second object request gets submitted and starts waiting on the last
   journal event (which also causes a C_CommitIOEvent to be instantiated
   against that journal event).
3. Journaling completes, and the C_CommitIOEvent fires. The
   C_CommitIOEvent covers the entire range of data that was journaled in
   this event, and so the event is cleaned up.
4. The first object request from above is allowed to make progress; it
   tries to wait for the journal event that was just cleaned up which
   causes the assert in wait_event() to fire.

As far as I can tell, this is only possible on the discard path today,
and only recently. Up until 21a26a7528
(librbd: Fix local rbd mirror journals growing forever), m_image_extents
always contained a single extent for all I/O types; this commit changed
the discard path so that if discard granularity changed the discard
request, m_image_extents would be repopulated, and if the request
happened to cross objects then there would be multiple m_image_extents.

It appears that the intent here was that there should be one journal
event per image request and the pending_extents kept track of what had
completed thus far. This commit restores that 1:1 relationship.

Fixes: https://tracker.ceph.com/issues/63422
Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
2023-12-05 14:25:46 -07:00
Joshua Baergen
9fae091ea2 librbd: Change append_io_events() to take Extents
An upcoming commits will use this to change how multi-extent image
requests are appended to the journal.

Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
2023-12-05 14:25:46 -07:00
Joshua Baergen
a0ccd8bb3f librbd: Eliminate unused m_synchronous from AbstractImageWriteRequest
This has been unused since its introduction years ago and so isn't worth
keeping.

Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
2023-12-05 14:25:46 -07:00
Joshua Baergen
e8d54e3c9f test/librbd: Add a stress test that reproduces a crash during discard journaling
See the comments in DiscardWithPruneWriteOverlap for details.

Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
2023-12-05 14:25:46 -07:00
Casey Bodley
07a4a9bdfc osd/scrubber: fix signed comparison warning
[681/1140] Building CXX object src/osd/CMakeFiles/osd.dir/scrubber/scrub_resources.cc.o
src/osd/scrubber/scrub_resources.cc: In member function ‘bool Scrub::ScrubResources::inc_scrubs_remote(pg_t)’:
src/osd/scrubber/scrub_resources.cc:84:18: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘const int64_t’ {aka ‘const long int’} [-Wsign-compare]
   84 |   if (pre_op_cnt < conf->osd_max_scrubs) {
      |       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-12-05 16:12:59 -05:00
Zac Dover
e80d560d97 doc/radosgw: update link in rgw-cache.rst
Update link in doc/radosgw/rgw-cache.rst. The link updated here is a
link to all the Nginx configuration files. The old link was broken. This
update comes to us from an anonymous report on
https://pad.ceph.com/p/Report_Documentation_Bugs.

Signed-off-by: Zac Dover <zac.dover@proton.me>
2023-12-05 20:46:26 +01:00
Casey Bodley
0179a8ea2f common: use inline for monostate dencoders
fix a 'multiple definition' error when included by multiple sources:

src/common/versioned_variant.h:31: multiple definition of `ceph::encode(std::monostate const&, ceph::buffer::v15_2_0::list&)';
rgw_main.cc.o:src/common/versioned_variant.h:31: first defined here

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-12-05 12:21:27 -05:00
Ilya Dryomov
93ff7fe6e4 test/librbd: drop DiffIterateTest.DiffIterateRegression6926
This was added to test [1].  It's duplicated by several cases in
DiffIterateTest.DiffIterateDeterministicPP now.  Specifically, the
issue could be reproduced by any of:

    (8) beginning of time -> snap2
    (9) snap1 -> snap2
    (10) beginning of time -> snap1

[1] https://tracker.ceph.com/issues/6926

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-05 16:58:32 +01:00
Ilya Dryomov
356ac6a547 test/librbd: drop TestLibRBD.SnapDiff
This was added to integration test [1], separate from the fix which
went in only with unit test adjustments.  It's duplicated by several
cases in DiffIterateTest.DiffIterateDeterministic now.  Specifically,
the issue could be reproduced by any of:

    (3) snap2 -> HEAD
    (4) snap3 -> HEAD
    (7) snap2 -> snap3

[1] https://tracker.ceph.com/issues/50787

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-05 16:58:32 +01:00
Ilya Dryomov
f5e3f26372 test/librbd: add DiffIterateTest.DiffIterateDeterministic{,PP}
scribble()-based DiffIterate tests are too weak: at least two
regressions that should been caught by DiffIterate.DiffIterate or
DiffIterate.DiffIterateStress were missed [1][2].  Aside from the
randomness which can be both a good and a bad thing, asserts there
ensure only that the returned diff covers all changes that were made.
If the returned diff is too excessive or otherwise bogus, this isn't
detected [3].

Add a deterministic test to systematically cover the most common cases
that don't involve discards.  A similar test for discards will be added
with the fix for [4].

Comment out debug log in vector_iterate_cb() like it's done in
iterate_cb().

[1] https://tracker.ceph.com/issues/50787
[2] https://tracker.ceph.com/issues/63654
[3] https://tracker.ceph.com/issues/63719
[4] https://tracker.ceph.com/issues/53897

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-05 16:58:32 +01:00
Nizamudeen A
f64ad4406c
Merge pull request #54068 from rhcs-dashboard/rgw-roles-update
mgr/dashboard: add support for editing and deleting rgw roles 

Reviewed-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
2023-12-05 13:39:00 +05:30
zdover23
b393ea035a
Merge pull request #54774 from sinashan/main
doc: Fixes two typos and grammatical errors. Signed-off-by: Sina Ahma…

Reviewed-by: Zac Dover <zac.dover@proton.me>
2023-12-04 20:41:46 +01:00
sinashan
bc39adceba doc: Fixes two typos and grammatical errors. Signed-off-by: Sina Ahmadi <sinatak1373@live.com> 2023-12-04 14:02:54 -05:00
Ilya Dryomov
d9147a14c4
Merge pull request #54205 from VallariAg/wip-nvmeof-test
qa: add rbd/nvmeof integration test

Reviewed-by: Zack Cerza <zack@redhat.com>
Reviewed-by: Aviv Caro <Aviv.Caro@ibm.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-04 18:14:38 +01:00
Mykola Golub
e3156050d0 pybind/rbd: make cdef functions not propagate exceptions by default
Setting legacy_implicit_noexcept compiler directive to True will cause
Cython 3.0 to have the same semantics as Cython 0.x.

Fixes: https://tracker.ceph.com/issues/62140
Signed-off-by: Mykola Golub <mgolub@suse.com>
2023-12-04 16:04:55 +00:00
Mykola Golub
55b3be5234 test/pybind/rbd: test callbacks raising exceptions
Signed-off-by: Mykola Golub <mgolub@suse.com>
2023-12-04 16:04:55 +00:00
Vallari Agrawal
42e121a42a
qa: add rbd/nvmeof test
A basic test for ceph-nvmeof[1] where
nvmeof initiator is created.
It requires use of a new task "nvmeof_gateway_cfg"
under cephadm which shares config information
between two remote hosts.

[1] https://github.com/ceph/ceph-nvmeof/

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
2023-12-04 19:27:54 +05:30
Adam King
1680e466aa
Merge pull request #54441 from phlogistonjohn/jjm-cephadm-breakup
cephadm: break various daemon type classes out to smaller files in cephadmlib

Reviewed-by: Adam King <adking@redhat.com>
2023-12-04 07:32:52 -05:00
Adam King
a1a2252f7f
Merge pull request #54679 from Suyashd999/add-rgw
src/cephadm: Added rgw for listing in Daemons

Reviewed-by: Adam King <adking@redhat.com>
2023-12-04 07:26:13 -05:00
Nizamudeen A
4b7bfdaa00
Merge pull request #54076 from rhcs-dashboard/subvolume-snapshot
mgr/dashboard: cephfs subvolume list snapshots

Reviewed-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
Reviewed-by: Ankush Behl <cloudbehl@gmail.com>
Reviewed-by: ivoalmeida <NOT@FOUND>
2023-12-04 14:12:51 +05:30
Anthony D'Atri
e89bb53732
Merge pull request #54758 from zdover23/wip-doc-2023-12-03-rados-stretch-mode-repair-of-54689
doc/rados: repair stretch-mode.rst
2023-12-03 09:40:46 -05:00
Zac Dover
b73656787d doc/rados: repair stretch-mode.rst
Remove a section of doc/rados/operations/stretch-mode.rst that I wrongly
re-included after its removal. The request for this (re)-removal is
here: https://github.com/ceph/ceph/pull/54689#discussion_r1413007655.

Signed-off-by: Zac Dover <zac.dover@proton.me>
2023-12-03 13:17:46 +01:00
Matan Breizman
67b75549b3
Merge pull request #54437 from Matan-B/wip-matanb-crimson-osdmap-trimming
crimson/osd: introduce osdmap trimming 

Reviewed-by: Samuel Just <sjust@redhat.com>
2023-12-03 10:06:33 +02:00
Ronen Friedman
65945407ac
Merge pull request #53712 from ronen-fr/wip-rf-move-1
osd: fix a missing 'noexcept' on a move ctor

Reviewed-by: Samuel Just <sjust@redhat.com>
2023-12-03 09:51:41 +02:00
Ronen Friedman
8ec47bba09
Merge pull request #54482 from ronen-fr/wip-rf-repl-hp
osd/scrub: decouple being reserved from handling scrub requests

Reviewed-by: Samuel Just <sjust@redhat.com>
2023-12-03 09:45:18 +02:00
zdover23
28f26d87b3
Merge pull request #54689 from PC-Admin/update-stretch-mode-docs
doc/rados: Update stretch mode docs.

Reviewed-by: Zac Dover <zac.dover@gmail.com>
2023-12-03 06:56:59 +01:00
PC-Admin
28551b41f8 doc/rados: update "stretch mode"
Update stretch mode docs, min_size and max_size are no longer defined in
the CRUSH map and the example rule given will fail to compile.

Specify that the tiebreaker data centre cannot be defined in CRUSH as
this produces an error.

Signed-off-by: Michael Collins <perthserverplus@gmail.com>
2023-12-03 06:45:16 +01:00
Ronen Friedman
084fb34971 osd: fix a missing 'noexcept' on a move ctor
as a non-default, non-noexcept move ctor is ignored by
stl containers.

See clang-tidy's performance-noexcept-move-constructor

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2023-12-02 16:36:30 +02:00
Ilya Dryomov
0a1f633e02 librbd: fix read_whole_object handling in ObjectListSnapsRequest
Originally, in commit 2be4840afd ("librados/snap_set_diff: don't
assert on empty snapset"), exists was set to true.  This didn't make
ObjectListSnapsRequest, causing the following deep-copy tests to fail
when run against calc_snap_set_diff() rigged to return "whole object"
as described in [1]:

    TestDeepCopy.Snaps
    TestDeepCopy.SnapDiscard
    TestDeepCopy.CloneHideParent
    TestDeepCopy.Snaps_LargerDstObjSize
    TestDeepCopy.Snaps_SmallerDstObjSize

This is a regression introduced in commit cc87a8bd69 ("librbd:
deep-copy object utilizes image-extent IO methods") by way of commit
11923e234e ("librbd: generic object list snapshot request").

[1] https://github.com/ceph/ceph/pull/20648#issuecomment-369292309

Fixes: https://tracker.ceph.com/issues/63654
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-02 13:50:04 +01:00
Ilya Dryomov
8f86d80614 librbd: fix LIST_SNAPS_FLAG_WHOLE_OBJECT behavior
Bundling read_whole_object and LIST_SNAPS_FLAG_WHOLE_OBJECT cases
together is wrong:

- In read_whole_object case, calc_snap_set_diff() sets just
  read_whole_object.  Everything else is zeroed out and may require
  resetting to fit with the rest of ObjectListSnapsRequest logic.

- In LIST_SNAPS_FLAG_WHOLE_OBJECT case, only the diff should be
  expanded.  Everything else is set by calc_snap_set_diff() and should
  be used as is.  This goes for end_size in particular -- if it's reset
  to object size, bogus zero extents may be returned as the object
  would appear to have grown.

This is a regression introduced in commit 4429ed4f3f ("librbd: switch
diff iterate API to use new snaps list dispatch methods") by way of
commit 66dd53d9c4 ("librbd: optionally return full object extent for
any snapshot deltas").

Fixes: https://tracker.ceph.com/issues/63654
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-02 13:50:04 +01:00
Ilya Dryomov
bd52297a71 test/librbd: make ListSnapsWholeObject actually test stuff
Despite being added in commit 66dd53d9c4 ("librbd: optionally return
full object extent for any snapshot deltas") ostensibly to test the new
LIST_SNAPS_FLAG_WHOLE_OBJECT code, it surely doesn't do that because
the flag isn't even passed to MockObjectListSnapsRequest::create().

I can only guess, but it looks like snap ID 3 was intended to be
a starting point.  Otherwise, with 0 and CEPH_NOSNAP passed as snap
IDs, the overlap that is set up for the clone wouldn't affect the
computation in any way.

Use snap ID 3 as a starting point and run both with and without
LIST_SNAPS_FLAG_WHOLE_OBJECT on the same snapset to pinpoint the
difference.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-02 13:50:04 +01:00
Ilya Dryomov
c074792204 librados/snap_set_diff: set end_size only if end object exists
Since commit 73f50a1310 ("rbd-mirror: use generalized deep copy for
image sync"), the only user of calc_snap_set_diff() immediately unsets
end_size otherwise.

calc_snap_set_diff() semantics are clearer if end_size is set together
with end_exists and clone_end_snap_id.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-12-02 13:50:04 +01:00
zdover23
171d2b5b38
Merge pull request #54752 from zdover23/wip-doc-2023-12-02-radosgw-multisite-formatting
doc/radosgw: fix formatting

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2023-12-02 07:22:12 +01:00
Zac Dover
08ac3114e9 doc/radosgw: fix formatting
Repair the formatting of a string that had a string inside backticks
that itself was inside double asterisks. The presence of the asterisks
around the entire string caused the backticks to appear in the rendered
documentation.

Signed-off-by: Zac Dover <zac.dover@proton.me>
2023-12-02 06:38:28 +01:00
Casey Bodley
b27938f5f1
Merge pull request #54526 from cbodley/wip-rgw-acl-cleanup
rgw/acl: clean up RGWAccessControlPolicy and friends

Reviewed-by: Yuval Lifshitz <ylifshit@redhat.com>
2023-12-01 16:46:33 +00:00
Casey Bodley
22a3208a1e
Merge pull request #54488 from cbodley/wip-versioned-variant
common: add versioned encodings for std::variant

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2023-12-01 16:02:20 +00:00
Ronen Friedman
6f1e0e6825 tests/scrub: deactivate osd-scrub-dump stand-alone test
as the scrub reservation changes had made it obsolete.
Note - it is not an issue of fixing the test, but rather
that the tested functionality is no longer there.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2023-12-01 08:48:49 -06:00
Casey Bodley
b7e1c1d59c common: add generate_test_instances() for std::variant
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-12-01 08:52:31 -05:00
Casey Bodley
8e92cbac3e common: add versioned encodings for std::variant
adds two encoding strategies for `std::variant<>` under the namespaces
`ceph::versioned_variant` and `ceph::converted_variant`

these versioned encodings allow the variant to be extended with new
types, provided that they're always added to the end without changing
or removing existing types. because of this requirement, no default
encoding is provided for `std::variant`. callers must opt in to one
namespace or the other

the `converted_variant` encoding requires the variant's first type T
to use versioned encoding, and guarantees that the variant's encoding
is backward-compatible with T's

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-12-01 08:52:31 -05:00
Nizamudeen A
4689c3d65e mgr/dashboard: fs snapshots e2e
Fixes: https://tracker.ceph.com/issues/63237
Signed-off-by: Nizamudeen A <nia@redhat.com>
2023-12-01 18:24:29 +05:30