]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agoMerge pull request #46597 from idryomov/wip-qa-rwl-on-tmpfs-pacific
Yuri Weinstein [Wed, 22 Jun 2022 16:35:13 +0000 (09:35 -0700)]
Merge pull request #46597 from idryomov/wip-qa-rwl-on-tmpfs-pacific

pacific: qa/suites/rbd: place cache file on tmpfs for xfstests

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoMerge pull request #46593 from idryomov/wip-rbd-unlink-newest-snap-at-capacity-pacific
Yuri Weinstein [Wed, 22 Jun 2022 16:34:38 +0000 (09:34 -0700)]
Merge pull request #46593 from idryomov/wip-rbd-unlink-newest-snap-at-capacity-pacific

pacific: librbd: unlink newest mirror snapshot when at capacity, bump capacity

Reviewed-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Reviewed-by: Sunny Kumar <sunkumar@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
3 years agoMerge pull request #46590 from idryomov/wip-rbd-preserve-non-primary-snap-pacific
Yuri Weinstein [Wed, 22 Jun 2022 16:33:12 +0000 (09:33 -0700)]
Merge pull request #46590 from idryomov/wip-rbd-preserve-non-primary-snap-pacific

pacific: rbd-mirror: don't prune non-primary snapshot when restarting delta sync

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Sunny Kumar <sunkumar@redhat.com>
Reviewed-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
3 years agoMerge pull request #46668 from nmshelke/wip-56014-pacific
Yuri Weinstein [Wed, 22 Jun 2022 14:54:09 +0000 (07:54 -0700)]
Merge pull request #46668 from nmshelke/wip-56014-pacific

pacific: mgr/volumes: subvolumegroup quotas

Reviewed-by: Venky Shankar vshankar@redhat.com
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46515 from nmshelke/wip-55802-pacific
Yuri Weinstein [Wed, 22 Jun 2022 14:52:43 +0000 (07:52 -0700)]
Merge pull request #46515 from nmshelke/wip-55802-pacific

pacific: mgr/volumes: set, get, list and remove metadata of snapshot

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agodoc: Update quota kclient limitation 46668/head
Kotresh HR [Wed, 1 Jun 2022 17:12:06 +0000 (22:42 +0530)]
doc: Update quota kclient limitation

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit cd92ea0cb459ffd31d164a661634f913eab59594)

3 years agoqa: Add tests which validates quota limitation for subvolumegroup quota
Kotresh HR [Wed, 20 Apr 2022 10:34:39 +0000 (16:04 +0530)]
qa: Add tests which validates quota limitation for subvolumegroup quota

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 256c75e260dde91ab71fc0c43407578ad2e9f553)

3 years agodoc: Document subvolumegroup quota commands
Kotresh HR [Tue, 21 Dec 2021 10:38:22 +0000 (16:08 +0530)]
doc: Document subvolumegroup quota commands

Add documentation for subvolume group quota along
with 'subvolumegroup resize' and 'subvolumegroup info'
commands

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 168b912b026700644416390caf3540c1aaa75a62)

3 years agoqa: Add subvolume removal tests when it's group quota exceeds
Kotresh HR [Fri, 8 Apr 2022 18:08:31 +0000 (23:38 +0530)]
qa: Add subvolume removal tests when it's group quota exceeds

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit e9fe37b8e1f451c94ce3d1a63c090fd57444ab3f)

3 years agoqa: Add tests for subvolumegroup idempotence creation
Kotresh HR [Tue, 22 Feb 2022 13:26:40 +0000 (18:56 +0530)]
qa: Add tests for subvolumegroup idempotence creation

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 12e003f980cee4c2cc5b9c6f9dbf2d8d82920e1e)

3 years agoqa: Add tests for subvolume removal on group quota set
Kotresh HR [Tue, 22 Feb 2022 13:22:36 +0000 (18:52 +0530)]
qa: Add tests for subvolume removal on group quota set

Validates the subvolume removal is successful if the
corresponding group's quota is set.

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit c006181803bcc2c3e26fc81dbfc8226f0fabe753)

3 years agoqa: Add tests for subvolumegroup resize
Kotresh HR [Tue, 22 Feb 2022 13:07:36 +0000 (18:37 +0530)]
qa: Add tests for subvolumegroup resize

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit dbe8cf17926c296399391674ceed8d5deb033996)

3 years agoqa: Add subvolume group quota tests
Kotresh HR [Thu, 16 Dec 2021 08:13:02 +0000 (13:43 +0530)]
qa: Add subvolume group quota tests

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 085700bf194558bc1469bc98fe8234e46252e146)

3 years agomgr/volumes: Disable quota for mgr libcephfs connection
Kotresh HR [Fri, 18 Mar 2022 06:43:53 +0000 (12:13 +0530)]
mgr/volumes: Disable quota for mgr libcephfs connection

This is done to give 'mgr' libcephfs connection right to bypass
quota. The mgr/volumes plugin maintains configuration files
with in the directory where the user has enforced quota. So
when the quota is met, certain mgr/volumes apis don't work as
intended. e.g., When subvolumegroup quota is met, the group's
subvolume removal with '--retain-snapshots' fails.

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 3cfcbef284f371bfbec01311e6dad0172572fe9c)

3 years agoclient: Makes quota optional
Kotresh HR [Tue, 26 Apr 2022 07:16:45 +0000 (12:46 +0530)]
client: Makes quota optional

Make quota optional. This commit basically reverts the
commit da9f1d829484fe35e6d5839c19afa371e444c194

This is done to give 'mgr' libcephfs connection right to bypass
quota. The mgr/volumes plugin maintains configuration files
with in the directory where the user has enforced quota. So
when the quota is met, certain mgr/volumes apis don't work as
intended. e.g., When subvolumegroup quota is met, the group's
subvolume removal with '--retain-snapshots' fails.

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit f365a9a5fe465b5d5cc81e5d4dd136bd8989cc20)

Conflicts:
src/common/options/mds-client.yaml.in
- pacific release not having yamls to store config hence added option in
  src/common/options.cc

3 years agomgr/volumes: Add subvolumegroup resize cmd
Kotresh HR [Thu, 14 Apr 2022 06:41:41 +0000 (12:11 +0530)]
mgr/volumes: Add subvolumegroup resize cmd

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 346964a89ce3b1ad80f8513387e7d84b036016b5)

3 years agomgr/volumes: Add subvolumegroup info cmd
Kotresh HR [Thu, 16 Dec 2021 08:41:54 +0000 (14:11 +0530)]
mgr/volumes: Add subvolumegroup info cmd

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 9e1b7ed39e25f28fdfc66b394d1f3ee61c7ce0ba)

3 years agomgr/volumes: Support subvolumegroup quota
Kotresh HR [Fri, 18 Mar 2022 07:04:32 +0000 (12:34 +0530)]
mgr/volumes: Support subvolumegroup quota

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 06a869cb8ad1a9e5f966fa49046f6eb6674c29fe)

