]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/log
ceph.git
2 years agotest/os: Add missing include to Fragmentation_simulator.cc 52495/head
Adam Emerson [Fri, 20 Oct 2023 00:10:05 +0000 (20:10 -0400)]
test/os: Add missing include to Fragmentation_simulator.cc

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agolibcephfs: Fix order of destruction of context pool
Adam Emerson [Thu, 28 Sep 2023 17:00:59 +0000 (13:00 -0400)]
libcephfs: Fix order of destruction of context pool

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoqa/rados: Add neorados tests to run
Adam Emerson [Mon, 18 Sep 2023 17:27:51 +0000 (13:27 -0400)]
qa/rados: Add neorados tests to run

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agobuild: Make `tests` depend on `neorados`
Adam Emerson [Fri, 8 Sep 2023 02:47:04 +0000 (22:47 -0400)]
build: Make `tests` depend on `neorados`

To make sure it's built by `make check`.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agotest/neorados: Rounding out test coverage, part 3
Adam Emerson [Tue, 29 Aug 2023 22:14:26 +0000 (18:14 -0400)]
test/neorados: Rounding out test coverage, part 3

This includes snapshots and watch_notify

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Notify fixes
Adam Emerson [Fri, 8 Sep 2023 20:50:46 +0000 (16:50 -0400)]
neorados: Notify fixes

1. Objecter expects a count of seconds, not milliseconds
2. Actually return result

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Validate pointers from watch cookies
Adam Emerson [Thu, 7 Sep 2023 21:35:40 +0000 (17:35 -0400)]
neorados: Validate pointers from watch cookies

Since Objecter has a set used to validate pointers converted from
watch cookies before dereferencing them, expose a function to do so.

Also make the set a `std::unordered_set` since we use it for only this
purpose.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: More snapshot support
Adam Emerson [Tue, 29 Aug 2023 22:13:55 +0000 (18:13 -0400)]
neorados: More snapshot support

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoosdc: with_osdmap should be const
Adam Emerson [Tue, 29 Aug 2023 22:13:35 +0000 (18:13 -0400)]
osdc: with_osdmap should be const

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: `execute` returns success on empty operations
Adam Emerson [Fri, 8 Sep 2023 16:48:39 +0000 (12:48 -0400)]
neorados: `execute` returns success on empty operations

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agotest/neorados: Rounding out test coverage, part 2
Adam Emerson [Mon, 14 Aug 2023 20:01:02 +0000 (16:01 -0400)]
test/neorados: Rounding out test coverage, part 2

This includes write_operations, io, misc, and pool.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Moved-from operations are equivalent to new
Adam Emerson [Mon, 21 Aug 2023 21:28:05 +0000 (17:28 -0400)]
neorados: Moved-from operations are equivalent to new

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Make neorados::Entry aggregate initializable
Adam Emerson [Fri, 18 Aug 2023 22:07:22 +0000 (18:07 -0400)]
neorados: Make neorados::Entry aggregate initializable

Now that C++20 has designated initializers, this is the least
confusing way to handle objects like this.

Also switch to using the spaceship operator, while we're at it.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados/test: Support erasure coded pools
Adam Emerson [Thu, 17 Aug 2023 18:39:15 +0000 (14:39 -0400)]
neorados/test: Support erasure coded pools

The test framework in common test can now support erasure-coded pools
and be more easily extended generally.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Take `claim_append`ed `buffer::list`s by value
Adam Emerson [Mon, 14 Aug 2023 23:11:27 +0000 (19:11 -0400)]
neorados: Take `claim_append`ed `buffer::list`s by value

Since both const lvalue and rvalue make sense, instead of duplicating
everything, just take a value and move from it.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agotest/neorados: Rounding out test coverage, part 1
Adam Emerson [Mon, 7 Aug 2023 17:21:10 +0000 (13:21 -0400)]
test/neorados: Rounding out test coverage, part 1

