]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
18 months agorgw: object lock uses 64-bit encoding for RetainUntilDate 54675/head
Casey Bodley [Wed, 15 Nov 2023 21:24:47 +0000 (16:24 -0500)]
rgw: object lock uses 64-bit encoding for RetainUntilDate

the default encoding of ceph::real_time truncates seconds to uint32_t,
so stores the wrong timestamp for object lock enforcement

Fixes: https://tracker.ceph.com/issues/63537
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 1fd4309fbbebf0d3e67aa2800d5fb3c7de19dcc7)

18 months agoencoding: add round_trip_encode()/decode() for chrono types
Casey Bodley [Wed, 15 Nov 2023 20:29:35 +0000 (15:29 -0500)]
encoding: add round_trip_encode()/decode() for chrono types

the default encodings for chrono types were made to be
backward-compatible with utime_t, so truncated seconds to 32 bits

adds new functions that encode these chrono types using their underlying
representation, which for ceph::real_time and ceph::timespan is
'nanoseconds as uint64_t'

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

18 months agoMerge pull request #55129 from zdover23/wip-doc-2024-01-10-backport-55106-to-quincy
Anthony D'Atri [Wed, 10 Jan 2024 15:27:34 +0000 (10:27 -0500)]
Merge pull request #55129 from zdover23/wip-doc-2024-01-10-backport-55106-to-quincy

quincy: doc/rgw: edit admin.rst - rate limit management

18 months agodoc/rgw: edit admin.rst - rate limit management 55129/head
Zac Dover [Tue, 9 Jan 2024 13:42:34 +0000 (23:42 +1000)]
doc/rgw: edit admin.rst - rate limit management

Edit the "Rate Limit Management" section in doc/radosgw/admin.rst.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 47fabe757cff630aaf23a85d268b7406057244e2)

18 months agoMerge pull request #55092 from cbodley/wip-63965-quincy
Casey Bodley [Tue, 9 Jan 2024 18:07:40 +0000 (18:07 +0000)]
Merge pull request #55092 from cbodley/wip-63965-quincy

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

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #55085 from petrutlucian94/wip-63956-quincy
Casey Bodley [Tue, 9 Jan 2024 14:55:22 +0000 (14:55 +0000)]
Merge pull request #55085 from petrutlucian94/wip-63956-quincy

quincy: win32_deps_build.sh: change Boost URL

Reviewed-by: Guillaume Abrioux <gabrioux@ibm.com>
18 months agoMerge pull request #55025 from idryomov/wip-63607-quincy
Radoslaw Zarzynski [Mon, 8 Jan 2024 21:24:55 +0000 (22:24 +0100)]
Merge pull request #55025 from idryomov/wip-63607-quincy

quincy: librados: make querying pools for selfmanaged snaps reliable

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
18 months agoMerge pull request #54123 from batrick/wip-63276-quincy
Yuri Weinstein [Mon, 8 Jan 2024 20:41:58 +0000 (12:41 -0800)]
Merge pull request #54123 from batrick/wip-63276-quincy

quincy: cmake: use or turn off liburing for rocksdb

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #52461 from batrick/wip-62023-quincy
Yuri Weinstein [Mon, 8 Jan 2024 20:11:54 +0000 (12:11 -0800)]
Merge pull request #52461 from batrick/wip-62023-quincy

quincy: pybind/mgr: reopen database handle on blocklist

Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #53973 from Matan-B/wip-63181-quincy
Yuri Weinstein [Mon, 8 Jan 2024 20:08:58 +0000 (12:08 -0800)]
Merge pull request #53973 from Matan-B/wip-63181-quincy

quincy: osd/OSD: introduce reset_purged_snaps_last

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
18 months agoMerge pull request #53718 from leonid-s-usov/bp/msg-wait/quincy
Yuri Weinstein [Mon, 8 Jan 2024 20:08:12 +0000 (12:08 -0800)]
Merge pull request #53718 from leonid-s-usov/bp/msg-wait/quincy