Conflicts:
src/pybind/mgr/volumes/fs/operations/group.py
- Updates in defination of create_groups
src/pybind/mgr/volumes/fs/volume.py
- Added set_group_attrs in import list and split long line

3 years agoMerge pull request #46762 from idryomov/wip-wnbd-main-branch-pacific
Ilya Dryomov [Tue, 21 Jun 2022 14:21:58 +0000 (16:21 +0200)]
Merge pull request #46762 from idryomov/wip-wnbd-main-branch-pacific

pacific: win32_deps_build.sh: master -> main for wnbd

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
3 years agowin32_deps_build.sh: master -> main for wnbd 46762/head
Ilya Dryomov [Mon, 20 Jun 2022 20:23:27 +0000 (22:23 +0200)]
win32_deps_build.sh: master -> main for wnbd

wnbd is switching, see https://github.com/cloudbase/wnbd/pull/67.

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

3 years agoMerge pull request #46348 from zdover23/wip-disk-benchmarking-and-cache-pacific-backp...
zdover23 [Mon, 20 Jun 2022 11:48:38 +0000 (21:48 +1000)]
Merge pull request #46348 from zdover23/wip-disk-benchmarking-and-cache-pacific-backport-2022-05-19

pacific: doc: add disk benchmarking and cache recommendations

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46040 from cbodley/wip-55457
Yuri Weinstein [Fri, 17 Jun 2022 23:57:11 +0000 (16:57 -0700)]
Merge pull request #46040 from cbodley/wip-55457

pacific: rgw: RGWCoroutine::set_sleeping() checks for null stack

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #46631 from rzarzynski/wip-pglog-trim-dups-pacific
Yuri Weinstein [Fri, 17 Jun 2022 23:54:54 +0000 (16:54 -0700)]
Merge pull request #46631 from rzarzynski/wip-pglog-trim-dups-pacific

pacific: tools: ceph-objectstore-tool is able to trim solely pg log dups' entries

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
3 years agoMerge pull request #46596 from kotreshhr/wip-55927-pacific
Yuri Weinstein [Fri, 17 Jun 2022 20:31:48 +0000 (13:31 -0700)]
Merge pull request #46596 from kotreshhr/wip-55927-pacific

pacific: client/fuse: Fix directory DACs overriding for root

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #46567 from vshankar/tr-55932
Yuri Weinstein [Fri, 17 Jun 2022 20:31:23 +0000 (13:31 -0700)]
Merge pull request #46567 from vshankar/tr-55932

pacific: mds: do not assert early on when issuing client leases

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #45293 from joscollin/wip-54479-pacific
Yuri Weinstein [Fri, 17 Jun 2022 20:30:11 +0000 (13:30 -0700)]
Merge pull request #45293 from joscollin/wip-54479-pacific

pacific: mgr/stats: be resilient to offline MDS rank-0

Reviewed-by: Laura Flores <lflores@redhat.com>
Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #46608 from rzarzynski/wip-55982-pacific
Yuri Weinstein [Fri, 17 Jun 2022 20:26:19 +0000 (13:26 -0700)]
Merge pull request #46608 from rzarzynski/wip-55982-pacific

pacific: osd: log the number of 'dups' entries in a PG Log

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #46690 from rhcs-dashboard/wip-55941-pacific
Nizamudeen A [Fri, 17 Jun 2022 17:04:04 +0000 (22:34 +0530)]
Merge pull request #46690 from rhcs-dashboard/wip-55941-pacific

pacific: mgr/dashboard: Feature 54330 osd creation workflow

Reviewed-by: Nizamudeen A <nia@redhat.com>
3 years agoMerge pull request #46691 from sseshasa/wip-56059-pacific
Neha Ojha [Fri, 17 Jun 2022 16:17:04 +0000 (09:17 -0700)]
Merge pull request #46691 from sseshasa/wip-56059-pacific

pacific: mon/OSDMonitor: Ensure kvmon() is writeable before handling "osd new" cmd

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #46722 from zdover23/wip-doc-2022-06-15-backport-46712-pacific...
zdover23 [Fri, 17 Jun 2022 03:22:51 +0000 (13:22 +1000)]
Merge pull request #46722 from zdover23/wip-doc-2022-06-15-backport-46712-pacific-master-to-main-dev-guide-basic-workflow

pacific: doc/dev: s/master/main/ in title

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/dev: s/master/main/ in title 46722/head
Zac Dover [Thu, 16 Jun 2022 05:57:16 +0000 (15:57 +1000)]
doc/dev: s/master/main/ in title

This changes "master" to "main" in a title. If we lived in an
ideal world, this would have been a part of PR#46678.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit f5fd158bea2a54b83c7f75cd806885de44045ad6)

3 years agoMerge pull request #45928 from kotreshhr/wip-55349-pacific
Yuri Weinstein [Thu, 16 Jun 2022 21:22:18 +0000 (14:22 -0700)]
Merge pull request #45928 from kotreshhr/wip-55349-pacific

pacific: mgr/volumes: Show clone failure reason in clone status command

Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoqa: set, get, list and remove custom metadata for snapshot 46515/head
Nikhilkumar Shelke [Thu, 28 Apr 2022 18:38:05 +0000 (00:08 +0530)]
qa: set, get, list and remove custom metadata for snapshot

Following test are added:
1. Set custom metadata for subvolume snapshot.
2. Set custom metadata for subvolume snapshot(Idempotency).
3. Get custom metadata for specified key.
4. Get custom metadata if specified key not exist (Expecting error ENOENT).
5. Get custom metadata if no any key-value is added means section not exist (Expecting error ENOENT).
6. Update value for existing key in custom metadata.
7. List custom metadata of subvolume snapshot.
8. List custom metadata of subvolume snapshot if no any key-value is added (Expect empty json/dictionary)
9. Remove custom metadata for specified key.
10. Remove custom metadata if specified key not exist (Expecting error ENOENT).
11. Remove custom metadata if no any key-value is added means section not exist (Expecting error ENOENT).
12. Remove custom metadata with --force option.
13. Remove custom metadata with --force option if specified key not exist (Expecting command to succeed because of '--force' option)
14. Remove subvolume snapshot and verify whether metadata for snapshot is removed or not

Fixes: https://tracker.ceph.com/issues/55401
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit 6fd28cc9d67b96ba87f0dffbf41d626229e904e3)

3 years agodocs: set, get, list and remove custom metadata for snapshot
Nikhilkumar Shelke [Wed, 27 Apr 2022 16:41:07 +0000 (22:11 +0530)]
docs: set, get, list and remove custom metadata for snapshot