This includes cls, cmd, and read_operations.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Implement `ReadOp::checksum`
Adam Emerson [Thu, 10 Aug 2023 02:00:24 +0000 (22:00 -0400)]
neorados: Implement `ReadOp::checksum`

Rather than using `buffer::list`s for initial values and hash results,
serialize to/from the expected types.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agotest/neorados: common_tests gets functions for bufferlists
Adam Emerson [Thu, 10 Aug 2023 01:57:41 +0000 (21:57 -0400)]
test/neorados: common_tests gets functions for bufferlists

Mostly for getting things into and out of them conveniently.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Improve `cmp_omap` argument structure
Adam Emerson [Thu, 10 Aug 2023 03:59:34 +0000 (23:59 -0400)]
neorados: Improve `cmp_omap` argument structure

A map from strings to value/op pairs is a bit much and a bit annoying
for what's essentially a list of assertions. Just use a vector.

Also put op in the middle so it matches `cmpxattr`.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Change `cmpxattr_op` to `cmp_op` and use in `Op::cmp_omap`
Adam Emerson [Wed, 9 Aug 2023 03:19:24 +0000 (23:19 -0400)]
neorados: Change `cmpxattr_op` to `cmp_op` and use in `Op::cmp_omap`

Omap and Xattr comparison use the same values, but in the Xattr case
it's eight bits wide.

Rename the enum to `cmp_op` to reflect this, and open-code encoding
the assertions so we don't have to allocate an intermediate structure.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Fix `Op::cmpext` error and unfound behavior
Adam Emerson [Wed, 9 Aug 2023 00:38:24 +0000 (20:38 -0400)]
neorados: Fix `Op::cmpext` error and unfound behavior

A failure will produce the output `osd_errc::cmpext_mismatch`. On
failure, the `unmatch` out parameter, if provided, will be set to the
index of the first nonmatching character; On success, it will be set
to `-1`.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agocommon/ceph_json: `encode_json()` for `std::array`
Adam Emerson [Mon, 7 Aug 2023 19:36:27 +0000 (15:36 -0400)]
common/ceph_json: `encode_json()` for `std::array`

No decode, though, since JSON arrays can vary in length and
`std::array` cannot.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Op builder functions should chain
Adam C. Emerson [Mon, 20 Mar 2023 16:20:38 +0000 (12:20 -0400)]
neorados: Op builder functions should chain

Make every operation function return the (Read/Write)Op, for chaining.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoneorados: Use `asio::any_completion_handler`
Adam C. Emerson [Wed, 29 Mar 2023 05:35:22 +0000 (01:35 -0400)]
neorados: Use `asio::any_completion_handler`

As we'd like to reduce (and eliminate) internal Ceph dependencies to
the extent possible, now that Boost.Asio has a type-erased handler
type, let's use it.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agocmake: drop BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
Casey Bodley [Thu, 9 Feb 2023 23:43:10 +0000 (18:43 -0500)]
cmake: drop BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT

this define was added for backward compatibility before boost 1.74

https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio/std_executors.html

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agosubmodule: update spawn submodule for any_io_executor
Casey Bodley [Tue, 14 Feb 2023 15:28:51 +0000 (10:28 -0500)]
submodule: update spawn submodule for any_io_executor

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agotest/common: test_blocked_completion uses boost::asio::post()
Casey Bodley [Fri, 10 Feb 2023 19:54:51 +0000 (14:54 -0500)]
test/common: test_blocked_completion uses boost::asio::post()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agolibrbd: use strand template and make_strand()
Casey Bodley [Fri, 10 Feb 2023 15:36:57 +0000 (10:36 -0500)]
librbd: use strand template and make_strand()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoneorados: use strand template and make_strand()
Casey Bodley [Fri, 10 Feb 2023 15:36:22 +0000 (10:36 -0500)]
neorados: use strand template and make_strand()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agocommon/async: SharedMutex uses free function post
Casey Bodley [Thu, 9 Feb 2023 23:58:21 +0000 (18:58 -0500)]
common/async: SharedMutex uses free function post

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agocommon/async: completion uses free functions for defer/dispatch/post
Casey Bodley [Thu, 9 Feb 2023 21:41:53 +0000 (16:41 -0500)]
common/async: completion uses free functions for defer/dispatch/post

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agoosdc: replace asio::io_context::strand with asio::strand<>
Casey Bodley [Thu, 9 Feb 2023 19:46:27 +0000 (14:46 -0500)]
osdc: replace asio::io_context::strand with asio::strand<>

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agoosdc: Catch exceptions thrown in CLS client decoders
Adam C. Emerson [Thu, 2 Feb 2023 06:14:35 +0000 (01:14 -0500)]
osdc: Catch exceptions thrown in CLS client decoders