quincy: msg/AsyncMessenger: re-evaluate the stop condition when woken up in 'wait()'

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
18 months agoMerge pull request #52458 from kamoltat/wip-ksirivad-backport-quincy-48209
Yuri Weinstein [Mon, 8 Jan 2024 20:06:50 +0000 (12:06 -0800)]
Merge pull request #52458 from kamoltat/wip-ksirivad-backport-quincy-48209

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

Reviewed-by: Nitzan Mordechai <nmordech@redhat.com>
18 months agoMerge pull request #54534 from pdvian/wip-63367-quincy
Radoslaw Zarzynski [Mon, 8 Jan 2024 19:47:23 +0000 (20:47 +0100)]
Merge pull request #54534 from pdvian/wip-63367-quincy

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

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
18 months agoMerge pull request #53886 from sseshasa/wip-63129-quincy
Radoslaw Zarzynski [Mon, 8 Jan 2024 19:39:45 +0000 (20:39 +0100)]
Merge pull request #53886 from sseshasa/wip-63129-quincy

quincy: mon/ConfigMonitor: Show localized name in "config dump --format json" output

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
18 months agomake-dist: don't use --continue option for wget 55092/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 agoMerge pull request #55083 from zdover23/wip-doc-2024-01-08-backport-55075-to-quincy
Anthony D'Atri [Mon, 8 Jan 2024 13:53:19 +0000 (08:53 -0500)]
Merge pull request #55083 from zdover23/wip-doc-2024-01-08-backport-55075-to-quincy

quincy: doc/radosgw: edit admin.rst - quota

18 months agowin32_deps_build.sh: change Boost URL 55085/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 agodoc/radosgw: edit admin.rst - quota 55083/head
Zac Dover [Sun, 7 Jan 2024 12:10:59 +0000 (22:10 +1000)]
doc/radosgw: edit admin.rst - quota

Edit the "Quota Management" section (all of it) in
doc/radosgw/admin.rst.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 22fce3c7a55591f6755355751157bc7231776137)

18 months agoMerge pull request #55072 from zdover23/wip-doc-2024-01-06-backport-55069-to-quincy
zdover23 [Sun, 7 Jan 2024 12:16:07 +0000 (22:16 +1000)]
Merge pull request #55072 from zdover23/wip-doc-2024-01-06-backport-55069-to-quincy

quincy: doc: update rgw admin api req params for get user info

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
18 months agoMerge pull request #55074 from zdover23/wip-doc-2024-10-06-backport-55065-to-quincy
Anthony D'Atri [Fri, 5 Jan 2024 23:37:48 +0000 (18:37 -0500)]
Merge pull request #55074 from zdover23/wip-doc-2024-10-06-backport-55065-to-quincy

quincy: doc/radosrgw: edit admin.rst

18 months agodoc/radosrgw: edit admin.rst 55074/head
Zac Dover [Fri, 5 Jan 2024 11:11:59 +0000 (21:11 +1000)]
doc/radosrgw: edit admin.rst

Edit "Add / Remove Admin Capabilities" in doc/radosgw/admin.rst.

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 1f0ff27898dfd06a17b18fadd52f68dfb73ccb94)

18 months agodoc: update rgw admin api req params for get user info 55072/head
Ali Maredia [Fri, 5 Jan 2024 20:13:41 +0000 (20:13 +0000)]
doc: update rgw admin api req params for get user info

Signed-off-by: Ali Maredia <amaredia@redhat.com>
(cherry picked from commit e6c58dcd614f71efa4de2f781b8425c480af285e)

18 months agoMerge pull request #54950 from idryomov/wip-53897-quincy
Yuri Weinstein [Fri, 5 Jan 2024 15:35:48 +0000 (07:35 -0800)]
Merge pull request #54950 from idryomov/wip-53897-quincy

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

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
18 months agoMerge pull request #54090 from mchangir/wip-63241-quincy
Milind Changire [Fri, 5 Jan 2024 05:13:34 +0000 (10:43 +0530)]
Merge pull request #54090 from mchangir/wip-63241-quincy