Set custom metadata on the snapshot as a key-value pair using
    $ ceph fs subvolume snapshot metadata set <vol_name> <subvol_name> <snap_name> <key_name> <value> [--group_name <subvol_group_name>]
    note: If the key_name already exists then the old value will get replaced by the new value.
    note: The key_name and value should be a string of ASCII characters (as specified in python's string.printable). The key_name is case-insensitive and always stored in lower case.
    note: Custom metadata on a snapshots is not preserved when snapshotting the subvolume, and hence, is also not preserved when cloning the subvolume snapshot.

Get custom metadata set on the snapshot using the metadata key::
    $ ceph fs subvolume snapshot metadata get <vol_name> <subvol_name> <snap_name> <key_name> [--group_name <subvol_group_name>]

List custom metadata (key-value pairs) set on the snapshot using::
    $ ceph fs subvolume snapshot metadata ls <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>]

Remove custom metadata set on the snapshot using the metadata key::
    $ ceph fs subvolume snapshot metadata rm <vol_name> <subvol_name> <snap_name> <key_name> [--group_name <subvol_group_name>] [--force]
    Using the '--force' flag allows the command to succeed that would otherwise fail if the metadata key did not exist.

Fixes: https://tracker.ceph.com/issues/55401
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit 59a0cbc14bf2832080e983729de5c462ddc70bb3)

3 years agomgr/volumes: set, get, list and remove custom metadata for snapshot
Nikhilkumar Shelke [Wed, 27 Apr 2022 16:20:33 +0000 (21:50 +0530)]
mgr/volumes: set, get, list and remove custom metadata for snapshot

If CephFS in ODF configured in external mode, user like to use
subvolume snapshot metadata to store some Openshift specific
information, as the PVC/PV/namespace the subvolumes/snapshot
are coming from. For RBD volumes, it's possible to add metadata
information to the images using the 'rbd image-meta' command.
However, this feature is not available for CephFS volumes.
We'd like to request this capability.

Adding following commands:
    ceph fs subvolume snapshot metadata set <vol_name> <sub_name> <snap_name> <key_name> <value> [<group_name>]
    ceph fs subvolume snapshot metadata get <vol_name> <sub_name> <snap_name> <key_name> [<group_name>]
    ceph fs subvolume snapshot metadata ls <vol_name> <sub_name> <snap_name> [<group_name>]
    ceph fs subvolume snapshot metadata rm <vol_name> <sub_name> <snap_name> <key_name> [<group_name>] [--force]

Fixes: https://tracker.ceph.com/issues/55401
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit 559222cfe8d552cd2d7aef7361de4140820ae74a)

3 years agoMerge pull request #45961 from vshankar/tr-55375
Venky Shankar [Thu, 16 Jun 2022 11:19:42 +0000 (16:49 +0530)]
Merge pull request #45961 from vshankar/tr-55375

pacific: mgr/volumes: set, get, list and remove metadata of subvolume

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
3 years agoMerge pull request #46710 from zdover23/wip-doc-2022-06-15-backport-pacific-46705...
zdover23 [Thu, 16 Jun 2022 06:03:08 +0000 (16:03 +1000)]
Merge pull request #46710 from zdover23/wip-doc-2022-06-15-backport-pacific-46705-master-to-main-dev-guide-merging

pacific: doc/dev_guide: s/master/main in merging.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/dev_guide: s/master/main in merging.rst 46710/head
Zac Dover [Wed, 15 Jun 2022 21:54:31 +0000 (07:54 +1000)]
doc/dev_guide: s/master/main in merging.rst

This changes the branch name "master" to the branch name
"main" in merging.rst.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 52da71f0ab0a4606a73be749b3d983969bd34972)

3 years agoMerge pull request #46704 from zdover23/wip-doc-2022-06-15-backport-pacific-46678...
zdover23 [Thu, 16 Jun 2022 01:13:43 +0000 (11:13 +1000)]
Merge pull request #46704 from zdover23/wip-doc-2022-06-15-backport-pacific-46678-master-to-main-dev-guide-basic-workflow

pacific: doc/dev: s/master/main/ in basic workflow

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46662 from zdover23/wip-doc-2022-06-13-backport-pacific-46651...
zdover23 [Wed, 15 Jun 2022 21:48:27 +0000 (07:48 +1000)]
Merge pull request #46662 from zdover23/wip-doc-2022-06-13-backport-pacific-46651-master-to-main

pacific: doc/dev: s/master/main/ essentials.rst dev guide

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46663 from zdover23/wip-doc-2022-06-13-backport-pacific-46659...
zdover23 [Wed, 15 Jun 2022 21:44:39 +0000 (07:44 +1000)]
Merge pull request #46663 from zdover23/wip-doc-2022-06-13-backport-pacific-46659-hardware-recs-polish

pacific: doc/start: Polish network section of hardware-recommendations.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/dev: s/master/main/ in basic workflow 46704/head
Zac Dover [Tue, 14 Jun 2022 22:15:33 +0000 (08:15 +1000)]
doc/dev: s/master/main/ in basic workflow

This PR changes "master" to "main" in the
basic_workflow.rst file. I have even changed
"master" to "main" in some terminal output from
several years ago. This isn't historically ac-
curate, of course, but my hope is that this change
will prevent someone in the future from being con-
fused about why an antiquated branch name is ref-
erred to.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit f5cfc22445a3e454e572873cdcfbc1852a38aa17)

3 years agoMerge pull request #46039 from cbodley/wip-55456
Yuri Weinstein [Wed, 15 Jun 2022 18:25:38 +0000 (11:25 -0700)]
Merge pull request #46039 from cbodley/wip-55456

pacific: rgw: OpsLogFile::stop() signals under mutex

Reviewed-by: Cory Snyder <csnyder@iland.com>
3 years agoMerge pull request #45410 from cfsnyder/wip-54537-pacific
Yuri Weinstein [Wed, 15 Jun 2022 18:21:54 +0000 (11:21 -0700)]
Merge pull request #45410 from cfsnyder/wip-54537-pacific

pacific: rgw: fix segfault in OpsLogRados::log when realm is reloaded

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46112 from Matan-B/wip-55514-pacific
Yuri Weinstein [Wed, 15 Jun 2022 17:06:25 +0000 (10:06 -0700)]
Merge pull request #46112 from Matan-B/wip-55514-pacific

pacific: mount/conf: Fix IPv6 parsing

Reviewed-by: Laura Flores <lflores@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoMerge pull request #45893 from nkshirsagar/wip-55296-pacific
Yuri Weinstein [Wed, 15 Jun 2022 17:03:04 +0000 (10:03 -0700)]
Merge pull request #45893 from nkshirsagar/wip-55296-pacific

pacific: Catch exception if thrown by __generate_command_map()

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #45847 from dvanders/wip-55250-pacific
Yuri Weinstein [Wed, 15 Jun 2022 17:02:28 +0000 (10:02 -0700)]
Merge pull request #45847 from dvanders/wip-55250-pacific