And return them to the client by setting the error code and result in
the vector and returning an error from the operation as a whole.

Pass OSD failure to subsequent handlers so that, for example, in the
event of a cancellation, we don't try to decode data that isn't there.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agotest/neorados: Harness and convenience for Neorados tests
Adam C. Emerson [Sat, 21 Jan 2023 02:35:41 +0000 (21:35 -0500)]
test/neorados: Harness and convenience for Neorados tests

Google Test does not support C++ coroutines, so kludge together a test
harness that supports coroutines reasonably well.

Also add a couple utility functions.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agocommon/async: Don't get allocator from moved-from handler
Adam C. Emerson [Tue, 24 Jan 2023 03:50:58 +0000 (22:50 -0500)]
common/async: Don't get allocator from moved-from handler

In the `destroy_` functions of `CompletionImpl` we were getting the
associated allocator after moving out of the handler into the call to
`bind_and_forward`. This was triggering a crash on null-pointer access
in operations made with `co_composed`.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoneorados: Use C++20 Coroutines in exerciser/demo
Adam C. Emerson [Thu, 15 Sep 2022 20:42:51 +0000 (16:42 -0400)]
neorados: Use C++20 Coroutines in exerciser/demo

Just as a demonstration to see how well they work and how to put
things together with them.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoneorados: Fix logic error in exerciser
Adam C. Emerson [Thu, 15 Sep 2022 18:46:47 +0000 (14:46 -0400)]
neorados: Fix logic error in exerciser

Use `min` rather than `max` when deciding how much we need to read in
`read()`.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoneorados: No dangling references in arguments
Adam Emerson [Wed, 29 Nov 2023 06:03:07 +0000 (01:03 -0500)]
neorados: No dangling references in arguments

`async_initiate` may call its lambda after the containing function
returns. As such, reference arguments may no longer point to anything by
the time we use them.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Don't call dispatch inside with_osdmap
Adam C. Emerson [Thu, 17 Mar 2022 16:30:19 +0000 (12:30 -0400)]
neorados: Don't call dispatch inside with_osdmap

The lock will continue to be held over the 'dispatch' with C++20
coroutines.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoneorados: Switch to async_initiate
Adam C. Emerson [Wed, 9 Mar 2022 00:14:59 +0000 (19:14 -0500)]
neorados: Switch to async_initiate

This form of completion handling is compatible with C++20 Completions
and generally more flexible stuff.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoneorados: Make IOContext getters/setters less weird
Adam Emerson [Tue, 28 Nov 2023 20:12:29 +0000 (15:12 -0500)]
neorados: Make IOContext getters/setters less weird

Name them get and set for one thing. In practice a lot of existing
Ceph code is written using special values to indicate nullity, so
optional doesn't add anything.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoneorados: Remove broken out duplicates of calls
Adam Emerson [Tue, 28 Nov 2023 17:28:41 +0000 (12:28 -0500)]
neorados: Remove broken out duplicates of calls