quincy: mgr/snap_schedule: make fs argument mandatory if more than one filesystem exists

18 months agoqa: use correct imports to resolve fuse_mount and kernel_mount 54090/head
Milind Changire [Mon, 13 Nov 2023 07:26:50 +0000 (12:56 +0530)]
qa: use correct imports to resolve fuse_mount and kernel_mount

Fixes: https://tracker.ceph.com/issues/62706
Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit 994ae0d633843e61eae91f409ec3b0336db71dc3)

18 months agoPendingReleaseNotes: note about mandatory fs argument
Milind Changire [Wed, 16 Aug 2023 10:56:37 +0000 (16:26 +0530)]
PendingReleaseNotes: note about mandatory fs argument

Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit 71c6356f0a7551f3798dc0d5e58d9781736692d6)

18 months agodoc/cephfs: add note about mandatory --fs argument to snap-schedule
Milind Changire [Wed, 2 Aug 2023 08:41:26 +0000 (14:11 +0530)]
doc/cephfs: add note about mandatory --fs argument to snap-schedule

Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit 8c29772fbe60b7b7657fa53d84e24bf74c993dca)

18 months agoqa: add test for mandatory fs argument to snap-schedule commands
Milind Changire [Fri, 18 Aug 2023 17:40:37 +0000 (23:10 +0530)]
qa: add test for mandatory fs argument to snap-schedule commands

Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit 484336e1c3dccd42d594234614936ab1f4b0d35a)

18 months agomgr/snap-schedule: tweaks to keep mypy happy
Milind Changire [Sat, 19 Aug 2023 13:06:59 +0000 (18:36 +0530)]
mgr/snap-schedule: tweaks to keep mypy happy

Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit c208ce9f3ced89755b1180178812ef82aa1a5346)

18 months agomgr/snap_schedule: validate fs before execution
Milind Changire [Wed, 9 Aug 2023 11:20:40 +0000 (16:50 +0530)]
mgr/snap_schedule: validate fs before execution

Stop command execution if there are more than one filesystem and --fs
argument is missing in command-line, i.e. do not use the first fs in the
fsmap if there are more than one filesystem.
This is to ensure that user doesn't mistakenly run the command against
the first fs by missing to specify the desired fs.

Fixes: https://tracker.ceph.com/issues/62218
Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit c612ce06300fa99f750ce99ef68dbd49ced16c34)

18 months agoMerge pull request #54539 from aaSharma14/wip-63572-quincy
Aashish Sharma [Thu, 4 Jan 2024 09:45:40 +0000 (15:15 +0530)]
Merge pull request #54539 from aaSharma14/wip-63572-quincy

quincy: mgr/dashboard: Show the OSDs Out and Down panels as red whenever an OSD is in Out or Down state in Ceph Cluster grafana dashboard

Reviewed-by: Nizamudeen A <nia@redhat.com>
18 months agoMerge pull request #55056 from zdover23/wip-doc-2024-01-04-backport-55048-to-quincy
Anthony D'Atri [Thu, 4 Jan 2024 04:42:21 +0000 (23:42 -0500)]
Merge pull request #55056 from zdover23/wip-doc-2024-01-04-backport-55048-to-quincy

quincy: doc/radosgw: edit "Add/Remove a Key"

18 months agodoc/radosgw: edit "Add/Remove a Key" 55056/head
Zac Dover [Wed, 3 Jan 2024 08:41:51 +0000 (18:41 +1000)]
doc/radosgw: edit "Add/Remove a Key"

Edit the section "Add/Remove a Key" in doc/radosgw/admin.rst. Each
operation (e.g. "Adding an S3 key pair for a user", "Removing an S3 key
pair for a user") now has its own subsection. This increased granularity
should make it easier in the future to link to each of these specific
operations, if needed.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit f62e93cbe73cd8f624a6c99497051c1a0aaf3ab6)