pacific: rgw_reshard: drop olh entries with empty name

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45486 from cfsnyder/wip-53868-pacific
Yuri Weinstein [Wed, 15 Jun 2022 17:01:45 +0000 (10:01 -0700)]
Merge pull request #45486 from cfsnyder/wip-53868-pacific

pacific: rgw: return OK on consecutive complete-multipart reqs

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46139 from kotreshhr/wip-55335-pacific
Yuri Weinstein [Wed, 15 Jun 2022 14:28:50 +0000 (07:28 -0700)]
Merge pull request #46139 from kotreshhr/wip-55335-pacific

pacific: mgr/volumes: Fix idempotent subvolume rm

Reviewed-by: Venky Shankar vshankar@redhat.com
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
3 years agoMerge pull request #46138 from nmshelke/wip-55412-pacific
Yuri Weinstein [Wed, 15 Jun 2022 14:28:00 +0000 (07:28 -0700)]
Merge pull request #46138 from nmshelke/wip-55412-pacific

pacific: mds: add a perf counter to record slow replies

Reviewed-by: Venky Shankar vshankar@redhat.com
Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #45968 from vshankar/tr-55384
Yuri Weinstein [Wed, 15 Jun 2022 14:27:06 +0000 (07:27 -0700)]
Merge pull request #45968 from vshankar/tr-55384

pacific: mgr/snap_schedule: add time zone suffix to snapshot dir name

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #45792 from lxbsz/wip-55192
Yuri Weinstein [Wed, 15 Jun 2022 14:25:00 +0000 (07:25 -0700)]
Merge pull request #45792 from lxbsz/wip-55192

pacific: client: buffer the truncate if we have the Fx caps

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45900 from ivancich/wip-55044-pacific
J. Eric Ivancich [Wed, 15 Jun 2022 12:56:24 +0000 (08:56 -0400)]
Merge pull request #45900 from ivancich/wip-55044-pacific

pacific: cls/rgw: rgw_dir_suggest_changes detects race with completion

Reviewed-by: casey Bodley <cbodley@redhat.com>
3 years agorgw: RGWCoroutine::set_sleeping() checks for null stack 46040/head
Or Friedmann [Tue, 19 Apr 2022 12:00:28 +0000 (12:00 +0000)]
rgw: RGWCoroutine::set_sleeping() checks for null stack

users of the RGWOmapAppend coroutine don't manage the lifetime of its
underlying coroutine stack, so end up making calls on RGWOmapAppend
after its stack goes away. this null check is a band-aid, and there are
still several other calls in RGWCoroutine that don't check for null
stack

Fixes: https://tracker.ceph.com/issues/49302
Signed-off-by: Or Friedmann <ofriedma@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 3f0f831d66c7d43c9872f5de2aceb68aef4004d8)

3 years agomon/OSDMonitor: Ensure kvmon() is writeable before handling "osd new" cmd 46691/head
Sridhar Seshasayee [Fri, 27 May 2022 08:59:07 +0000 (14:29 +0530)]
mon/OSDMonitor: Ensure kvmon() is writeable before handling "osd new" cmd

Before proceeding to handle "osd new" mon command as part of
OSDMonitor::prepare_command_impl(), a check is made to verify if the
authmon is writeable. Later on, prepare_command_osd_new() invokes
KVMonitor::do_osd_new() to create pending dmcrypt keys and calls
propose_pending(). The propose could fail (with an assertion failure)
if there was a prior mon command that resulted in the kvmon invoking
propose_pending().

In order to avoid such a situation, introduce a check to verify that
kvmon is also writeable in OSDMonitor::prepare_command_impl(). If it
is not writeable, the op is pushed into the wait_for_active context
queue to be retried later.

Fixes: https://tracker.ceph.com/issues/55773
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit 9a0d42c9fbcf64711a791edcf9cafdba57d901d7)

3 years agomgr/dashboard: test througput deployment option 46690/head
Pere Diaz Bou [Fri, 6 May 2022 08:48:32 +0000 (10:48 +0200)]
mgr/dashboard: test througput deployment option

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit d58b9499208cd611897518009495f9e80515349d)

Conflicts:
src/pybind/mgr/dashboard/tests/test_osd.py

Besides test deployment options, there were extra changes that came
from main which had to be removed in favor of specific deployment
options tests.

3 years agomgr/dashboard: throughput optimized option enabled
Pere Diaz Bou [Tue, 3 May 2022 12:28:22 +0000 (14:28 +0200)]
mgr/dashboard: throughput optimized option enabled

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit f2474bcb767893dc750b8f1231b4583925f9bfb1)

3 years agomgr/dashboard: OSD Creation Workflow initial works
Nizamudeen A [Tue, 22 Feb 2022 10:21:03 +0000 (15:51 +0530)]
mgr/dashboard: OSD Creation Workflow initial works

Introducing the Cost/Capacity Optimized deployment option
Used bootstrap accordion
Adapted the e2e but not written new tests for the deployment option

Fixes: https://tracker.ceph.com/issues/54340
Fixes: https://tracker.ceph.com/issues/54563
Signed-off-by: Nizamudeen A <nia@redhat.com>
Signed-off-by: Sarthak0702 <sarthak.0702@gmail.com>
(cherry picked from commit 6c2dcb740efb793a3f6ef593793151a34c19ca01)

3 years agomgr/dashboard: retrieve disk status
Pere Diaz Bou [Fri, 4 Mar 2022 08:58:36 +0000 (09:58 +0100)]
mgr/dashboard: retrieve disk status

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit a1d1c853a5e4ff9a317591b99b75e005ccc862c9)

Conflicts:
src/pybind/mgr/dashboard/tests/test_osd.py

There were some extra tests that came with this commit. This was
resolved by adding test_deployment_options alone instead of all the
incoming changes.

3 years agoMerge pull request #46456 from rhcs-dashboard/wip-55590-pacific
Ernesto Puerta [Tue, 14 Jun 2022 16:36:39 +0000 (18:36 +0200)]
Merge pull request #46456 from rhcs-dashboard/wip-55590-pacific

pacific: mgr/dashboard:  WDC multipath bug fixes

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: nSedrickm <NOT@FOUND>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agorgw: fix segfault in OpsLogRados::log when realm is reloaded 45410/head
Cory Snyder [Thu, 3 Feb 2022 19:48:05 +0000 (14:48 -0500)]
rgw: fix segfault in OpsLogRados::log when realm is reloaded

We weren't previously handling the deallocation of the store when
a realm was reloaded. Now passing a const reference to the pointer.

Fixes: https://tracker.ceph.com/issues/54130
Signed-off-by: Cory Snyder <csnyder@iland.com>
(cherry picked from commit 0713f65355586b2f6ceeb6bbce8763158847e5ed)

