]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
17 months agopacifc: Revert "mgr/dashboard: unselect rows in datatables" 55415/head
Nizamudeen A [Thu, 1 Feb 2024 16:40:21 +0000 (22:10 +0530)]
pacifc: Revert "mgr/dashboard: unselect rows in datatables"

This is already reverted in reef and quincy. Since its not needed
reverting it in pacific as well

Fixes: https://tracker.ceph.com/issues/57829
This reverts commit 3bdb929bab8f3eda32dcf9e46bb54a221ea54d3b.

Signed-off-by: Nizamudeen A <nia@redhat.com>
17 months agoMerge pull request #55382 from cbodley/wip-pacific-qa-upgrade-ragweed-branch
Yuri Weinstein [Wed, 31 Jan 2024 01:06:49 +0000 (17:06 -0800)]
Merge pull request #55382 from cbodley/wip-pacific-qa-upgrade-ragweed-branch

pacific: qa/upgrade: use ragweed branch for starting ceph release

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
17 months agoqa/upgrade: use ragweed branch for starting ceph release 55382/head
Casey Bodley [Tue, 30 Jan 2024 21:48:32 +0000 (16:48 -0500)]
qa/upgrade: use ragweed branch for starting ceph release

don't run new test cases against older ceph versions

Signed-off-by: Casey Bodley <cbodley@redhat.com>
17 months agoMerge pull request #52978 from k0ste/wip-51653-pacific
Yuri Weinstein [Wed, 24 Jan 2024 20:06:03 +0000 (12:06 -0800)]
Merge pull request #52978 from k0ste/wip-51653-pacific

pacific: vstart_runner: use FileNotFoundError when os.stat() fails

Reviewed-by: Laura Flores <lflores@redhat.com>
17 months agoMerge pull request #52977 from k0ste/wip-51654-pacific
Yuri Weinstein [Wed, 24 Jan 2024 20:05:20 +0000 (12:05 -0800)]
Merge pull request #52977 from k0ste/wip-51654-pacific

pacific: vstart_runner: maintain log level when --debug is passed

Reviewed-by: Laura Flores <lflores@redhat.com>
17 months agoMerge pull request #54709 from k0ste/wip-63677-pacific
Yuri Weinstein [Wed, 24 Jan 2024 15:34:14 +0000 (07:34 -0800)]
Merge pull request #54709 from k0ste/wip-63677-pacific

pacific: ceph-volume: fixes fallback to stat in is_device and is_partition

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Teoman Onay <tonay@redhat.com>
17 months agoMerge pull request #52459 from kamoltat/wip-ksirivad-backport-pacific-48209
Yuri Weinstein [Wed, 24 Jan 2024 15:33:13 +0000 (07:33 -0800)]
Merge pull request #52459 from kamoltat/wip-ksirivad-backport-pacific-48209

pacific: osd/OSDMap: Check for uneven weights & != 2 buckets post stretch mode

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Nitzan Mordechai <nmordech@redhat.com>
17 months agoMerge pull request #51314 from rosinL/wip-backport-41306-to-pacific
Yuri Weinstein [Wed, 24 Jan 2024 15:31:52 +0000 (07:31 -0800)]
Merge pull request #51314 from rosinL/wip-backport-41306-to-pacific

pacific: isa-l: incorporate fix for aarch64 text relocation

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
17 months agoMerge pull request #51243 from k0ste/wip-54097-pacific
Yuri Weinstein [Wed, 24 Jan 2024 15:31:00 +0000 (07:31 -0800)]
Merge pull request #51243 from k0ste/wip-54097-pacific

pacific: pybind/mgr/mgr_util: fix to_pretty_timedelta()

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
17 months agoMerge pull request #53355 from k0ste/wip-57260-pacific
Yuri Weinstein [Wed, 24 Jan 2024 15:29:09 +0000 (07:29 -0800)]
Merge pull request #53355 from k0ste/wip-57260-pacific

pacific: mgr/snap-schedule: use the right way to check the result returned by…

Reviewed-by: Milind Changire <mchangir@redhat.com>
17 months agoMerge pull request #52928 from guits/wip-62038-pacific
Yuri Weinstein [Wed, 24 Jan 2024 15:23:41 +0000 (07:23 -0800)]
Merge pull request #52928 from guits/wip-62038-pacific

pacific: ceph-volume: add --osd-id option to raw prepare

Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Teoman Onay <tonay@redhat.com>
17 months agoMerge pull request #48311 from k0ste/wip-56635-pacific
Yuri Weinstein [Wed, 24 Jan 2024 15:22:01 +0000 (07:22 -0800)]
Merge pull request #48311 from k0ste/wip-56635-pacific

pacific: log: Make log_max_recent have an effect again.

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
17 months agoceph-volume: support partitions in inventory 54709/head
Guillaume Abrioux [Thu, 10 Aug 2023 09:01:22 +0000 (09:01 +0000)]
ceph-volume: support partitions in inventory

This makes ceph-volume report partitions in inventory.
A partition is a valid device for `ceph-volume lvm prepare`
so we should report them in inventory (when using `--list-all`
parameter).

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 00ba00fdfab8cb4969d46838e44cff3a03fc16ca)

Conflicts:
  - file: src/ceph-volume/ceph_volume/util/device.py
    comment: pacific don't have --list-all, remove from init
  - src/ceph-volume/ceph_volume/util/disk.py
    comment: manually resolve conflict in block_types[]

17 months agoceph-volume: fixes fallback to stat in is_device and is_partition
Teoman ONAY [Tue, 3 Oct 2023 19:47:16 +0000 (21:47 +0200)]
ceph-volume: fixes fallback to stat in is_device and is_partition

os.stat (or lstat) cannot distinguish a block device from
a partition.

Fixes: https://tracker.ceph.com/issues/58812
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 52ca4a61d5d69ccfadeef8408a4711c820b98959)

17 months agoMerge pull request #44462 from pritha-srivastava/wip-52728-pacific
Yuri Weinstein [Tue, 23 Jan 2024 16:09:26 +0000 (08:09 -0800)]
Merge pull request #44462 from pritha-srivastava/wip-52728-pacific