Make everything use IOContext rather than duplicating everything with
versions taking a separate pool, namespace, and key.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
2 years agoMerge pull request #54799 from cbodley/wip-osd-scrub-signed-warning
Casey Bodley [Wed, 6 Dec 2023 13:12:57 +0000 (13:12 +0000)]
Merge pull request #54799 from cbodley/wip-osd-scrub-signed-warning

osd/scrubber: fix signed comparison warning

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
2 years agoMerge pull request #54755 from idryomov/wip-63654
Ilya Dryomov [Wed, 6 Dec 2023 10:49:32 +0000 (11:49 +0100)]
Merge pull request #54755 from idryomov/wip-63654

librbd: fix regressions in ObjectListSnapsRequest

Reviewed-by: Mykola Golub <mgolub@suse.com>
2 years agoMerge pull request #54804 from rhcs-dashboard/upgrade-grafana-9.4.12
Nizamudeen A [Wed, 6 Dec 2023 10:08:41 +0000 (15:38 +0530)]
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>
2 years agoMerge pull request #54670 from trociny/wip-cython-3
Ilya Dryomov [Wed, 6 Dec 2023 09:52:09 +0000 (10:52 +0100)]
Merge pull request #54670 from trociny/wip-cython-3

pybind/rbd: fix compilation with cython3

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2 years agoMerge pull request #54790 from zdover23/wip-doc-2023-12-05-radosgw-rgw-cache-nginx... wip-yuval-test-63335
zdover23 [Wed, 6 Dec 2023 08:32:27 +0000 (09:32 +0100)]
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>
2 years agoMerge pull request #54215 from kchheda3/wip-fix-kafka-break
Yuval Lifshitz [Wed, 6 Dec 2023 08:21:42 +0000 (10:21 +0200)]
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

2 years agomonitoring: upgrade grafana container to 9.4.12 54804/head
Nizamudeen A [Wed, 6 Dec 2023 06:26:44 +0000 (11:56 +0530)]
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>
2 years agoMerge pull request #54787 from cbodley/wip-versioned-variant-inline
Casey Bodley [Wed, 6 Dec 2023 01:55:57 +0000 (01:55 +0000)]
Merge pull request #54787 from cbodley/wip-versioned-variant-inline

common: use inline for monostate dencoders

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoosd/scrubber: fix signed comparison warning 54799/head
Casey Bodley [Tue, 5 Dec 2023 21:12:56 +0000 (16:12 -0500)]
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>
2 years agodoc/radosgw: update link in rgw-cache.rst 54790/head
Zac Dover [Tue, 5 Dec 2023 19:46:26 +0000 (20:46 +0100)]
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>
2 years agocommon: use inline for monostate dencoders 54787/head
Casey Bodley [Tue, 5 Dec 2023 17:21:18 +0000 (12:21 -0500)]
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>
2 years agotest/librbd: drop DiffIterateTest.DiffIterateRegression6926 54755/head
Ilya Dryomov [Fri, 1 Dec 2023 17:29:12 +0000 (18:29 +0100)]
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>
2 years agotest/librbd: drop TestLibRBD.SnapDiff
Ilya Dryomov [Fri, 1 Dec 2023 17:54:19 +0000 (18:54 +0100)]
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>
2 years agotest/librbd: add DiffIterateTest.DiffIterateDeterministic{,PP}
Ilya Dryomov [Wed, 29 Nov 2023 11:28:51 +0000 (12:28 +0100)]
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>
2 years agoMerge pull request #54068 from rhcs-dashboard/rgw-roles-update
Nizamudeen A [Tue, 5 Dec 2023 08:09:00 +0000 (13:39 +0530)]
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>
2 years agoMerge pull request #54774 from sinashan/main
zdover23 [Mon, 4 Dec 2023 19:41:46 +0000 (20:41 +0100)]
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>
2 years agodoc: Fixes two typos and grammatical errors. Signed-off-by: Sina Ahmadi <sinatak1373... 54774/head
sinashan [Mon, 4 Dec 2023 19:02:54 +0000 (14:02 -0500)]
doc: Fixes two typos and grammatical errors. Signed-off-by: Sina Ahmadi <sinatak1373@live.com>