Conflicts:
src/rgw/rgw_log.cc
src/rgw/rgw_log.h

Cherry-pick notes:
- conflicts due to rename of RGWRados to rgw::sal::Store after Pacific

(cherry picked from commit 44a37dc0023a69da33620dc7b6e112221f7a6a0b)

3 years agodoc/start: Polish network section of hardware-recommendations.rst 46663/head
Anthony D'Atri [Mon, 13 Jun 2022 23:06:12 +0000 (16:06 -0700)]
doc/start: Polish network section of hardware-recommendations.rst

Harmonize network throughput notation, minor tweaks to wording.
Followup to #46637

Signed-off-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
(cherry picked from commit 2eb173fef9dc9ff34078b0ae13e9fcc398cdbaa3)

3 years agodoc/dev: s/master/main/ essentials.rst dev guide 46662/head
Zac Dover [Mon, 13 Jun 2022 21:48:46 +0000 (07:48 +1000)]
doc/dev: s/master/main/ essentials.rst dev guide

This PR changes all reference to the "master" branch
to references to the "main" branch (because we renamed
"master" to main", and the docs now need to reflect that).

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 728b8f26746c733988302d52cce4c46ebc607f63)

3 years agoMerge pull request #46653 from zdover23/wip-doc-2022-06-13-backport-46637-pacific...
zdover23 [Tue, 14 Jun 2022 06:23:44 +0000 (16:23 +1000)]
Merge pull request #46653 from zdover23/wip-doc-2022-06-13-backport-46637-pacific-hardware-recs-network

pacific: doc/start: rewrite hardware-recs networks section

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46656 from zdover23/wip-doc-2022-06-13-backport-46583-pacific...
zdover23 [Tue, 14 Jun 2022 06:17:58 +0000 (16:17 +1000)]
Merge pull request #46656 from zdover23/wip-doc-2022-06-13-backport-46583-pacific-hardware-recs-osd-and-mds-acros

pacific: doc/start: make OSD and MDS structures parallel

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46657 from zdover23/wip-doc-2022-06-13-backport-46633-pacific...
zdover23 [Tue, 14 Jun 2022 06:15:12 +0000 (16:15 +1000)]
Merge pull request #46657 from zdover23/wip-doc-2022-06-13-backport-46633-pacific-start-intro-crush-para-rewrite

pacific: doc/start: rewrite CRUSH para

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46368 from tchaikov/pacific-pr-46355
Yuri Weinstein [Mon, 13 Jun 2022 23:43:27 +0000 (16:43 -0700)]
Merge pull request #46368 from tchaikov/pacific-pr-46355

pacific: ceph.spec.in: disable annobin plugin if compile with gcc-toolset

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: David Galloway <dgallowa@redhat.com>
3 years agoMerge pull request #46365 from tchaikov/pacific-pr-44007
Yuri Weinstein [Mon, 13 Jun 2022 23:42:02 +0000 (16:42 -0700)]
Merge pull request #46365 from tchaikov/pacific-pr-44007

pacific: cmake: check for python(\d)\.(\d+) when building boost

Reviewed-by: Dirk Mueller <dmueller@suse.com>
Reviewed-by: Tim Serong <tserong@suse.com>
3 years agoMerge pull request #46312 from b-ranto/wip-alerts-pacific
Yuri Weinstein [Mon, 13 Jun 2022 23:39:22 +0000 (16:39 -0700)]
Merge pull request #46312 from b-ranto/wip-alerts-pacific

[pacific] mgr/alerts: Add Message-Id and Date header to sent emails

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
3 years agoMerge pull request #46255 from tserong/wip-55616-pacific
Yuri Weinstein [Mon, 13 Jun 2022 23:38:16 +0000 (16:38 -0700)]
Merge pull request #46255 from tserong/wip-55616-pacific

pacific: test: No direct use of nose

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agodoc/start: rewrite CRUSH para 46657/head
Zac Dover [Sun, 12 Jun 2022 23:41:28 +0000 (09:41 +1000)]
doc/start: rewrite CRUSH para

This PR supersedes https://github.com/ceph/ceph/pull/46584
and makes changes suggested by Anthony D'Atri that improve
the coherence and consistency of the paragraph that explains
the basics of the CRUSH algorithm.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit ba1a85b292fcd30020897a486cb452381c998690)

3 years agodoc/start: make OSD and MDS structures parallel 46656/head
Zac Dover [Wed, 8 Jun 2022 19:19:16 +0000 (05:19 +1000)]
doc/start: make OSD and MDS structures parallel

This PR makes the "Ceph OSDs" and "MDSs" bullet points
parallel by naming "object storage daemon" before referring
to the (admittedly more common and colloquial, but surely
unknown to people who genuinely require a document called
'Intro') acronym "OSD".

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 4f6edb92b9c4b7c47354d8ad66fdee6c06389541)

3 years agodoc/start: rewrite hardware-recs networks section 46653/head
Zac Dover [Mon, 13 Jun 2022 04:34:36 +0000 (14:34 +1000)]
doc/start: rewrite hardware-recs networks section

This rewrites the first two-thirds of the "Networks"
section of the Hardware Recommendations page in the
Intro to Ceph document. I have tried to divide the
techincal content in this section into subsections
that foreground the various subjects covered.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 778d3c0b59148e2a3b6bb662437778692b1988e3)

3 years agotools: ceph-objectstore-tool is able to trim pg log dups' entries. 46631/head
Radosław Zarzyński [Sat, 11 Jun 2022 19:29:29 +0000 (21:29 +0200)]
tools: ceph-objectstore-tool is able to trim pg log dups' entries.

The main assumption is trimming just dups doesn't need any update
to the corresponding pg_info_t.

Testing:

1. cluster without the autoscaler
```
rzarz@ubulap:~/dev/ceph/build$ MON=1 MGR=1 OSD=3 MGR=1 MDS=0 ../src/vstart.sh -l -b -n -o "osd_pg_log_dups_tracked=3000000" -o "osd_pool_default_pg_autoscale_mode=off"
```

2. 8 PGs in the testing pool.
```
rzarz@ubulap:~/dev/ceph/build$ bin/ceph osd pool create test-pool 8 8
```

3. Provisioning dups with rados bench
```
bin/rados bench -p test-pool 300 write -b 4096  --no-cleanup
...
Total time run:         300.034
Total writes made:      103413
Write size:             4096
Object size:            4096
Bandwidth (MB/sec):     1.34637
Stddev Bandwidth:       0.589071
Max bandwidth (MB/sec): 2.4375
Min bandwidth (MB/sec): 0.902344
Average IOPS:           344
Stddev IOPS:            150.802
Max IOPS:               624
Min IOPS:               231
Average Latency(s):     0.0464151
Stddev Latency(s):      0.0183627
Max latency(s):         0.0928424
Min latency(s):         0.0131932
```