pacific: rgw/sts: code for returning an error when an IAM policy

Reviewed-by: Casey Bodley <cbodley@redhat.com>
17 months agoMerge pull request #55256 from idryomov/wip-63341-pacific
Yuri Weinstein [Tue, 23 Jan 2024 16:08:09 +0000 (08:08 -0800)]
Merge pull request #55256 from idryomov/wip-63341-pacific

pacific: librbd: improve rbd_diff_iterate2() performance in fast-diff mode

Reviewed-by: Mykola Golub <mgolub@suse.com>
17 months agoMerge pull request #53465 from k0ste/wip-50697-pacific
Yuri Weinstein [Mon, 22 Jan 2024 21:06:16 +0000 (13:06 -0800)]
Merge pull request #53465 from k0ste/wip-50697-pacific

pacific: log: fix the formatting when dumping thread IDs.

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
17 months agoMerge pull request #51250 from k0ste/wip-52839-pacific
Yuri Weinstein [Mon, 22 Jan 2024 21:05:30 +0000 (13:05 -0800)]
Merge pull request #51250 from k0ste/wip-52839-pacific

pacific: rados: build minimally when "WITH_MGR" is off

Reviewed-by: Laura Flores <lflores@redhat.com>
17 months agoMerge pull request #48439 from rhcs-dashboard/wip-57839-pacific
Yuri Weinstein [Mon, 22 Jan 2024 21:04:41 +0000 (13:04 -0800)]
Merge pull request #48439 from rhcs-dashboard/wip-57839-pacific

pacific: mgr/prometheus: change pg_repaired_objects name to pool_repaired_objects

Reviewed-by: Nizamudeen A <nia@redhat.com>
17 months agoMerge pull request #55155 from rzarzynski/wip-64006-pacific
Yuri Weinstein [Mon, 22 Jan 2024 16:00:47 +0000 (08:00 -0800)]
Merge pull request #55155 from rzarzynski/wip-64006-pacific

pacific:  common/weighted_shuffle: don't feed std::discrete_distribution with all-zero weights

Reviewed-by: Nitzan Mordechai <nmordech@redhat.com>
17 months agoMerge pull request #54558 from k0ste/wip-57794-pacific
Yuri Weinstein [Mon, 22 Jan 2024 15:58:59 +0000 (07:58 -0800)]
Merge pull request #54558 from k0ste/wip-57794-pacific

pacific: common:  intrusive_lru destructor add

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
17 months agoMerge pull request #52981 from k0ste/wip-62154-pacific
Yuri Weinstein [Mon, 22 Jan 2024 15:57:44 +0000 (07:57 -0800)]
Merge pull request #52981 from k0ste/wip-62154-pacific

pacific: ceph-volume: fix raw list for lvm devices

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
17 months agoMerge pull request #55258 from idryomov/docs-build-fix-pacific
Ilya Dryomov [Sat, 20 Jan 2024 21:17:56 +0000 (22:17 +0100)]
Merge pull request #55258 from idryomov/docs-build-fix-pacific

pacific: admin/doc-requirements: bump Sphinx to 5.0.2

Reviewed-by: Zac Dover <zac.dover@proton.me>
17 months agoadmin/doc-requirements: bump Sphinx to 5.0.2 55258/head
Nizamudeen A [Tue, 16 Jan 2024 05:21:56 +0000 (10:51 +0530)]
admin/doc-requirements: bump Sphinx to 5.0.2

```
Running Sphinx v4.5.0

Sphinx version error:
The sphinxcontrib.applehelp extension used by this project needs at least Sphinx v5.0; it therefore cannot be built with this version.
```

Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit a916feeee757e4e196967944feeb1e9b1f92c398)

Conflicts:
admin/doc-requirements.txt [ commit d61bd5af6596
  ("admin/doc-requirements: bump sphinx to 4.5.0") not in
  pacific ]

17 months agoPendingReleaseNotes: add rbd_diff_iterate2 note 55256/head
Ilya Dryomov [Sat, 20 Jan 2024 15:00:46 +0000 (16:00 +0100)]
PendingReleaseNotes: add rbd_diff_iterate2 note

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 40e8813e9c705838eee42c98de717b20851aed72)

Conflicts:
PendingReleaseNotes [ moved to >=16.2.15 section ]

17 months agolibrbd: try to preserve object map for diff-iterate in fast-diff mode
Ilya Dryomov [Sat, 6 Jan 2024 16:08:04 +0000 (17:08 +0100)]
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>
(cherry picked from commit 89b0d9e7b40a5f962094428e613315d3697d261f)

Conflicts:
src/librbd/api/DiffIterate.cc [ ImageArea support not in
  pacific ]

17 months agolibrbd/object_map: potentially use in-memory object map in DiffRequest
Ilya Dryomov [Sat, 6 Jan 2024 16:05:39 +0000 (17:05 +0100)]
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>
(cherry picked from commit 0c4bb58c900efa2356ea8526d3432b2922787afa)