18 months agoMerge pull request #54405 from joscollin/wip-63475-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:15:06 +0000 (08:15 -0800)]
Merge pull request #54405 from joscollin/wip-63475-quincy

quincy: client: call _getattr() for -ENODATA returned _getvxattr() calls

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #54317 from batrick/wip-63415-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:14:35 +0000 (08:14 -0800)]
Merge pull request #54317 from batrick/wip-63415-quincy

quincy: mon: fix mds metadata lost in one case.

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #54206 from neesingh-rh/wip-63263-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:14:08 +0000 (08:14 -0800)]
Merge pull request #54206 from neesingh-rh/wip-63263-quincy

quincy: mgr/volumes: fix `subvolume group rm` error message

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #54034 from vshankar/wip-63175-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:13:43 +0000 (08:13 -0800)]
Merge pull request #54034 from vshankar/wip-63175-quincy

quincy: mds: adjust pre_segments_size for MDLog when trimming segments for st…

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #53917 from kotreshhr/wip-63163-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:13:14 +0000 (08:13 -0800)]
Merge pull request #53917 from kotreshhr/wip-63163-quincy

quincy: pybind/mgr/volumes: log mutex locks to help debug deadlocks

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #53911 from kotreshhr/wip-62404-quincy-qa-fix
Yuri Weinstein [Wed, 3 Jan 2024 16:11:50 +0000 (08:11 -0800)]
Merge pull request #53911 from kotreshhr/wip-62404-quincy-qa-fix

quincy: qa: Wait for purge to complete

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #53907 from vshankar/wip-62799-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:10:59 +0000 (08:10 -0800)]
Merge pull request #53907 from vshankar/wip-62799-quincy

quincy: qa: move nfs (mgr/nfs) related tests to fs suite

Reviewed-by: Kotresh HR khiremat@redhat.com
Reviewed-by: Adam King adking@redhat.com
18 months agoMerge pull request #53554 from batrick/wip-62898-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:08:29 +0000 (08:08 -0800)]
Merge pull request #53554 from batrick/wip-62898-quincy

quincy: qa: lengthen shutdown timeout for thrashed MDS

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #53551 from batrick/wip-62907-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:03:23 +0000 (08:03 -0800)]
Merge pull request #53551 from batrick/wip-62907-quincy

quincy: mds,qa: some balancer debug messages (<=5) not printed when debug_mds is >=5

Reviewed-by: Kotresh HR khiremat@redhat.com
18 months agoMerge pull request #53549 from batrick/wip-62900-quincy
Yuri Weinstein [Wed, 3 Jan 2024 16:01:24 +0000 (08:01 -0800)]
Merge pull request #53549 from batrick/wip-62900-quincy

quincy: mds: log message when exiting due to asok command

Reviewed-by: Kotresh HR khiremat@redhat.com
Reviewed-by: Christopher Hoffman <choffman@redhat.com>
18 months agoMerge pull request #53559 from batrick/wip-57777-quincy
zdover23 [Wed, 3 Jan 2024 06:34:03 +0000 (16:34 +1000)]
Merge pull request #53559 from batrick/wip-57777-quincy

quincy: doc: discuss the standard multi-tenant CephFS security model

Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
18 months agoMerge pull request #55045 from zdover23/wip-doc-2024-01-02-backport-55038-to-quincy
Anthony D'Atri [Tue, 2 Jan 2024 14:08:37 +0000 (09:08 -0500)]
Merge pull request #55045 from zdover23/wip-doc-2024-01-02-backport-55038-to-quincy

quincy: doc/cephfs: Update disaster-recovery-experts.rst to mention Slack