4. Killing osd.0
```
rzarz@ubulap:~/dev/ceph/build$ kill 2572129 # pid of osd.0
```

5. Listing PGs on osd.0 and calculating number of pg log's entries and
dups:

```
rzarz@ubulap:~/dev/ceph/build$ bin/ceph-objectstore-tool --data-path dev/osd0 --op list-pgs --pgid 2.c > osd0_pgs.txt
rzarz@ubulap:~/dev/ceph/build$ for pgid in `cat osd0_pgs.txt`; do echo $pgid; bin/ceph-objectstore-tool --data-path dev/osd0 --op log --pgid $pgid | jq '(.pg_log_t.log|length),(.pg_log_t.dups|length)'; done
2.7
10020
3100
2.6
10100
3000
2.3
10012
2800
2.1
10049
2900
2.2
10057
2700
2.0
10027
2900
2.5
10077
2700
2.4
10072
2900
1.0
97
0
```

6. Trimming dups
```
rzarz@ubulap:~/dev/ceph/build$ CEPH_ARGS="--osd_pg_log_dups_tracked 2500 --osd_pg_log_trim_max=100" bin/ceph-objectstore-tool --data-path dev/osd0 --op trim-pg-log-dups --pgid 2.7
max_dup_entries=2500 max_chunk_size=100
Removing keys dup_0000000020.00000000000000000001 - dup_0000000020.00000000000000000100
Removing keys dup_0000000020.00000000000000000101 - dup_0000000020.00000000000000000200
Removing keys dup_0000000020.00000000000000000201 - dup_0000000020.00000000000000000300
Removing keys dup_0000000020.00000000000000000301 - dup_0000000020.00000000000000000400
Removing keys dup_0000000020.00000000000000000401 - dup_0000000020.00000000000000000500
Removing keys dup_0000000020.00000000000000000501 - dup_0000000020.00000000000000000600
Finished trimming, now compacting...
Finished trimming pg log dups
```

7. Checking number of pg log's entries and dups
```
rzarz@ubulap:~/dev/ceph/build$ for pgid in `cat osd0_pgs.txt`; do echo $pgid; bin/ceph-objectstore-tool --data-path dev/osd0 --op log --pgid $pgid | jq '(.pg_log_t.log|length),(.pg_log_t.dups|length)'; done
2.7
10020
2500
2.6
10100
3000
2.3
10012
2800
2.1
10049
2900
2.2
10057
2700
2.0
10027
2900
2.5
10077
2700
2.4
10072
2900
1.0
97
0
```

Conflicts:
        src/tools/ceph_objectstore_tool.cc -- undetected conflict
        with d5445b8f113797718a0dbb05e884a6bffbfed76a. Fixed by
        adopting the patch no not require the `unique_ptr<T>::get()`.

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

3 years agoRevert "tools/ceph_objectstore_took: Add duplicate entry trimming"
Radoslaw Zarzynski [Thu, 9 Jun 2022 21:30:51 +0000 (21:30 +0000)]
Revert "tools/ceph_objectstore_took: Add duplicate entry trimming"

This reverts commit 1f3fede173cf8224f4c9f1d24b30d6fa8dfda216.

Although the chunking in off-line `dups` trimming (via COT) seems
fine, the `ceph-objectstore-tool` is a client of `trim()` of
`PGLog::IndexedLog` which means than a partial revert is not
possible without extensive changes. Moreover, trimming pg log
is not enough without modifying pg_info_t accordingly which
the reverted patch lacks.

The backport ticket is: https://tracker.ceph.com/issues/55989

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoMerge pull request #46211 from idryomov/wip-use-system-libpmem-on-c9s-pacific
Yuri Weinstein [Fri, 10 Jun 2022 20:47:03 +0000 (13:47 -0700)]
Merge pull request #46211 from idryomov/wip-use-system-libpmem-on-c9s-pacific

pacific: rpm: use system libpmem on Centos 9 Stream

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoMerge pull request #45991 from idryomov/wip-make-check-enable-rbd-caches-pacific
Yuri Weinstein [Fri, 10 Jun 2022 20:46:09 +0000 (13:46 -0700)]
Merge pull request #45991 from idryomov/wip-make-check-enable-rbd-caches-pacific

pacific: run-make-check.sh: enable RBD persistent caches

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agocmake: pass -Wno-error when building PMDK 45991/head
Ilya Dryomov [Thu, 9 Jun 2022 11:42:01 +0000 (13:42 +0200)]
cmake: pass -Wno-error when building PMDK

It's hitting pacific with a nuisance -Werror=array-parameter= const
char * vs const char[37] mismatch.  Follow commit 91a616b26e83 ("cmake:
pass RTE_DEVEL_BUILD=n when building dpdk") and just disable -Werror.

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

3 years agoqa: make test_perf_stats_stale_metrics check only the clients created for the tests 45293/head
Jos Collin [Thu, 24 Mar 2022 04:57:58 +0000 (10:27 +0530)]
qa: make test_perf_stats_stale_metrics check only the clients created for the tests

Uses the client's global id to get the metrics, instead of using the index.
This ensures that test_perf_stats_stale_metrics checks only the clients mounted for
the tests.

Fixes: https://tracker.ceph.com/issues/54971
Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit 1621308214cd18750c8be803fc014bdf73e2218a)

3 years agoqa: test `ceph fs perf stats` doesn't output stale metrics
Jos Collin [Fri, 9 Jul 2021 11:26:47 +0000 (16:56 +0530)]
qa: test `ceph fs perf stats` doesn't output stale metrics

That `ceph fs perf stats` doesn't output stale metrics
after the rank0 MDS failover.

Fixes: https://tracker.ceph.com/issues/50033
Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit 116e89a2f2849ed7cb711d1ae465c6f510b2810d)

Conflicts:
        qa/tasks/cephfs/test_mds_metrics.py

3 years agomgr, pybind/mgr, mgr/stats: be resilient to offline rank0 MDS
Jos Collin [Tue, 29 Jun 2021 09:59:01 +0000 (15:29 +0530)]
mgr, pybind/mgr, mgr/stats: be resilient to offline rank0 MDS

Reregister the user queries during the rank0 MDS failover event
by calling listener.handle_query_updated(). This enables
`ceph fs perf stats` to receive the updated metrics after the
failover.

Fixes: https://tracker.ceph.com/issues/50033
Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit c2470f271cce4d512f2cf00552c9b753e4c69f71)

Conflicts:
       src/pybind/mgr/stats/fs/perf_stats.py

3 years agoMerge pull request #46297 from dparmar18/pacific_put_get_backport
Yuri Weinstein [Fri, 10 Jun 2022 14:19:17 +0000 (07:19 -0700)]
Merge pull request #46297 from dparmar18/pacific_put_get_backport