Conflicts:
src/test/librbd/mock/MockObjectMap.h [ commit 87459c23aa05
  ("librbd,rbd_mirror: do not include RWLock.h unless it is
  used") not in pacific ]

17 months agolibrbd/object_map: decouple object map processing in DiffRequest
Ilya Dryomov [Fri, 5 Jan 2024 12:15:54 +0000 (13:15 +0100)]
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>
(cherry picked from commit dabb677ba5923f347c5b4b81b6a86214699a52bf)

17 months agocommon/bit_vector: fix iterator vs reference constness confusion
Ilya Dryomov [Fri, 5 Jan 2024 11:23:24 +0000 (12:23 +0100)]
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>
(cherry picked from commit 45d534553abaca81e26574fd5a7b17b9219c0dd0)

17 months agolibrbd/object_map: make object map in handle_load_object_map() local
Ilya Dryomov [Thu, 4 Jan 2024 10:44:46 +0000 (11:44 +0100)]
librbd/object_map: make object map in handle_load_object_map() local

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 232ad1a5fb6248d7b3fbfaec5944a90a71a95806)

17 months agolibrbd/object_map: don't resize object map in handle_load_object_map()
Ilya Dryomov [Thu, 4 Jan 2024 10:39:20 +0000 (11:39 +0100)]
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>
(cherry picked from commit 275a299cd48d2ddac36608d6633a6b79c8927351)

17 months agocommon/bit_vector: fix IteratorImpl post-increment operator
Ilya Dryomov [Sat, 6 Jan 2024 11:22:35 +0000 (12:22 +0100)]
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>
(cherry picked from commit 2ab5b52f71c88cb55f8ed82f1dfd0115fdd6e022)

17 months agolibrbd: drop DiffIterate::diff_object_map() declaration
Ilya Dryomov [Thu, 28 Dec 2023 09:52:11 +0000 (10:52 +0100)]
librbd: drop DiffIterate::diff_object_map() declaration

This is a leftover from commit 2b3a46801d39 ("librbd: switch
diff-iterate API to use new object-map diff helper").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 1503b96bf91d358540fc56a69b3cf18aa7eab68e)

17 months agolibrbd: propagate diff-iterate range to parent in fast-diff mode
Ilya Dryomov [Thu, 28 Dec 2023 09:14:18 +0000 (10:14 +0100)]
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>
(cherry picked from commit 7677d4b1b52ab68484545d0fcd7348f2f8e9f263)

Conflicts:
src/librbd/api/DiffIterate.cc [ ImageArea support not in
  pacific ]

17 months agolibrbd/object_map: add support for ranged diff-iterate
Ilya Dryomov [Wed, 27 Dec 2023 17:07:05 +0000 (18:07 +0100)]
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>
(cherry picked from commit 0b5ba5fedf704ada74a65108af129eae6baea5c5)

Conflicts:
src/librbd/object_map/DiffRequest.cc [ commit ef12761bdb03
  ("librbd: use uint64 for return value of size()") not in
  pacific ]

17 months agoinclude/intarith: introduce round_down_to()
Ilya Dryomov [Wed, 27 Dec 2023 15:18:50 +0000 (16:18 +0100)]
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>
(cherry picked from commit 94bf3a5d74cfd61e0bd881ca2863fe2205f27767)

Conflicts:
src/librbd/api/DiffIterate.cc [ commit 6eb14774fec0 ("librbd:
  build without "using namespace std"") not in pacific ]

17 months agotest/librbd: expand TestMockObjectMapDiffRequest edge case coverage
Ilya Dryomov [Sat, 23 Dec 2023 14:19:09 +0000 (15:19 +0100)]
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>
(cherry picked from commit 9931282bfd2260d654325970555cab8c617e8f14)

17 months agolibrbd/object_map: allow intermediate snaps to be skipped on diff-iterate
Ilya Dryomov [Sat, 23 Dec 2023 13:47:54 +0000 (14:47 +0100)]
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 be507aaed15f ("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>
(cherry picked from commit 23c675f04a4b4bb00794bbc59493d9591625a0a7)

17 months agolibrbd/object_map: resurrect diff-iterate behavior when image is shrunk
Ilya Dryomov [Fri, 22 Dec 2023 17:50:20 +0000 (18:50 +0100)]
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 330f2a7bb94f ("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>
(cherry picked from commit 19c7c4a5359fa9c1d06cc11187e300251249ad9e)

Conflicts:
src/librbd/object_map/DiffRequest.cc [ commit ef12761bdb03
  ("librbd: use uint64 for return value of size()") not in
  pacific ]

17 months agolibrbd/object_map: fix diff from snapshot when image is grown
Ilya Dryomov [Fri, 22 Dec 2023 15:10:12 +0000 (16:10 +0100)]
librbd/object_map: fix diff from snapshot when image is grown

Commit 399a45e11332 ("librbd/object_map: rbd diff between two
snapshots lists entire image content") fixed most of the damage caused
by commit b81cd2460de7 ("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>
(cherry picked from commit 34386d29a8b96de79c38465062b8e93e7fc6e184)

17 months agolibrbd/object_map: drop bogus if in handle_load_object_map()
Ilya Dryomov [Wed, 20 Dec 2023 11:22:17 +0000 (12:22 +0100)]
librbd/object_map: drop bogus if in handle_load_object_map()

It became redundant with commit b81cd2460de7 ("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>
(cherry picked from commit 4e036d65b9146f28a2f6c0dfb353120baea8d62d)

17 months agotest/librbd: refactor TestMockObjectMapDiffRequest tests
Ilya Dryomov [Thu, 21 Dec 2023 15:50:31 +0000 (16:50 +0100)]
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>
(cherry picked from commit 718f6b5546890179f66d5ffadbae9e9cb0e6c97b)

17 months agotest/librbd: improve TestMockObjectMapDiffRequest.InvalidStartSnap
Ilya Dryomov [Thu, 21 Dec 2023 17:08:21 +0000 (18:08 +0100)]
test/librbd: improve TestMockObjectMapDiffRequest.InvalidStartSnap

Use a range where only snap_id_start is invalid.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 64a5afcaad7b61a20f630aca064c2953380c70c1)

18 months agorgw/sts: code to check IAM policy and return an 44462/head
Pritha Srivastava [Mon, 19 Jul 2021 10:27:52 +0000 (15:57 +0530)]
rgw/sts: code to check IAM policy and return an
appropriate error incase Resource specified in the
IAM policy is incorrect and is discarded. The IAM
policy can be a resource policy or an identity policy.
This is for policies that have already been set.

Fixes: https://tracker.ceph.com/issues/51219
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit a79fa82939ad83b1a8365f100e7426eb8e144e2e)

18 months agorgw/sts: code for returning an error when an IAM policy
Pritha Srivastava [Fri, 18 Jun 2021 10:06:10 +0000 (15:36 +0530)]
rgw/sts: code for returning an error when an IAM policy
resource belongs to someone else's tenant.

While parsing the policy it discards the resource element,
but then when an operation is evaluated, since the resource element
is empty, it doesnt evaluate the resource at all and the policy
ends up erroneously allowing actions on resources in other tenants.

Fixes: https://tracker.ceph.com/issues/51219
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit be42b2cf04def671023b98c811e77e1e357eb38e)

18 months agolog: Make log_max_recent have an effect again. 48311/head
Joshua Baergen [Thu, 16 Jun 2022 16:14:12 +0000 (10:14 -0600)]
log: Make log_max_recent have an effect again.

The log improvements in a747aeac13daf3dba43343120659e802cb569f6b
unfortunately left log_max_recent broken because m_max_recent wasn't
used anymore.

Eliminate m_max_recent and set the capacity of the m_recent ring buffer
when log_max_recent changes. In order to call set_capacity(),
ConcreteEntry needed its move constructor set noexcept.

I haven't followed the boost code all the way down but I suspect that
setting the ring buffer capacity to anything less than 1 entry will
probably cause problems, so restrict log_max_recent to >=1.

Also fix a wrong variable used for printing the max new entries during
"log dump".

Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
(cherry picked from commit 3d59ba1671e3e76326fb706a76b8d9638d782924)

Conflicts:
  - file: src/common/options/global.yaml.in
    desc: file not exists in pacific
  - file: src/common/options.cc
    desc: added 'set_min' for log_max_recent

18 months agoisa-l submodule: incorporate fix for aarch64 text relocation 51314/head
luo rixin [Thu, 11 Jan 2024 11:07:09 +0000 (19:07 +0800)]
isa-l submodule: incorporate fix for aarch64 text relocation

Fixes: https://tracker.ceph.com/issues/48681
Fixes: https://tracker.ceph.com/issues/50384
Signed-off-by: luo rixin <luorixin@huawei.com>
18 months agoMerge pull request #55113 from k0ste/wip-63980-pacific
Yuri Weinstein [Thu, 11 Jan 2024 21:17:03 +0000 (13:17 -0800)]
Merge pull request #55113 from k0ste/wip-63980-pacific

pacific: mon/Monitor: during shutdown don't accept new authentication and crea…

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #55111 from k0ste/wip-63975-pacific
Yuri Weinstein [Thu, 11 Jan 2024 21:16:28 +0000 (13:16 -0800)]
Merge pull request #55111 from k0ste/wip-63975-pacific

pacific: Tools/rados: Improve Error Messaging for Object Name Resolution

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #54553 from k0ste/wip-63366-pacific
Yuri Weinstein [Thu, 11 Jan 2024 21:15:56 +0000 (13:15 -0800)]
Merge pull request #54553 from k0ste/wip-63366-pacific

pacific: mgr: remove out&down osd from mgr daemons

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #54013 from k0ste/wip-63035-pacific
Yuri Weinstein [Thu, 11 Jan 2024 21:15:04 +0000 (13:15 -0800)]
Merge pull request #54013 from k0ste/wip-63035-pacific

pacific: mgr: add throttle policy for DaemonServer

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agotest/test_weighted_shuffle: verify weights containing zeros 55155/head
Radosław Zarzyński [Wed, 30 Aug 2023 13:23:34 +0000 (15:23 +0200)]
test/test_weighted_shuffle: verify weights containing zeros

Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
(cherry picked from commit d02b17ff84c61123ed27d79dc177c2cfbbe6a72f)

18 months agocommon/weighted_shuffle: don't feed std::discrete_distribution with all-zero weights
Radosław Zarzyński [Wed, 30 Aug 2023 13:19:07 +0000 (15:19 +0200)]
common/weighted_shuffle: don't feed std::discrete_distribution with all-zero weights

This flaw results is the assertions like the following one:

```
/usr/include/c++/11/bits/random.tcc:2667: void std::discrete_distribution<_IntType>::param_type::_M_initialize() [with _IntType = int]: Assertion '__sum > 0' failed.
Aborted (core dumped)
```

The reason behind is that `std::discrete_distribution` sums
the weights and uses the result as a divisor.

Fixes: https://tracker.ceph.com/issues/62645
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
(cherry picked from commit 1b7a7a8df88ffac007dbafdecc131807de66c046)

18 months agoMerge pull request #55118 from pdvian/wip-63987-pacific
Laura Flores [Thu, 11 Jan 2024 19:51:16 +0000 (13:51 -0600)]
Merge pull request #55118 from pdvian/wip-63987-pacific

pacific: mon: add exception handling to ceph health mute

18 months agodoc/rados/operations/health-checks: Added Stretch Mode health warnings 52459/head
Kamoltat [Tue, 4 Oct 2022 20:00:22 +0000 (20:00 +0000)]
doc/rados/operations/health-checks: Added Stretch Mode health warnings

Added stretch mode health warnings in docs for:

1. INCORRECT_NUM_BUCKETS_STRETCH_MODE

2. UNEVEN_WEIGHTS_STRETCH_MODE

Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit cfc415c0d95c2531c4f75dd215705f6bf3290b86)

18 months agoqa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh: init
Kamoltat [Wed, 10 Jan 2024 09:24:52 +0000 (09:24 +0000)]
qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh: init

Initialize standalone test for stretched clusters,
testing uneven weight warnings and != 2 buckets
warnings.

Added `wait_for_health_gone()` function in ceph-helpers.sh
this function allows us to wait for health condition to
disappear when doing standalone tests.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit 2c25b29347c840cef451135bdc220992a91f7e4b)
Signed-off-by: Kamoltat <ksirivad@redhat.com>
Conflicts:
qa/standalone/mon-stretch/mon-stretch-fail-recovery.sh -> trivial fix

18 months agoosd/OSDMap: Check for uneven weights & != 2 buckets stretch mode
Kamoltat [Thu, 22 Sep 2022 03:41:16 +0000 (03:41 +0000)]
osd/OSDMap: Check for uneven weights & != 2 buckets stretch mode

Added additional health warnings in
``OSDMap::check_health()``.

1. Check for uneven weights of the two dividing
buckets if stretch mode is enabled and spit out
warnings if true.

2. Check for != 2 buckets if stretch mode is enabled
and spit out warnings if true.

Fixes: https://tracker.ceph.com/issues/57570
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit 78baf23ea214dce3c1a7cf3f3515706d03f950ed)

18 months agoMerge pull request #55090 from cbodley/wip-63963-pacific
Laura Flores [Tue, 9 Jan 2024 23:35:10 +0000 (17:35 -0600)]
Merge pull request #55090 from cbodley/wip-63963-pacific

pacific: make-dist: don't use --continue option for wget

18 months agomon: add exception handling to ceph health mute 55118/head
dradjenovic [Tue, 25 Oct 2022 20:47:10 +0000 (20:47 +0000)]
mon: add exception handling to ceph health mute

Signed-off-by: Daniel Radjenovic <dradjenovic@digitalocean.com>
(cherry picked from commit 08abc31359345751432701de36b00d207d3fb6f6)

18 months agomon/Monitor: during shutdown don't accept new authentication and create new sessions 55113/head
Nitzan Mordechai [Thu, 1 Jun 2023 09:30:48 +0000 (09:30 +0000)]
mon/Monitor: during shutdown don't accept new authentication and create new sessions
During shutdown, the monitor is designed not to accept new authentication requests
or create new sessions. However, a problem arises when the monitor marks its status
as "shutdown" but still accepts new authentication requests and creates new sessions.
This issue causes the monitor to fail when checking the session list.

To fix this problem, an update is implemented. With this fix,
a monitor in the "shutdown" state will correctly reject new authentication requests
and prevent the creation of new sessions.
This ensures that the monitor operates as intended during the shutdown process.

Fixes: https://tracker.ceph.com/issues/56192
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit 4a8c21e3763dad41555765143f4b76f3a543b4f4)

18 months agoTools/rados: Improve Error Messaging for Object Name Resolution 55111/head
NitzanMordhai [Thu, 16 Nov 2023 07:09:29 +0000 (07:09 +0000)]
Tools/rados: Improve Error Messaging for Object Name Resolution

The current implementation of 'rados clearomap' exhibits a behavior where
an error message is generated without the associated object name or,
in the case of a non-existent object name, may result in a segmentation fault.

The proposed fix addresses this issue by enhancing the error message.
After applying the fix, error messages will consistently display the correct
object name, providing users with more accurate and actionable information.

Fixes: https://tracker.ceph.com/issues/63541
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit 313bfca056ef7f83c0e8c70a3bc4ff9d070b63d9)

18 months agoMerge pull request #55086 from petrutlucian94/wip-63954-pacific
Casey Bodley [Tue, 9 Jan 2024 14:12:19 +0000 (14:12 +0000)]
Merge pull request #55086 from petrutlucian94/wip-63954-pacific

pacific: win32_deps_build.sh: change Boost URL

Reviewed-by: Guillaume Abrioux <gabrioux@ibm.com>
18 months agoMerge pull request #55013 from Matan-B/wip-63878-pacific
Yuri Weinstein [Mon, 8 Jan 2024 23:00:03 +0000 (15:00 -0800)]
Merge pull request #55013 from Matan-B/wip-63878-pacific

pacific: tools/ceph_objectstore_tool: Support get/set/superblock

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #54707 from k0ste/wip-63311-pacific
Yuri Weinstein [Mon, 8 Jan 2024 20:44:25 +0000 (12:44 -0800)]
Merge pull request #54707 from k0ste/wip-63311-pacific

pacific: ceph-volume: fix a bug in _check_generic_reject_reasons

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
18 months agoMerge pull request #55024 from idryomov/wip-63607-pacific
Radoslaw Zarzynski [Mon, 8 Jan 2024 20:36:33 +0000 (21:36 +0100)]
Merge pull request #55024 from idryomov/wip-63607-pacific

pacific: librados: make querying pools for selfmanaged snaps reliable

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
18 months agomake-dist: don't use --continue option for wget 55090/head
Casey Bodley [Mon, 8 Jan 2024 16:24:18 +0000 (08:24 -0800)]
make-dist: don't use --continue option for wget

the boost jfrog mirror is broken and returns an HTML error page instead
of the archive. the file size of this page is 11534 bytes

when download_from() retries the download from download.ceph.com, the -c
option tells it to resume the download of the existing file. the
resulting boost_1_82_0.tar.bz2 ends up with the correct total file size
of 121325129 bytes, but the first 11534 bytes still correspond to the
HTML from jfrog. that causes the sha256sum mismatch

remove the -c option so that wget fetches the archive in its entirety

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 2ba7d6e59e8750867059c29a33c22bcb3e358b65)