18 months agodoc/cephfs: Update disaster-recovery-experts.rst to mention Slack 55045/head
Dhairya Parmar [Mon, 1 Jan 2024 11:43:12 +0000 (17:13 +0530)]
doc/cephfs: Update disaster-recovery-experts.rst to mention Slack

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
(cherry picked from commit 6601e7f38c0b2c1326d40f3bb0599069e38421ff)

18 months agoMerge pull request #55035 from zdover23/wip-doc-2024-01-01-backport-55030-to-quincy
Anthony D'Atri [Mon, 1 Jan 2024 01:01:52 +0000 (20:01 -0500)]
Merge pull request #55035 from zdover23/wip-doc-2024-01-01-backport-55030-to-quincy

quincy: doc/radosgw: edit "remove a subuser"

18 months agoMerge pull request #55033 from zdover23/wip-doc-2024-01-01-backport-55031-to-quincy
Anthony D'Atri [Mon, 1 Jan 2024 00:41:02 +0000 (19:41 -0500)]
Merge pull request #55033 from zdover23/wip-doc-2024-01-01-backport-55031-to-quincy

quincy: doc/mgr: document lack of MSWin NFS 4.x support

18 months agodoc/radosgw: edit "remove a subuser" 55035/head
Zac Dover [Sun, 31 Dec 2023 06:22:33 +0000 (16:22 +1000)]
doc/radosgw: edit "remove a subuser"

Edit the English language in the section "Remove a Subuser" in
doc/radosgw/admin.rst. This commit is made in response to Matt
Benjamin's request for improvement of this section
(https://github.com/ceph/ceph/pull/55028#discussion_r1438599833).

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 8fc3c488861887490f6ec6bac8f49770664b49a6)

18 months agodoc/mgr: document lack of MSWin NFS 4.x support 55033/head
Zac Dover [Mon, 1 Jan 2024 00:10:42 +0000 (10:10 +1000)]
doc/mgr: document lack of MSWin NFS 4.x support

Document that no version of Microsoft Windows supports mounting an NFS
v4.x export natively, as of the time of this commit.

This commit has been made in response to an anonymous note left on
https://pad.ceph.com/p/Report_Documentation_Bugs.

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 03656c02a70d4ab719cbcf605517f8a2e9e81117)

18 months agoMerge pull request #55028 from zdover23/wip-doc-2023-12-30-backport-55023-to-quincy
Anthony D'Atri [Sat, 30 Dec 2023 14:22:37 +0000 (09:22 -0500)]
Merge pull request #55028 from zdover23/wip-doc-2023-12-30-backport-55023-to-quincy

quincy: doc/radosgw: edit sections

18 months agodoc/radosgw: edit sections 55028/head
Zac Dover [Fri, 29 Dec 2023 08:32:04 +0000 (18:32 +1000)]
doc/radosgw: edit sections

Edit the following sections in doc/radosgw/admin.rst:

* Remove a User
* Remove a Subuser

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 8631dc58f7144b32febadd9072c6691456ac8f28)

18 months agotools/rados: just return instead of exit(1) in "rados cppool" handler 55025/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 >=17.2.8 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 #55021 from zdover23/wip-doc-2023-12-28-backport-55011-to-quincy
Anthony D'Atri [Thu, 28 Dec 2023 02:48:34 +0000 (21:48 -0500)]
Merge pull request #55021 from zdover23/wip-doc-2023-12-28-backport-55011-to-quincy

quincy: doc/radosgw: admin.rst - edit "Create a Subuser"

18 months agodoc/radosgw: admin.rst - edit "Create a Subuser" 55021/head
Zac Dover [Wed, 27 Dec 2023 04:28:51 +0000 (14:28 +1000)]
doc/radosgw: admin.rst - edit "Create a Subuser"

Edit the section "Create a Subuser" in doc/radosgw/admin.rst.

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 3c7a6c41df540f935b0b0b2c4fdc7375327a7662)

18 months agoMerge pull request #55018 from zdover23/wip-doc-2023-12-28-backport-55016-to-quincy
Anthony D'Atri [Wed, 27 Dec 2023 15:26:59 +0000 (10:26 -0500)]
Merge pull request #55018 from zdover23/wip-doc-2023-12-28-backport-55016-to-quincy