pacific: cephfs-shell: fix put and get cmd

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46183 from vshankar/tr-55427
Yuri Weinstein [Fri, 10 Jun 2022 14:18:39 +0000 (07:18 -0700)]
Merge pull request #46183 from vshankar/tr-55427

pacific: mds: include encoded stray inode when sending dentry unlink message to replicas

Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #46180 from lxbsz/wip-55343
Yuri Weinstein [Fri, 10 Jun 2022 14:18:00 +0000 (07:18 -0700)]
Merge pull request #46180 from lxbsz/wip-55343

Pacific: mds: reset heartbeat when fetching or committing entries

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46179 from lxbsz/wip-55346
Yuri Weinstein [Fri, 10 Jun 2022 14:17:12 +0000 (07:17 -0700)]
Merge pull request #46179 from lxbsz/wip-55346

Pacific: client: stop forwarding the request when exceeding 256 times

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #46146 from neesingh-rh/wip-55539-pacific
Yuri Weinstein [Fri, 10 Jun 2022 14:15:38 +0000 (07:15 -0700)]
Merge pull request #46146 from neesingh-rh/wip-55539-pacific

pacific: cephfs-top: Multiple filesystem support

Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoRevert "osd/PGLog.cc: Trim duplicates by number of entries"
Radoslaw Zarzynski [Thu, 9 Jun 2022 21:22:29 +0000 (21:22 +0000)]
Revert "osd/PGLog.cc: Trim duplicates by number of entries"

This reverts commit d49ff13c80bbed5fb6c064f9689bb2b6a0a251b8.
which is the in-OSD part of the fix for accumulation of `dup`
entries in a PG Log. Brainstorming it has brought questions
on the OSD's behaviour during an upgrade if there are tons of
dups in the log. What must be double-checked before bringing
it back is ensuring we chunk the deletions properly to not
impose OOMs / stalls in, to exemplify, RocksDB.

The backport ticket is: https://tracker.ceph.com/issues/55989

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoosd: log the number of 'dups' entries in a PG Log 46608/head
Radoslaw Zarzynski [Thu, 9 Jun 2022 18:44:10 +0000 (18:44 +0000)]
osd: log the number of 'dups' entries in a PG Log

We really want to have the ability to know how many
entries `PGLog::IndexedLog::dups` has inside.
The current ways are either invasive (stopping an OSD)
or indirect (examination of `dump_mempools`).

The code comes from Nitzan Mordechai (part of
ede37edd79a9d5560dfb417ec176327edfc0e4a3).

Fixes: https://tracker.ceph.com/issues/55982
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit 8f1c8a7309976098644bb978d2c1095089522846)

3 years agoMerge pull request #46470 from gregsfortytwo/wip-55747-pacific
Yuri Weinstein [Thu, 9 Jun 2022 13:28:40 +0000 (06:28 -0700)]
Merge pull request #46470 from gregsfortytwo/wip-55747-pacific

pacific: Implement CIDR blocklisting

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoclient/fuse: Fix directory DACs overriding for root 46596/head
Kotresh HR [Thu, 28 Apr 2022 10:31:48 +0000 (16:01 +0530)]
client/fuse: Fix directory DACs overriding for root

DACs are overridable for directories. For files,
Read/write DACs are always overridable but executable
DACs are overridable when there is at least one exec bit
set.

The files and directory DACS overriding were handled the
same way for root which is incorrect. This patch fixes
DACs overriding as described above for the root.

Fixes: https://tracker.ceph.com/issues/55313
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 2e1f43c99b1818c2ffde64f5b01083c1907a9f87)

3 years agoqa/suites/rbd: place cache file on tmpfs for xfstests 46597/head
Ilya Dryomov [Sun, 24 Apr 2022 15:30:49 +0000 (17:30 +0200)]
qa/suites/rbd: place cache file on tmpfs for xfstests

The RWL mode needs DAX and is dog slow otherwise -- qemu_xfstests.yaml
job always hits the 6 hour max_job_time limit.

As our tmpfs instance is limited and qemu_xfstests.yaml opens three
images at the same time, reduce the "big cache" size to 5G.  This facet
was added to iron out 32-bit head/tail pointer issues and 5G still does
the job there.

Going through the loop device is needed because tmpfs doesn't support
O_DIRECT.

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

3 years agoqa/suites/rbd: refactor persistent-writeback-cache suite
Ilya Dryomov [Sun, 24 Apr 2022 15:28:53 +0000 (17:28 +0200)]
qa/suites/rbd: refactor persistent-writeback-cache suite

Rename to pwl-cache, introduce home subdirectory and 4-cache-path.yaml.
No functional changes.

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

Conflicts:
qa/suites/rbd/pwl-cache/home/2-cluster/.qa [ commit
  1f714da81440 ("qa: fix or add missing .qa links") not in
  pacific ]
qa/suites/rbd/pwl-cache/home/5-cache-mode/.qa [ ditto ]

3 years agorun-make-check.sh: enable RBD persistent caches
Ilya Dryomov [Tue, 19 Apr 2022 09:21:06 +0000 (11:21 +0200)]
run-make-check.sh: enable RBD persistent caches