18 months agowin32_deps_build.sh: change Boost URL 55086/head
Lucian Petrut [Mon, 8 Jan 2024 08:44:51 +0000 (08:44 +0000)]
win32_deps_build.sh: change Boost URL

The Boost download URL is broken again [1], we'll switch to a
working mirror.

[1] https://github.com/boostorg/boost/issues/842

Fixes: https://tracker.ceph.com/issues/63952
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 594d1e5e83e3d4c318ab1dd79660670a0852f7e6)

18 months agomgr/prometheus: change pg_repaired_objects name to pool_repaired_objects 48439/head
Pere Diaz Bou [Mon, 10 Oct 2022 10:08:34 +0000 (12:08 +0200)]
mgr/prometheus: change pg_repaired_objects name to pool_repaired_objects

Fixes: https://tracker.ceph.com/issues/57806
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit 114727fd341ab90328ac3a829807bbc39820f901)

18 months agoMerge pull request #54912 from lxbsz/wip-63833
Yuri Weinstein [Wed, 3 Jan 2024 16:16:35 +0000 (08:16 -0800)]
Merge pull request #54912 from lxbsz/wip-63833

pacific: mds: set the loner to true for LOCK_EXCL_XSYN

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #54696 from k0ste/wip-63660-pacific
Yuri Weinstein [Fri, 29 Dec 2023 15:52:05 +0000 (07:52 -0800)]
Merge pull request #54696 from k0ste/wip-63660-pacific