2 years agoMerge pull request #54205 from VallariAg/wip-nvmeof-test
Ilya Dryomov [Mon, 4 Dec 2023 17:14:38 +0000 (18:14 +0100)]
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>
2 years agopybind/rbd: make cdef functions not propagate exceptions by default 54670/head
Mykola Golub [Mon, 4 Dec 2023 09:38:56 +0000 (09:38 +0000)]
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>
2 years agotest/pybind/rbd: test callbacks raising exceptions
Mykola Golub [Sun, 3 Dec 2023 09:37:02 +0000 (09:37 +0000)]
test/pybind/rbd: test callbacks raising exceptions

Signed-off-by: Mykola Golub <mgolub@suse.com>
2 years agoqa: add rbd/nvmeof test 54205/head
Vallari Agrawal [Thu, 26 Oct 2023 07:55:44 +0000 (13:25 +0530)]
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>
2 years agoMerge pull request #54441 from phlogistonjohn/jjm-cephadm-breakup v19.0.0
Adam King [Mon, 4 Dec 2023 12:32:52 +0000 (07:32 -0500)]
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>
2 years agoMerge pull request #54679 from Suyashd999/add-rgw
Adam King [Mon, 4 Dec 2023 12:26:13 +0000 (07:26 -0500)]
Merge pull request #54679 from Suyashd999/add-rgw

src/cephadm: Added rgw for listing in Daemons

Reviewed-by: Adam King <adking@redhat.com>
2 years agoMerge pull request #54076 from rhcs-dashboard/subvolume-snapshot
Nizamudeen A [Mon, 4 Dec 2023 08:42:51 +0000 (14:12 +0530)]
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>
2 years agoMerge pull request #54758 from zdover23/wip-doc-2023-12-03-rados-stretch-mode-repair...
Anthony D'Atri [Sun, 3 Dec 2023 14:40:46 +0000 (09:40 -0500)]
Merge pull request #54758 from zdover23/wip-doc-2023-12-03-rados-stretch-mode-repair-of-54689

doc/rados: repair stretch-mode.rst

2 years agodoc/rados: repair stretch-mode.rst 54758/head
Zac Dover [Sun, 3 Dec 2023 12:17:46 +0000 (13:17 +0100)]
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>
2 years agoMerge pull request #54437 from Matan-B/wip-matanb-crimson-osdmap-trimming
Matan Breizman [Sun, 3 Dec 2023 08:06:33 +0000 (10:06 +0200)]
Merge pull request #54437 from Matan-B/wip-matanb-crimson-osdmap-trimming

crimson/osd: introduce osdmap trimming

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #53712 from ronen-fr/wip-rf-move-1
Ronen Friedman [Sun, 3 Dec 2023 07:51:41 +0000 (09:51 +0200)]
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>
2 years agoMerge pull request #54482 from ronen-fr/wip-rf-repl-hp
Ronen Friedman [Sun, 3 Dec 2023 07:45:18 +0000 (09:45 +0200)]
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>
2 years agoMerge pull request #54689 from PC-Admin/update-stretch-mode-docs
zdover23 [Sun, 3 Dec 2023 05:56:59 +0000 (06:56 +0100)]
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>
2 years agodoc/rados: update "stretch mode" 54689/head
PC-Admin [Tue, 28 Nov 2023 09:45:52 +0000 (17:45 +0800)]
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>
2 years agoosd: fix a missing 'noexcept' on a move ctor 53712/head
Ronen Friedman [Thu, 28 Sep 2023 12:04:06 +0000 (07:04 -0500)]
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>
2 years agolibrbd: fix read_whole_object handling in ObjectListSnapsRequest
Ilya Dryomov [Mon, 27 Nov 2023 10:59:26 +0000 (11:59 +0100)]
librbd: fix read_whole_object handling in ObjectListSnapsRequest