quincy: doc/radosgw: admin.rst - edit sections

18 months agodoc/radosgw: admin.rst - edit sections 55018/head
Zac Dover [Wed, 27 Dec 2023 12:14:59 +0000 (22:14 +1000)]
doc/radosgw: admin.rst - edit sections

Edit the following sections in doc/radosgw/admin.rst:

- Get User Info
- Modify User Info
- User Suspend/Enable (I split this into two sections)

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 21ebd2e855a4dd2d2d1244bb3688db0c6613dc30)

18 months agotest/pybind/rbd: don't ignore from_snapshot in check_diff() 54950/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)

18 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)

18 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)

18 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)

18 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)

18 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)

18 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)

18 months agoMerge pull request #54861 from idryomov/wip-63654-quincy
Yuri Weinstein [Tue, 26 Dec 2023 16:37:58 +0000 (08:37 -0800)]
Merge pull request #54861 from idryomov/wip-63654-quincy

quincy: librbd: fix regressions in ObjectListSnapsRequest

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
18 months agoMerge pull request #54819 from baergj/wip-63747-quincy
Yuri Weinstein [Tue, 26 Dec 2023 16:37:18 +0000 (08:37 -0800)]
Merge pull request #54819 from baergj/wip-63747-quincy

quincy: librbd: Append one journal event per image request

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
18 months agoMerge pull request #54770 from ajarr/wip-63716-quincy
Yuri Weinstein [Tue, 26 Dec 2023 16:36:52 +0000 (08:36 -0800)]
Merge pull request #54770 from ajarr/wip-63716-quincy

quincy: 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@redhat.com>
18 months agoMerge pull request #54292 from ajarr/wip-63386-quincy
Yuri Weinstein [Tue, 26 Dec 2023 16:36:19 +0000 (08:36 -0800)]
Merge pull request #54292 from ajarr/wip-63386-quincy

quincy: qa/suites/rbd: add test to check rbd_support module recovery

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
18 months agoMerge pull request #54290 from ajarr/wip-63383-quincy
Yuri Weinstein [Tue, 26 Dec 2023 16:35:45 +0000 (08:35 -0800)]
Merge pull request #54290 from ajarr/wip-63383-quincy

quincy: mgr/rbd_support: fix recursive locking on CreateSnapshotRequests lock

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
18 months agoMerge pull request #54255 from pkalever/wip-63349-quincy
Yuri Weinstein [Tue, 26 Dec 2023 16:31:35 +0000 (08:31 -0800)]
Merge pull request #54255 from pkalever/wip-63349-quincy

quincy: rbd-nbd: fix stuck with disable request

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
18 months agoMerge pull request #54054 from idryomov/wip-63028-quincy
Yuri Weinstein [Tue, 26 Dec 2023 16:30:15 +0000 (08:30 -0800)]
Merge pull request #54054 from idryomov/wip-63028-quincy

quincy: pybind/rbd: don't produce info on errors in aio_mirror_image_get_info()

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
18 months agoMerge pull request #55005 from zdover23/wip-doc-2023-12-26-backport-55003-to-quincy
Anthony D'Atri [Tue, 26 Dec 2023 14:57:46 +0000 (09:57 -0500)]
Merge pull request #55005 from zdover23/wip-doc-2023-12-26-backport-55003-to-quincy

quincy: doc/radosgw: admin.rst - edit "Create a User"

18 months agodoc/radosgw: admin.rst - edit "Create a User" 55005/head
Zac Dover [Tue, 26 Dec 2023 04:32:35 +0000 (14:32 +1000)]
doc/radosgw: admin.rst - edit "Create a User"

Edit the section "Create a User" in doc/radosgw/admin.rst.

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 46139c8fa9d4ae0e493bca17ba1199e3a67c39f8)