pacific: doc/rados/configuration/bluestore-config-ref: Fix lowcase typo

Reviewed-by: Nitzan Mordechai <nmordech@redhat.com>
18 months agotools/rados: just return instead of exit(1) in "rados cppool" handler 55024/head
Ilya Dryomov [Fri, 24 Nov 2023 18:53:48 +0000 (19:53 +0100)]
tools/rados: just return instead of exit(1) in "rados cppool" handler

Otherwise an occasional segfault occurs.  This instance was missed in
commit 2c149262888c ("tools/rados: always call rados.shutdown() before
exit()").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit de6635582b7615eb54800a616711073a3c7b0dbd)

18 months agoqa: make sure "rados cppool" requires --yes-i-really-mean-it for RBD
Ilya Dryomov [Thu, 23 Nov 2023 19:24:24 +0000 (20:24 +0100)]
qa: make sure "rados cppool" requires --yes-i-really-mean-it for RBD

Safeguards in rados CLI tool isn't really the subject of this test, but
it fits nicely.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 2b135a2eb60e0dd5ab22d213d3d2435608c6a9d3)

18 months agolibrados: make querying pools for selfmanaged snaps reliable
Ilya Dryomov [Wed, 22 Nov 2023 13:39:13 +0000 (14:39 +0100)]
librados: make querying pools for selfmanaged snaps reliable