Originally, in commit 2be4840afd4f ("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 cc87a8bd697e ("librbd:
deep-copy object utilizes image-extent IO methods") by way of commit
11923e234efc ("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>
2 years agolibrbd: fix LIST_SNAPS_FLAG_WHOLE_OBJECT behavior
Ilya Dryomov [Mon, 27 Nov 2023 09:11:52 +0000 (10:11 +0100)]
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 4429ed4f3f4c ("librbd: switch
diff iterate API to use new snaps list dispatch methods") by way of
commit 66dd53d9c4d9 ("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>
2 years agotest/librbd: make ListSnapsWholeObject actually test stuff
Ilya Dryomov [Sun, 19 Nov 2023 21:44:28 +0000 (22:44 +0100)]
test/librbd: make ListSnapsWholeObject actually test stuff

Despite being added in commit 66dd53d9c4d9 ("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>
2 years agolibrados/snap_set_diff: set end_size only if end object exists
Ilya Dryomov [Sat, 11 Nov 2023 13:15:49 +0000 (14:15 +0100)]
librados/snap_set_diff: set end_size only if end object exists

Since commit 73f50a13109f ("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>
2 years agoMerge pull request #54752 from zdover23/wip-doc-2023-12-02-radosgw-multisite-formatting
zdover23 [Sat, 2 Dec 2023 06:22:12 +0000 (07:22 +0100)]
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>
2 years agodoc/radosgw: fix formatting 54752/head
Zac Dover [Sat, 2 Dec 2023 05:38:28 +0000 (06:38 +0100)]
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>
2 years agoMerge pull request #54526 from cbodley/wip-rgw-acl-cleanup
Casey Bodley [Fri, 1 Dec 2023 16:46:33 +0000 (16:46 +0000)]
Merge pull request #54526 from cbodley/wip-rgw-acl-cleanup

rgw/acl: clean up RGWAccessControlPolicy and friends

Reviewed-by: Yuval Lifshitz <ylifshit@redhat.com>
2 years agoMerge pull request #54488 from cbodley/wip-versioned-variant
Casey Bodley [Fri, 1 Dec 2023 16:02:20 +0000 (16:02 +0000)]
Merge pull request #54488 from cbodley/wip-versioned-variant

common: add versioned encodings for std::variant

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2 years agotests/scrub: deactivate osd-scrub-dump stand-alone test 54482/head
Ronen Friedman [Fri, 1 Dec 2023 14:48:49 +0000 (08:48 -0600)]
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>
2 years agocommon: add generate_test_instances() for std::variant 54488/head
Casey Bodley [Tue, 14 Nov 2023 19:43:25 +0000 (14:43 -0500)]
common: add generate_test_instances() for std::variant

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 years agocommon: add versioned encodings for std::variant
Casey Bodley [Tue, 14 Nov 2023 01:05:47 +0000 (20:05 -0500)]
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>
2 years agomgr/dashboard: fs snapshots e2e 54076/head
Nizamudeen A [Fri, 27 Oct 2023 08:15:44 +0000 (13:45 +0530)]
mgr/dashboard: fs snapshots e2e

Fixes: https://tracker.ceph.com/issues/63237
Signed-off-by: Nizamudeen A <nia@redhat.com>
2 years agomgr/dashboard: cephfs subvolume list snapshots
Nizamudeen A [Wed, 18 Oct 2023 17:46:09 +0000 (23:16 +0530)]
mgr/dashboard: cephfs subvolume list snapshots

Added a tab for displaying the subvolume snapshots
- this tab will show an info alert when there are no subvolumes present
- if the subvolume is present, then it'll be auto-selected by default

Implemented a filter to search the groups and subvolumes by its name.
Also added a scrollbar when there are too many items in the nav list

Modified the REST APIs to fetch only the names of the resources and
fetch the info when an API call is requesting for it.

Added unit tests

Fixes: https://tracker.ceph.com/issues/63237
Signed-off-by: Nizamudeen A <nia@redhat.com>
2 years agoMerge pull request #54648 from rhcs-dashboard/fs-rename-fix
Nizamudeen A [Fri, 1 Dec 2023 12:51:49 +0000 (18:21 +0530)]
Merge pull request #54648 from rhcs-dashboard/fs-rename-fix

mgr/dashboard: fs rename only when fs is offline

Reviewed-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
Reviewed-by: Ankush Behl <cloudbehl@gmail.com>
Reviewed-by: ivoalmeida <NOT@FOUND>
2 years agoMerge pull request #54731 from zdover23/wip-doc-2023-11-30-rados-tshooting-log-and...
zdover23 [Fri, 1 Dec 2023 10:43:24 +0000 (11:43 +0100)]
Merge pull request #54731 from zdover23/wip-doc-2023-11-30-rados-tshooting-log-and-debug-note

doc/rados: improve formatting of log-and-debug.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2 years agoMerge pull request #54730 from zdover23/wip-doc-2023-11-30-glossary-monitor-store
zdover23 [Fri, 1 Dec 2023 09:44:41 +0000 (10:44 +0100)]
Merge pull request #54730 from zdover23/wip-doc-2023-11-30-glossary-monitor-store

doc/glossary.rst: add "Monitor Store"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2 years agodoc/rados: improve formatting of log-and-debug.rst 54731/head
Zac Dover [Thu, 30 Nov 2023 08:16:38 +0000 (09:16 +0100)]
doc/rados: improve formatting of log-and-debug.rst

Improve the arrangment of information in the section "Ceph Subsystems"
in doc/rados/troubleshooting/log-and-debug.rst.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
2 years agoMerge pull request #54724 from ajarr/wip-63673
Ilya Dryomov [Fri, 1 Dec 2023 09:33:10 +0000 (10:33 +0100)]
Merge pull request #54724 from ajarr/wip-63673

qa/workunits/rbd/cli_generic.sh: narrow race window

... when checking that rbd_support module command fails after blocklisting the module's client.

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2 years agomgr/dashboard: generalized code-block component 54648/head
Nizamudeen A [Thu, 30 Nov 2023 09:04:41 +0000 (14:34 +0530)]
mgr/dashboard: generalized code-block component

Fixes: https://tracker.ceph.com/issues/63608
Signed-off-by: Nizamudeen A <nia@redhat.com>
2 years agocephadm: black format daemons/tracing.py 54441/head
John Mulligan [Thu, 9 Nov 2023 18:59:07 +0000 (13:59 -0500)]
cephadm: black format daemons/tracing.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2 years agocephadm: black format daemons/snmp.py
John Mulligan [Thu, 9 Nov 2023 18:58:53 +0000 (13:58 -0500)]
cephadm: black format daemons/snmp.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2 years agocephadm: black format daemons/nvmeof.py
John Mulligan [Thu, 9 Nov 2023 18:58:41 +0000 (13:58 -0500)]
cephadm: black format daemons/nvmeof.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2 years agocephadm: black format daemons/nfs.py
John Mulligan [Thu, 9 Nov 2023 18:58:30 +0000 (13:58 -0500)]
cephadm: black format daemons/nfs.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2 years agocephadm: black format daemons/monitoring.py
John Mulligan [Thu, 9 Nov 2023 18:58:17 +0000 (13:58 -0500)]
cephadm: black format daemons/monitoring.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2 years agocephadm: black format daemons/iscsi.py
John Mulligan [Thu, 9 Nov 2023 18:58:03 +0000 (13:58 -0500)]
cephadm: black format daemons/iscsi.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2 years agocephadm: black format daemons/ingress.py
John Mulligan [Thu, 9 Nov 2023 18:57:49 +0000 (13:57 -0500)]
cephadm: black format daemons/ingress.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>