18 months agoMerge pull request #54501 from zdover23/wip-doc-2023-11-15-backport-54499-to-quincy
zdover23 [Tue, 26 Dec 2023 04:24:31 +0000 (14:24 +1000)]
Merge pull request #54501 from zdover23/wip-doc-2023-11-15-backport-54499-to-quincy

quincy: doc/rgw/notifications: specify which event types are enabled by default

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
18 months agoMerge pull request #55001 from zdover23/wip-doc-2023-12-25-backport-54997-to-quincy
Anthony D'Atri [Sun, 24 Dec 2023 22:13:21 +0000 (17:13 -0500)]
Merge pull request #55001 from zdover23/wip-doc-2023-12-25-backport-54997-to-quincy

quincy: doc/radosgw: edit admin.rst 1 of x

18 months agodoc/radosgw: edit admin.rst 1 of x 55001/head
Zac Dover [Sun, 24 Dec 2023 10:24:26 +0000 (20:24 +1000)]
doc/radosgw: edit admin.rst 1 of x

Edit doc/radosgw/admin.rst to the end of the section "User Management".
Correct grammar (mostly awkward prepositions) and tidy up weird clauses.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 819b2974e64548fcf66423cca94a785887fd7d07)

18 months agoMerge pull request #54902 from cbodley/wip-quincy-rhel-8.6
Yuri Weinstein [Thu, 21 Dec 2023 16:33:51 +0000 (08:33 -0800)]
Merge pull request #54902 from cbodley/wip-quincy-rhel-8.6

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

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
18 months agoMerge pull request #54986 from zdover23/wip-doc-2023-12-21-backport-54970-to-quincy
Anthony D'Atri [Thu, 21 Dec 2023 15:15:46 +0000 (10:15 -0500)]
Merge pull request #54986 from zdover23/wip-doc-2023-12-21-backport-54970-to-quincy

quincy: doc/radosgw: edit compression.rst

18 months agoMerge pull request #54939 from zdover23/wip-doc-2023-12-18-backport-54929-to-quincy
zdover23 [Thu, 21 Dec 2023 11:17:05 +0000 (21:17 +1000)]
Merge pull request #54939 from zdover23/wip-doc-2023-12-18-backport-54929-to-quincy

quincy: docs: Add information about OpenNebula integration

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
18 months agodoc/radosgw: edit compression.rst 54986/head
Zac Dover [Wed, 20 Dec 2023 05:00:38 +0000 (15:00 +1000)]
doc/radosgw: edit compression.rst

Improve the grammar and simplify the sentence structure of
doc/radosgw/compression.rst. This commit is made in anticipation of a
near-future commit that will list the compression algorithms available
to users of Ceph.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 84c5d2c828c2fbd70bdeadedd341ca42ddb1c20c)

19 months agoMerge pull request #54962 from zdover23/wip-doc-2023-12-19-backport-54960-to-quincy
zdover23 [Tue, 19 Dec 2023 12:07:35 +0000 (22:07 +1000)]
Merge pull request #54962 from zdover23/wip-doc-2023-12-19-backport-54960-to-quincy

quincy: doc/install: update "update submodules"

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
19 months agodoc/install: update "update submodules" 54962/head
Zac Dover [Tue, 19 Dec 2023 09:15:57 +0000 (19:15 +1000)]
doc/install: update "update submodules"

Remove misleading material that would give readers the wrong idea about
when stale submodules are present. This commit is made in response to
information given to me by Ilya Dryomov here: https://github.com/ceph/ceph/pull/54929#issuecomment-1859237986.

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit f5c87693abcfc9a6a3869a3f52549384807fba9d)

19 months agoMerge pull request #54906 from zdover23/wip-doc-2023-12-15-backport-54893-to-quincy
zdover23 [Tue, 19 Dec 2023 00:14:39 +0000 (10:14 +1000)]
Merge pull request #54906 from zdover23/wip-doc-2023-12-15-backport-54893-to-quincy