If get_pool_is_selfmanaged_snaps_mode() is invoked on a fresh RADOS
client instance that still lacks an osdmap, it returns false, same as
for "this pool is not in selfmanaged snaps mode".  The same happens if
the pool in question doesn't exist since the signature doesn't allow to
return an error.

The motivation for this API was to prevent users from running "rados
cppool" on a pool with unmanaged snapshots and deleting the original
thinking that they have a full copy.  Unfortunately, it's exactly
"rados cppool" that fell into this trap, so no warning is printed and
--yes-i-really-mean-it flag isn't enforced.

Fixes: https://tracker.ceph.com/issues/63607
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0999e63bfbbee46b8e19c3f05881eee64dba8b5e)

Conflicts:
PendingReleaseNotes [ moved to >=16.2.15 section ]

18 months agolibrados: clarify get_pool_is_selfmanaged_snaps_mode() semantics
Ilya Dryomov [Thu, 23 Nov 2023 19:35:41 +0000 (20:35 +0100)]
librados: clarify get_pool_is_selfmanaged_snaps_mode() semantics

Refer to the commit message of 8a9769a1d5fd ("librados: add
get_pool_is_selfmanaged_snaps_mode() function").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 54edc7955b0593423d2c03ca308b5e5fcdc528a3)

18 months agoMerge pull request #54949 from idryomov/wip-53897-pacific
Yuri Weinstein [Thu, 28 Dec 2023 15:43:24 +0000 (07:43 -0800)]
Merge pull request #54949 from idryomov/wip-53897-pacific

pacific: librbd: don't report HOLE_UPDATED when diffing against a hole

Reviewed-by: Mykola Golub <mgolub@suse.com>
18 months agoMerge pull request #54548 from k0ste/wip-62818-pacific
Yuri Weinstein [Thu, 28 Dec 2023 15:41:37 +0000 (07:41 -0800)]
Merge pull request #54548 from k0ste/wip-62818-pacific

pacific: osd: ensure async recovery does not drop a pg below min_size

Reviewed-by: Neha Ojha <nojha@redhat.com>
18 months agoMerge pull request #53470 from k0ste/wip-51195-pacific
Yuri Weinstein [Thu, 28 Dec 2023 15:40:53 +0000 (07:40 -0800)]
Merge pull request #53470 from k0ste/wip-51195-pacific

pacific: rados: increase osd_max_write_op_reply_len default to 64 bytes

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
18 months agoMerge pull request #52555 from k0ste/wip-62091-pacific
Yuri Weinstein [Thu, 28 Dec 2023 15:40:22 +0000 (07:40 -0800)]
Merge pull request #52555 from k0ste/wip-62091-pacific

pacific:  mon: fix iterator mishandling in PGMap::apply_incremental

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
18 months agoMerge pull request #51692 from k0ste/wip-61340-pacific
Yuri Weinstein [Thu, 28 Dec 2023 15:39:38 +0000 (07:39 -0800)]
Merge pull request #51692 from k0ste/wip-61340-pacific

pacific: mgr/prometheus: fix pool_objects_repaired and daemon_health_metrics format

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
18 months agoMerge pull request #51414 from kamoltat/wip-ksirivad-backport-pacific-47340-and-50857
Yuri Weinstein [Thu, 28 Dec 2023 15:36:58 +0000 (07:36 -0800)]
Merge pull request #51414 from kamoltat/wip-ksirivad-backport-pacific-47340-and-50857

pacific:mon/Monitor.cc: exit function if !osdmon()->is_writeable() && mon/OSDMonitor: Added extra check before mon.go_recovery_stretch_mode()

Reviewed-by: Nitzan Mordechai <nmordech@redhat.com>
18 months agoMerge pull request #50518 from badone/wip-57209-pacific
Yuri Weinstein [Thu, 28 Dec 2023 15:35:26 +0000 (07:35 -0800)]
Merge pull request #50518 from badone/wip-57209-pacific

pacific: test/lazy-omap-stats: Various enhancements

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #46696 from NitzanMordhai/wip-54281-pacific
Yuri Weinstein [Thu, 28 Dec 2023 15:34:06 +0000 (07:34 -0800)]
Merge pull request #46696 from NitzanMordhai/wip-54281-pacific

pacific: pybind/mgr: ceph osd status crash with ZeroDivisionError

Reviewed-by: Matan Breizman <Matan.Brz@gmail.com>
18 months agoMerge pull request #54901 from cbodley/wip-pacific-rhel-8.6
Yuri Weinstein [Wed, 27 Dec 2023 18:06:20 +0000 (10:06 -0800)]
Merge pull request #54901 from cbodley/wip-pacific-rhel-8.6

pacific: qa/distros: backport update from rhel 8.4 -> 8.6

Reviewed-by: Venky Shankar <vshankar@redhat.com>
18 months agodoc/man/8/ceph-objectstore-tool.rst: add get/set superblock doc 55013/head
Matan Breizman [Sun, 15 Oct 2023 14:23:36 +0000 (14:23 +0000)]
doc/man/8/ceph-objectstore-tool.rst: add get/set superblock doc

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit fc1049764c0bb2158278b309764c4a298da70d41)