This was attempted in commit 69a7ed4eab36 ("run-make-check: enable
WITH_RBD_RWL when WITH_PMEM is true") but never completed.  We soon
bumped the requirement on libpmem, so WITH_SYSTEM_PMDK=ON wouldn't
have worked anyway.

Enable the RWL mode conditionally based on WITH_RBD_RWL variable.
Enable the SSD mode unconditionally as it has no special dependencies
and can be built on any architecture.

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

Conflicts:
run-make-check.sh [ commit 69a7ed4eab36 ("run-make-check:
  enable WITH_RBD_RWL when WITH_PMEM is true") not in pacific ]

3 years agotest/encoding/check-generated.sh: show diff if binary reencode check fails
Ilya Dryomov [Tue, 19 Apr 2022 09:21:06 +0000 (11:21 +0200)]
test/encoding/check-generated.sh: show diff if binary reencode check fails

Take bf0b161115aa ("test/encoding/check-generated.sh: show diff if cmp
fails") a bit further.  Suggesting "cmp $tmp1 $tmp2" isn't very helpful
since cmp would report just the mismatch offset.

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

3 years agolibrbd/cache/pwl: WriteLogCacheEntry constructor must initialize flags
Ilya Dryomov [Tue, 19 Apr 2022 09:21:05 +0000 (11:21 +0200)]
librbd/cache/pwl: WriteLogCacheEntry constructor must initialize flags

Initializing the individual bit field members leaves the remaining two
bits uninitialized and that garbage state gets persisted.

In general, using bit fields in a structure where the layout actually
matters is not desirable.  Even with a few single bits, such as here,
their order, strictly speaking, is not guaranteed:

    An implementation may allocate any addressable storage unit large
    enough to hold a bit-field. If enough space remains, a bit-field
    that immediately follows another bit-field in a structure shall be
    packed into adjacent bits of the same unit. If insufficient space
    remains, whether a bit-field that does not fit is put into the next
    unit or overlaps adjacent units is implementation-defined. The
    order of allocation of bit-fields within a unit (high-order to
    low-order or low-order to high-order) is implementation-defined.
    The alignment of the addressable storage unit is unspecified.

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

3 years agolibrbd/cache/pwl: initialize generate_test_instances() objects
Ilya Dryomov [Tue, 19 Apr 2022 09:21:05 +0000 (11:21 +0200)]
librbd/cache/pwl: initialize generate_test_instances() objects

... to prevent check-generated.sh failures such as:

**** librbd::cache::pwl::WriteLogPoolRoot test 1 dump_json check failed ****
   ceph-dencoder type librbd::cache::pwl::WriteLogPoolRoot select_test 1 dump_json > /tmp/typ-cAoWrqlHC
   ceph-dencoder type librbd::cache::pwl::WriteLogPoolRoot select_test 1 encode decode dump_json > /tmp/typ-ES5yHpfGL
5c5
<     "flushed_sync_gen": 0,
---
>     "flushed_sync_gen": 255,

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

Conflicts:
src/librbd/cache/pwl/Types.cc [ commit 6eb14774fec0 ("librbd:
  build without "using namespace std"") not in pacific ]
src/librbd/cache/pwl/ssd/Types.h [ ditto ]

3 years agolibrbd/cache/pwl: fix -Wunused-lambda-capture warnings
Ilya Dryomov [Tue, 19 Apr 2022 09:21:05 +0000 (11:21 +0200)]
librbd/cache/pwl: fix -Wunused-lambda-capture warnings

Reported by clang on "make check" and "make check arm64" builds.

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

3 years agolibrbd: unlink newest mirror snapshot when at capacity, bump capacity 46593/head
Ilya Dryomov [Sun, 29 May 2022 16:20:34 +0000 (18:20 +0200)]
librbd: unlink newest mirror snapshot when at capacity, bump capacity

CreatePrimaryRequest::unlink_peer() invoked via "rbd mirror image
snapshot" command or via rbd_support mgr module when creating a new
scheduled mirror snapshot at rbd_mirroring_max_mirroring_snapshots
capacity on the primary cluster can race with Replayer::unlink_peer()
invoked by rbd-mirror when finishing syncing an older snapshot on the
secondary cluster.  Consider the following:

   [ primary: primary-snap1, primary-snap2, primary-snap3
     secondary: non-primary-snap1 (complete), non-primary-snap2 (syncing) ]

0. rbd-mirror is syncing snap1..snap2 delta
1. rbd_support creates primary-snap4
2. due to rbd_mirroring_max_mirroring_snapshots == 3, rbd_support picks
   primary-snap3 for unlinking
3. rbd-mirror finishes syncing snap1..snap2 delta and marks
   non-primary-snap2 complete

   [ snap1 (the old base) is no longer needed on either cluster ]

4. rbd-mirror unlinks and removes primary-snap1
5. rbd-mirror removes non-primary-snap1
6. rbd-mirror picks snap2 as the new base
7. rbd-mirror creates non-primary-snap3 and starts syncing snap2..snap3
   delta

   [ primary: primary-snap2, primary-snap3, primary-snap4
     secondary: non-primary-snap2 (complete), non-primary-snap3 (syncing) ]

8. rbd_support unlinks and removes primary-snap3 which is in-use by
   rbd-mirror

If snap trimming on the primary cluster kicks in soon enough, the
secondary image becomes corrupted: rbd-mirror would eventually finish
"syncing" non-primary-snap3 and mark it complete in spite of bogus data
in the HEAD -- the primary cluster OSDs would start returning ENOENT
for snap trimmed objects.  Luckily, rbd-mirror's attempt to pick snap3
as the new base would wedge the replayer with "split-brain detected:
failed to find matching non-primary snapshot in remote image" error.

Before commit a888bff8d00e ("librbd/mirror: tweak which snapshot is
unlinked when at capacity") this could happen pretty much all the time
as it was the second oldest snapshot that was unlinked.  This commit
changed it to be the third oldest snapshot, turning this into a more
narrow but still very much possible to hit race.

Unfortunately this race condition appears to be inherent to the way
snapshot-based mirroring is currently implemented:

a. when mirror snapshots are created on the producer side of the
   snapshot queue, they are already linked
b. mirror snapshots can be concurrently unlinked/removed on both
   sides of the snapshot queue by non-cooperating clients (local
   rbd_mirror_image_create_snapshot() vs remote rbd-mirror)
c. with mirror peer links off the list due to (a), there is no
   existing way for rbd-mirror to persistently mark a snapshot as
   in-use

As a workaround, bump rbd_mirroring_max_mirroring_snapshots to 5 and
always unlink the newest snapshot (i.e. slot 4) instead of the third
oldest snapshot (i.e. slot 2).  Hopefully this gives enough leeway,
as rbd-mirror would need to sync two snapshots (i.e. transition from
syncing 0-1 to 1-2 and then to 2-3) before potentially colliding with
rbd_mirror_image_create_snapshot() on slot 4.

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

Conflicts:
src/common/options/rbd.yaml.in [ options are defined in
  src/common/options.cc in pacific ]

3 years agotest/librbd: fix set_val() call in SuccessUnlink* test cases
Ilya Dryomov [Sun, 29 May 2022 17:55:04 +0000 (19:55 +0200)]
test/librbd: fix set_val() call in SuccessUnlink* test cases

rbd_mirroring_max_mirroring_snapshots isn't actually set to 3 there
due to the stray conf_ prefix.  It didn't matter until now because the
default was also 3.

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

3 years agorbd-mirror: don't prune non-primary snapshot when restarting delta sync 46590/head
Ilya Dryomov [Sat, 28 May 2022 18:06:22 +0000 (20:06 +0200)]
rbd-mirror: don't prune non-primary snapshot when restarting delta sync

When restarting interrupted sync (signified by the "end" non-primary
snapshot with last_copied_object_number > 0), preserve the "start"
non-primary snapshot until the sync is completed, like it would have
been done had the sync not been interrupted.  This ensures that the
same m_local_snap_id_start is passed to scan_remote_mirror_snapshots()
and ultimately ImageCopyRequest state machine on restart as on initial
start.

This ends up being yet another fixup for 281af0de86b1 ("rbd-mirror:
prune unnecessary non-primary mirror snapshots"), following earlier
7ba9214ea5b7 ("rbd-mirror: don't prune older mirror snapshots when
pruning incomplete snapshot") and ecd3778a6f9a ("rbd-mirror: ensure
that the last non-primary snapshot cannot be pruned").

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