quincy: doc/radosgw: format commands in role.rst

Reviewed-by: Cole Mitchell <cole.mitchell.ceph@gmail.com>
19 months agodocs: Add information about OpenNebula integration 54939/head
Daniel Clavijo Coca [Fri, 15 Dec 2023 15:54:02 +0000 (09:54 -0600)]
docs: Add information about OpenNebula integration

- Exclude doc build output from git
- Fix missing doc build dependency
- Also includes some involuntary automatically persistent linting by vscode

Co-authored-by: Ilya Dryomov <idryomov@redhat.com>
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Co-authored-by: Zac Dover <zac.dover@proton.me>
Signed-off-by: Daniel Clavijo <dclavijo@opennebula.io>
(cherry picked from commit ee2ee31d3f72a2ee63f9d28bbaf6045657f43ee6)

19 months agoMerge pull request #54934 from zdover23/wip-doc-2023-12-17-backport-52354-to-quincy
Anthony D'Atri [Sun, 17 Dec 2023 06:04:16 +0000 (01:04 -0500)]
Merge pull request #54934 from zdover23/wip-doc-2023-12-17-backport-52354-to-quincy

quincy: doc/radosgw/admin.rst: use underscores in config var names

19 months agodoc/radosgw/admin.rst: use underscores in config var names 54934/head
Ville Ojamo [Fri, 7 Jul 2023 10:02:19 +0000 (17:02 +0700)]
doc/radosgw/admin.rst: use underscores in config var names

Following the current policy, config var names in `ceph.conf` etc. should use underscores instead of spaces.

Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
(cherry picked from commit cd323cb664a125834e41b77f711eac898e548382)

19 months agodoc/radosgw: format commands in role.rst 54906/head
Zac Dover [Thu, 14 Dec 2023 06:14:29 +0000 (16:14 +1000)]
doc/radosgw: format commands in role.rst

Format approximately one-hundred lines of doc/radosgw/role.rst to
include proper command prompts. I also made one small English usage
improvement.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 31d72b8ecc1b75b7996027418614c6e2e6a1d0e7)

19 months agoqa: Default to RHEL8.6 instead of 8.5 54902/head
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)

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)

19 months agoMerge pull request #54887 from zdover23/wip-doc-2023-12-13-backport-54875-to-quincy
Anthony D'Atri [Wed, 13 Dec 2023 13:26:56 +0000 (08:26 -0500)]
Merge pull request #54887 from zdover23/wip-doc-2023-12-13-backport-54875-to-quincy

quincy: doc/radosgw: format "Create a Role"

19 months agodoc/radosgw: format "Create a Role" 54887/head
Zac Dover [Tue, 12 Dec 2023 12:09:13 +0000 (22:09 +1000)]
doc/radosgw: format "Create a Role"

Properly format the section "Create a Role" in the file
doc/radosgw/role.rst.

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit fa6ad94f3afc6d11c3ed243d66c96a666e973bde)

19 months agotest/librbd: close image in DiffIterateDeterministic 54861/head
Ilya Dryomov [Sat, 9 Dec 2023 15:26:25 +0000 (16:26 +0100)]
test/librbd: close image in DiffIterateDeterministic

... to avoid valgrind reporting a memory leak on ImageCtx.

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

19 months agotest/librbd: drop DiffIterateTest.DiffIterateRegression6926
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>
(cherry picked from commit 93ff7fe6e4b1232a97f669f3dce6653cc08638a8)

19 months 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>
(cherry picked from commit 356ac6a5477061389e673053f178d1ec6a9b9427)

19 months 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>
(cherry picked from commit f5e3f263724d04be181225d9e24cbe2f4669e8bc)

19 months 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>
(cherry picked from commit 0a1f633e0240b4a7cfbcddd96d53fbf4b17f0b28)

19 months 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>
(cherry picked from commit 8f86d80614680afecbfe82b2a6e965678a3c6034)