18 months agotools/ceph_objectstore_tool: Support get-/set-/superblock
Matan Breizman [Sun, 15 Oct 2023 10:50:52 +0000 (10:50 +0000)]
tools/ceph_objectstore_tool: Support get-/set-/superblock

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 1a547ca4640fd9c3f4f25fe1d85fb09043ebd5bc)

19 months agoMerge pull request #54691 from Matan-B/wip-63649-pacific
Laura Flores [Tue, 19 Dec 2023 18:36:26 +0000 (12:36 -0600)]
Merge pull request #54691 from Matan-B/wip-63649-pacific

pacific: tools/ceph_objectstore_tool: action_on_all_objects_in_pg to skip pgmeta

19 months agotest/pybind/rbd: don't ignore from_snapshot in check_diff() 54949/head
Ilya Dryomov [Sun, 10 Dec 2023 16:01:24 +0000 (17:01 +0100)]
test/pybind/rbd: don't ignore from_snapshot in check_diff()

Despite the test in test_diff_iterate() being correct, it started
failing:

    >       check_diff(self.image, 0, IMG_SIZE, 'snap1', [(0, 512, False)])
    ...
    a = [], b = [(0, 512, False)]
    ...
    >       assert a == b
    E       AssertionError

This is because check_diff() drops 'snap1' argument on the floor and
passes None to image.diff_iterate() instead.  This goes back to 2013,
see commit e88fe3cbbc8f ("rbd.py: add some missing functions").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit f8ced6d1fe667864bee224104c23b62a2c1c0bfc)

19 months agotest/librbd: redo TestMockObjectMapDiffRequest.*Delta tests
Ilya Dryomov [Sun, 3 Dec 2023 15:39:39 +0000 (16:39 +0100)]
test/librbd: redo TestMockObjectMapDiffRequest.*Delta tests

Existing *Delta tests cover:

- beginning of time -> HEAD, through intermediate snap
- snap -> snap, directly
- snap -> HEAD, directly

But coverage is too weak: none of the weird OBJECT_PENDING cases and
only a single diff-iterate vs deep-copy case is tested, for example.

Coverage is missing completely for:

- beginning of time -> HEAD, directly
- beginning of time -> snap, directly
- beginning of time -> snap, through intermediate snap
- snap -> snap, through intermediate snap
- snap -> HEAD, through intermediate snap

This adds the following tests:

- FromBeginningToHead
- FromBeginningToHeadIntermediateSnap (expands FullDelta)
- FromBeginningToSnap
- FromBeginningToSnapIntermediateSnap
- FromSnapToSnap (expands IntermediateDelta)
- FromSnapToSnapIntermediateSnap
- FromSnapToHead (expands EndDelta)
- FromSnapToHeadIntermediateSnap

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 7aff35c987b9f0e9f0d4198d032737da0ce12b36)

19 months agotest/librbd: parametrize TestMockObjectMapDiffRequest tests
Ilya Dryomov [Sun, 3 Dec 2023 13:49:43 +0000 (14:49 +0100)]
test/librbd: parametrize TestMockObjectMapDiffRequest tests

Exercise both diff-iterate and deep-copy modes of operation.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit f47f7f87d05da661786415dd8fbb0ac67c530e18)

19 months agolibrbd: OBJECT_PENDING should always be treated as dirty
Ilya Dryomov [Fri, 8 Dec 2023 14:19:02 +0000 (15:19 +0100)]
librbd: OBJECT_PENDING should always be treated as dirty

OBJECT_PENDING is a transition state which normally isn't encountered
in (snapshot) object maps.  In case it's encountered, for example when
a snapshot is taken after losing power at the time a discard was being
handled, the object should be treated as dirty and produce a diff as
a result.

Assuming an object is marked OBJECT_PENDING, theoretically there are
four cases with respect to object's state in the next snapshot:

    1. OBJECT_NONEXISTENT
    2. OBJECT_EXISTS
    3. OBJECT_PENDING
    4. OBJECT_EXISTS_CLEAN

Prior to commit b81cd2460de7 ("librbd/object_map: diff state machine
should track object existence"), (3) was handled incorrectly (diff set
to DIFF_STATE_NONE instead of DIFF_STATE_UPDATED).

Post commit 399a45e11332 ("librbd/object_map: rbd diff between two
snapshots lists entire image content"), (4) is handled incorrectly
(diff set to DIFF_STATE_DATA instead of DIFF_STATE_DATA_UPDATED).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 70c1991f225c137abf769111086b6c61abc0ece3)

19 months agotest/librbd: expand DiffIterateTest.DiffIterateDiscard
Ilya Dryomov [Thu, 30 Nov 2023 16:30:33 +0000 (17:30 +0100)]
test/librbd: expand DiffIterateTest.DiffIterateDiscard

Similar to DiffIterateTest.DiffIterateDeterministic, systematically
cover the most common cases involving full-object discards.  With this
in place, issue [1] can be reproduced by any of:

    (preparatory) before snap3 is taken
    (1) beginning of time -> HEAD
    (2) snap1 -> HEAD
    (5) beginning of time -> snap3
    (6) snap1 -> snap3

Sub-object discards aren't covered here because of further issues
[2][3].

[1] https://tracker.ceph.com/issues/53897
[2] https://tracker.ceph.com/issues/63770
[3] https://tracker.ceph.com/issues/63771

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6b45a2d920aad2edf17544807f7032e2b11efef3)

19 months agolibrbd: resurrect "exists" assert in simple_diff_cb()
Ilya Dryomov [Fri, 10 Nov 2023 10:14:42 +0000 (11:14 +0100)]
librbd: resurrect "exists" assert in simple_diff_cb()

This effectively reverts commit 3ccc3bb4bd35 ("librbd: diff_iterate
needs to handle holes in parent images") which just dropped the assert
instead of addressing the root cause of reported crashes.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit bcb107afcd2b0e34b1eefa4767691c5d8d109a82)

19 months agolibrbd: diff-iterate shouldn't ever report "new hole" against a hole
Ilya Dryomov [Thu, 9 Nov 2023 19:44:18 +0000 (20:44 +0100)]
librbd: diff-iterate shouldn't ever report "new hole" against a hole

If an object doesn't exist in both start and end versions but there is
an intermediate snapshot which contains it (i.e. the object is written
to and captured at some point but then discarded prior to or in the end
version), diff-iterate reports "new hole" -- callback is invoked with
exists=false.  This occurs both on the slow list_snaps path and in
fast-diff mode.

Despite going all the way back to the introduction of diff-iterate in
commit 0296c7cdae91 ("librbd: implement diff_iterate"), this behavior
is wrong and contradicts diff-iterate API documentation added in commit
a69532e86450 ("librbd: document diff_iterate in header") in the same
series:

    If the source snapshot name is NULL, we interpret that as
    the beginning of time and return all allocated regions of the
    image.

It also triggered an assert added in commit c680531e070a ("librbd:
change diff_iterate interface to be more C-friendly") in the same
series.  Unfortunately, commit f1f6407221a0 ("test_librbd: add
diff_iterate test including discard"), also part of the same series,
added a test which expected the wrong behavior.  Very confusing!

A year later, a different manifestation of this bug was fixed in commit
9a1ab95176fe ("rbd: Fix rbd diff for non-existent objects"), but the
fix only covered the case where calc_snap_set_diff() goes past the end
snap ID while processing clones.  The case where it runs out of clones
to process before reaching the end snap ID remained mishandled.

A year after that, commit 3ccc3bb4bd35 ("librbd: diff_iterate needs to
handle holes in parent images") dropped the assert mentioned above and
this bug got enshrined in the newly introduced fast-diff mode.

Finally, a few years later, deep-copy actually started relying on this
bug in commit e5a21e904142 ("librbd: deep-copy image copy state machine
skips clean objects").  This necessitates bifurcation in DiffRequest
because deep-copy wants the "has this object been touched" semantics,
which is different from diff-iterate (and also potentially much more
expensive to produce!).

This commit brings a minimal update to TestMockObjectMapDiffRequest
tests and DiffIterateTest.DiffIterateDiscard.  Coverage is expanded in
the following commits.

Fixes: https://tracker.ceph.com/issues/53897
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit be507aaed15fb7a193a90c5f88eda61b9be2af1b)

19 months agomds: set the loner to true for LOCK_EXCL_XSYN 54912/head
Xiubo Li [Mon, 27 Nov 2023 07:55:42 +0000 (15:55 +0800)]
mds: set the loner to true for LOCK_EXCL_XSYN

For filelock when in LOCK_EXCL_XSYN state the non-loner clients
should be issued empty caps, but since the loner of this state
is set to false and it could make the Locker to issue the Fcb caps
to them, which is incorrect.

This fix will just set the loner to true.

Fixes: https://tracker.ceph.com/issues/63646
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 1766a354278706eea560cb989796cc97dbef8b4b)

19 months agoqa/cephadm: update rhel symlinks in rados/cephadm/smoke/distro 54901/head
Casey Bodley [Thu, 14 Dec 2023 23:08:32 +0000 (18:08 -0500)]
qa/cephadm: update rhel symlinks in rados/cephadm/smoke/distro

Signed-off-by: Casey Bodley <cbodley@redhat.com>
19 months agoqa: Default to RHEL8.6 instead of 8.5
David Galloway [Wed, 8 Jun 2022 19:07:09 +0000 (15:07 -0400)]
qa: Default to RHEL8.6 instead of 8.5

Signed-off-by: David Galloway <dgallowa@redhat.com>
(cherry picked from commit b8c4488c558e1f824af1aae3fa14ac7ae1a366b1)

Conflicts:
qa/distros/container-hosts/ stuff was under qa/distros/podman/
qa/suites/fs/workload/0-rhel_8.yaml does not exist

19 months agoqa: Latest RHEL8 -> RHEL8.5
David Galloway [Thu, 31 Mar 2022 16:13:19 +0000 (12:13 -0400)]
qa: Latest RHEL8 -> RHEL8.5

Signed-off-by: David Galloway <dgallowa@redhat.com>
(cherry picked from commit fcd512b50b03f3a10c971bb224fc53dbcb45d78b)

Conflicts:
qa/distros/container-hosts/ stuff was under qa/distros/podman/
qa/suites/fs/workload/0-rhel_8.yaml does not exist

19 months agoMerge pull request #54860 from idryomov/wip-63654-pacific
Yuri Weinstein [Tue, 12 Dec 2023 19:19:11 +0000 (11:19 -0800)]
Merge pull request #54860 from idryomov/wip-63654-pacific

pacific: librbd: fix regressions in ObjectListSnapsRequest

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
19 months agoMerge pull request #54859 from idryomov/wip-journaling-test-fixups-pacific
Yuri Weinstein [Tue, 12 Dec 2023 19:18:13 +0000 (11:18 -0800)]
Merge pull request #54859 from idryomov/wip-journaling-test-fixups-pacific

pacific: test/librbd: avoid config-related crashes in DiscardWithPruneWriteOverlap

Reviewed-by: Mykola Golub <mgolub@suse.com>
19 months agoMerge pull request #49093 from cfsnyder/wip-54497-pacific
Yuri Weinstein [Mon, 11 Dec 2023 19:07:58 +0000 (11:07 -0800)]
Merge pull request #49093 from cfsnyder/wip-54497-pacific

pacific: rgw: prevent spurious/lost notifications in the index completion thread

Reviewed-by: Casey Bodley <cbodley@redhat.com>