]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoos/bluestore: introduce multithireading sync for bluestore's repairer 41749/head
Igor Fedotov [Wed, 19 May 2021 23:17:21 +0000 (02:17 +0300)]
os/bluestore: introduce multithireading sync for bluestore's repairer

In quick-fix mode bluestore uses 2 threads by default to perform the
repair. Due to lacking synchronization they might corrupt repair
transaction batch.

Fixes: https://tracker.ceph.com/issues/50017
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 38c5b04235402a7908bc4713f617d767ca9fdc56)

 Conflicts:
src/os/bluestore/BlueStore.cc - future stuff attempted to sneak
in
src/os/bluestore/BlueStore.h - the same as above

4 years agotest/bluestore: add test case to reproduce #50017
Igor Fedotov [Wed, 19 May 2021 23:15:32 +0000 (02:15 +0300)]
test/bluestore: add test case to reproduce #50017

This issue is caused by the lack of multithreading sync when doing
bluestore's quick-fix.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 339a4257a1bfb7dc5d47b019a8a6492affa05b7c)

4 years agoMerge PR #41485 into nautilus
Patrick Donnelly [Mon, 7 Jun 2021 16:07:10 +0000 (09:07 -0700)]
Merge PR #41485 into nautilus

* refs/pull/41485/head:
qa: avoid TypeError in cleanup

Reviewed-by: Venky Shankar <vshankar@redhat.com>
4 years agoMerge pull request #41716 from k0ste/wip-51107-nautilus
Yuri Weinstein [Mon, 7 Jun 2021 15:45:29 +0000 (08:45 -0700)]
Merge pull request #41716 from k0ste/wip-51107-nautilus

nautilus: ceph-volume: fix batch report and respect ceph.conf config values

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoMerge pull request #41713 from k0ste/wip-51104-nautilus
Guillaume Abrioux [Mon, 7 Jun 2021 15:04:43 +0000 (17:04 +0200)]
Merge pull request #41713 from k0ste/wip-51104-nautilus

nautilus: ceph-volume: fix batch report and respect ceph.conf config values

4 years agoMerge pull request #41676 from ifed01/wip-ifed-migrate-nau
Guillaume Abrioux [Mon, 7 Jun 2021 13:51:36 +0000 (15:51 +0200)]
Merge pull request #41676 from ifed01/wip-ifed-migrate-nau

nautilus: ceph-volume: implement bluefs volume migration.

4 years agoceph-volume: respect the value of bluestore_block_db_size from ceph.conf 41716/head
Andrew Schoen [Mon, 24 May 2021 17:19:38 +0000 (12:19 -0500)]
ceph-volume: respect the value of bluestore_block_db_size from ceph.conf

If --block-db-size is not given args.block_db_size is set to None,
so we should check for it's value in ceph.conf

Resolves: RHBZ#1962744
Fixes: https://tracker.ceph.com/issues/50958
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit cd70a6f583a651e71b5e1b4cf381467cb85039f6)

4 years agoceph-volume: calculate % of device correctly in lvm batch --report
Andrew Schoen [Mon, 24 May 2021 17:04:00 +0000 (12:04 -0500)]
ceph-volume: calculate % of device correctly in lvm batch --report

If using --block-db-size, the % of device calculation is incorrect
and always reads 100%.

Resolves: RHBZ#1946478
Fixes: https://tracker.ceph.com/issues/50957
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit ed5ab92dc3e67a670b33f7c36c651571682bf8e2)

4 years agoceph-volume: respect the value of bluestore_block_db_size from ceph.conf 41713/head
Andrew Schoen [Mon, 24 May 2021 17:19:38 +0000 (12:19 -0500)]
ceph-volume: respect the value of bluestore_block_db_size from ceph.conf

If --block-db-size is not given args.block_db_size is set to None,
so we should check for it's value in ceph.conf

Resolves: RHBZ#1962744
Fixes: https://tracker.ceph.com/issues/50958
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit cd70a6f583a651e71b5e1b4cf381467cb85039f6)

4 years agoceph-volume: calculate % of device correctly in lvm batch --report
Andrew Schoen [Mon, 24 May 2021 17:04:00 +0000 (12:04 -0500)]
ceph-volume: calculate % of device correctly in lvm batch --report

If using --block-db-size, the % of device calculation is incorrect
and always reads 100%.

Resolves: RHBZ#1946478
Fixes: https://tracker.ceph.com/issues/50957
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit ed5ab92dc3e67a670b33f7c36c651571682bf8e2)

4 years agoMerge pull request #41650 from rhcs-dashboard/wip-50426-nautilus
Ernesto Puerta [Fri, 4 Jun 2021 19:44:39 +0000 (21:44 +0200)]
Merge pull request #41650 from rhcs-dashboard/wip-50426-nautilus

nautilus: mgr/Dashboard: Remove erroneous elements in hosts-overview Grafana dashboard

Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
4 years agoMerge pull request #41662 from idryomov/wip-rbd-trash-purge-nautilus
Yuri Weinstein [Fri, 4 Jun 2021 17:28:53 +0000 (10:28 -0700)]
Merge pull request #41662 from idryomov/wip-rbd-trash-purge-nautilus

nautilus: librbd: don't stop at the first unremovable image when purging

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
4 years agoMerge pull request #41641 from idryomov/wip-rbd-qemu-precise-repos-nautilus
Yuri Weinstein [Fri, 4 Jun 2021 17:28:12 +0000 (10:28 -0700)]
Merge pull request #41641 from idryomov/wip-rbd-qemu-precise-repos-nautilus

nautilus: qa/tasks/qemu: precise repos have been archived

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #41673 from ifed01/wip-ifed-fix-avl-enospc2-nau
Yuri Weinstein [Fri, 4 Jun 2021 16:22:37 +0000 (09:22 -0700)]
Merge pull request #41673 from ifed01/wip-ifed-fix-avl-enospc2-nau

nautilus: os/bluestore: fix unexpected ENOSPC in Avl/Hybrid allocators.

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #41648 from rhcs-dashboard/wip-51064-nautilus
Yuri Weinstein [Fri, 4 Jun 2021 16:21:34 +0000 (09:21 -0700)]
Merge pull request #41648 from rhcs-dashboard/wip-51064-nautilus

nautilus: mgr/dashboard: fix bucket objects and size calculations

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
4 years agoMerge pull request #41114 from k0ste/wip-48650-nautilus
Yuri Weinstein [Fri, 4 Jun 2021 16:04:13 +0000 (09:04 -0700)]
Merge pull request #41114 from k0ste/wip-48650-nautilus

nautilus: ceph-volume: disable cache for blkid calls

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoMerge pull request #40827 from ivancich/wip-50300-nautilus
Yuri Weinstein [Fri, 4 Jun 2021 15:10:22 +0000 (08:10 -0700)]
Merge pull request #40827 from ivancich/wip-50300-nautilus

nautilus: rgw: radoslist incomplete multipart parts marker

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoMerge pull request #39771 from ivancich/wip-49187-nautilus
Yuri Weinstein [Fri, 4 Jun 2021 15:09:17 +0000 (08:09 -0700)]
Merge pull request #39771 from ivancich/wip-49187-nautilus

nautilus: rgw: tooling to locate rgw objects with missing rados components

Reviewed-by: Michael Kidd <linuxkidd@gmail.com>
4 years agoMerge pull request #41611 from dvanders/dvanders_40572_nautilus
Yuri Weinstein [Thu, 3 Jun 2021 19:48:04 +0000 (12:48 -0700)]
Merge pull request #41611 from dvanders/dvanders_40572_nautilus

nautilus: osd/PeeringState: fix acting_set_writeable min_size check

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoMerge pull request #41088 from smithfarm/wip-50356-nautilus
Yuri Weinstein [Thu, 3 Jun 2021 19:46:49 +0000 (12:46 -0700)]
Merge pull request #41088 from smithfarm/wip-50356-nautilus

nautilus: make-dist: refuse to run if script path contains a colon

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #41246 from idryomov/wip-posix-memalign-fix-nautilus
Yuri Weinstein [Thu, 3 Jun 2021 19:29:50 +0000 (12:29 -0700)]
Merge pull request #41246 from idryomov/wip-posix-memalign-fix-nautilus

nautilus: common/buffer: adjust align before calling posix_memalign()

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #40698 from smithfarm/wip-49729-nautilus
Yuri Weinstein [Thu, 3 Jun 2021 19:28:24 +0000 (12:28 -0700)]
Merge pull request #40698 from smithfarm/wip-49729-nautilus

nautilus: debian/ceph-common.postinst: do not chown cephadm log dirs

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoceph-volume: disable cache for blkid calls 41114/head
Rafał Wądołowski [Fri, 4 Dec 2020 12:25:58 +0000 (13:25 +0100)]
ceph-volume: disable cache for blkid calls

Due to bugs in cache managment in blkid, there are possible to have
nonexistence entries. This entries breaks ceph-volume operations by
passing two or more outputs instead of one (eg. /dev/sdk2).

Fixes: https://tracker.ceph.com/issues/48464
Signed-off-by: Rafał Wądołowski <rwadolowski@cloudferro.com>
(cherry picked from commit 90ed2e03198edec4a61dd9d6010e8d7b306b5f3a)

4 years agoMerge pull request #41593 from lxbsz/wip-47020-open-fds
Yuri Weinstein [Thu, 3 Jun 2021 15:13:07 +0000 (08:13 -0700)]
Merge pull request #41593 from lxbsz/wip-47020-open-fds

nautilus: libcephfs: ignore restoring the open files limit

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoos/bluestore/bluestore_tool: compare retval stat() with -1 41676/head
Kefu Chai [Thu, 20 May 2021 05:55:13 +0000 (13:55 +0800)]
os/bluestore/bluestore_tool: compare retval stat() with -1

before this change, stat() is always called to check if the
file specified by --dev-target exists even if this option is not
specified. also, we compare the retval of stat() with ENOENT, while
state() returns -1 on error.

after this change, stat() is called only if --dev-target is specified,
and we compare the retval of stat() with -1 and 0 only, so if
--dev-target option is not specified, the tool still hehaves.

this change addresses a regression introduced by
94a91f54fe30a4dd113fbc1b02bc3f3d52c82a92

Fixes: https://tracker.ceph.com/issues/50891
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d4c65a368c9cf35e01604fc3321f867cbe3e4109)

4 years agotests/ceph_volume: add UT for bluefs migration stuff
Igor Fedotov [Wed, 28 Apr 2021 19:17:24 +0000 (22:17 +0300)]
tests/ceph_volume: add UT for bluefs migration stuff

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit f8def0443db59e7df31132953fff708b76417236)

Conflicts
  src/ceph-volume/ceph_volume/tests/devices/lvm/test_migrate.py -
get_single_lv is the new name for get_first_lvi

4 years agoceph-volume: implement bluefs volume migration.
Igor Fedotov [Fri, 19 Feb 2021 11:31:52 +0000 (14:31 +0300)]
ceph-volume: implement bluefs volume migration.

This is a wrapper over ceph-bluestore-tool's bluefs-bdev-migrate command.
Primarily intended to introduce LVM tags manipulation which
ceph-bluestore-tool is lacking.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 58efeb915198d4fbb40b6fa080312d8bee3141bf)

 Conflicts:
doc/man/8/ceph-volume.rst - a bit different formatting is in use
src/ceph-volume/ceph_volume/api/lvm.py - get_single_lv is the
new name for get_first_lv

4 years agotools/ceph-bluestore-tool: be more legible before requesting additional params
Igor Fedotov [Fri, 19 Feb 2021 11:23:00 +0000 (14:23 +0300)]
tools/ceph-bluestore-tool: be more legible before requesting additional params

Request DB/WAL size specification when relevant devices are created
only.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 94a91f54fe30a4dd113fbc1b02bc3f3d52c82a92)

4 years agoos/bluestore: fix unexpected ENOSPC in Avl/Hybrid allocators. 41673/head
Igor Fedotov [Mon, 17 May 2021 19:23:26 +0000 (22:23 +0300)]
os/bluestore: fix unexpected ENOSPC in Avl/Hybrid allocators.

Avl allocator mode was returning unexpected ENOSPC in first-fit mode if all size-
matching available extents were unaligned but applying the alignment made all of
them shorter than required. Since no lookup retry with smaller size -
ENOSPC is returned.
Additionally we should proceed with a lookup in best-fit mode even when
original size has been truncated to match the avail size.
(force_range_size_alloc==true)

Fixes: https://tracker.ceph.com/issues/50656
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 0eed13a4969d02eeb23681519f2a23130e51ac59)

 Conflicts:
src/test/objectstore/Allocator_test.cc - legacy INSTANTIATE_TEST_CASE_P clause is still used in Nautilus

4 years agoMerge pull request #41158 from smithfarm/wip-50430-nautilus
Yuri Weinstein [Wed, 2 Jun 2021 20:41:50 +0000 (13:41 -0700)]
Merge pull request #41158 from smithfarm/wip-50430-nautilus

nautilus: rgw: Added caching for S3 credentials retrieved from keystone

Reviewed-by: Friedmann <ofriedma@redhat.com>
4 years agolibrbd: don't stop at the first unremovable image when purging 41662/head
Ilya Dryomov [Wed, 26 May 2021 12:21:22 +0000 (14:21 +0200)]
librbd: don't stop at the first unremovable image when purging

As there is no inherent ordering, there may be multiple removable
images past the unremovable image.  On top of that, removing a clone
may make its parent removable so perform an additional pass if any
image gets removed.

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

Conflicts:
qa/workunits/rbd/cli_generic.sh [ commit 6e1434eefc3d
  ("librbd: optionally move parent image to trash on remove")
  not in nautilus ]

4 years agorbd: combined error message for expected Trash::purge() errors
Ilya Dryomov [Wed, 26 May 2021 12:21:22 +0000 (14:21 +0200)]
rbd: combined error message for expected Trash::purge() errors

Output to stderr instead of the log where regular users wouldn't see
it given the elevated log level.

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

4 years agorbd: propagate Trash::purge() result
Ilya Dryomov [Wed, 26 May 2021 12:21:22 +0000 (14:21 +0200)]
rbd: propagate Trash::purge() result

Exit with respective status like other commands do.

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

4 years agoqa/tasks/qemu: precise repos have been archived 41641/head
Ilya Dryomov [Tue, 1 Jun 2021 10:46:32 +0000 (12:46 +0200)]
qa/tasks/qemu: precise repos have been archived

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

4 years agomonitoring/grafana: Remove erroneous elements in hosts-overview Grafana dashboard 41650/head
Malcolm Holmes [Sat, 17 Apr 2021 22:11:48 +0000 (23:11 +0100)]
monitoring/grafana: Remove erroneous elements in hosts-overview Grafana dashboard

The hosts-overview Grafana dashboard json file contains a repeated element, making
it invalid JSON. Some JSON parsers handle this. However, this prevents Jsonnet
from parsing the dashboard, which prevents the deployment of this dashboard via
Jsonnet.

Fixes: https://tracker.ceph.com/issues/50410
Signed-off-by: Malcolm Holmes <mdh@odoko.co.uk>
(cherry picked from commit 382e293656cff4a0e7d84cc4d3dbfc005e82e10f)

4 years agomgr/dashboard: fix bucket objects and size calculations 41648/head
Avan Thakkar [Tue, 1 Jun 2021 14:21:16 +0000 (19:51 +0530)]
mgr/dashboard: fix bucket objects and size calculations

Fixes: https://tracker.ceph.com/issues/51035
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit 9f5ef98d9c88a91b80e622f16f7061eddff79b2c)

4 years agoMerge pull request #41386 from rhcs-dashboard/wip-50841-nautilus
Ernesto Puerta [Wed, 2 Jun 2021 08:16:20 +0000 (10:16 +0200)]
Merge pull request #41386 from rhcs-dashboard/wip-50841-nautilus

nautilus: mgr/dashboard: grafana panels for rgw multisite sync performance

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #41513 from ideepika/wip-49592-upgrade-nautilus
Ilya Dryomov [Tue, 1 Jun 2021 22:04:30 +0000 (00:04 +0200)]
Merge pull request #41513 from ideepika/wip-49592-upgrade-nautilus

nautilus: qa/upgrade: disable update_features test_notify with older client as lockowner

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
4 years agoMerge pull request #41531 from rhcs-dashboard/wip-50885-nautilus
Ernesto Puerta [Tue, 1 Jun 2021 18:07:48 +0000 (20:07 +0200)]
Merge pull request #41531 from rhcs-dashboard/wip-50885-nautilus

nautilus: mgr/dashboard: fix OSDs Host details/overview grafana graphs

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: wornet-mwo <NOT@FOUND>
4 years agonautilus: qa/upgrade: disable update_features test_notify with older client as lockowner 41513/head
Deepika Upadhyay [Wed, 26 May 2021 19:25:13 +0000 (00:55 +0530)]
nautilus: qa/upgrade: disable update_features test_notify with older client as lockowner

* with the recent support for async rbd operations from pacific+ when an
 older client(non async support) goes on upgrade, and simultaneously
 interacts with a newer client which expects the requests to be async,
 experiences hang; considering the return code for request completion to
 be acknowledgement for async request, which then keeps waiting for
 another acknowledgement of request completion.

 this if happens should be a rare only when lockowner is an old client
 and should be deferred if compatibility issues arises.

* amend upgrade test workunits to use respective stable branches

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agonautilus: osd/PeeringState: fix acting_set_writeable min_size check 41611/head
Dan van der Ster [Tue, 1 Jun 2021 09:14:10 +0000 (11:14 +0200)]
nautilus: osd/PeeringState: fix acting_set_writeable min_size check

This is a nautilus only manual backport of
https://github.com/ceph/ceph/pull/40572

which is itself composed of commits
7b2e0f4fd1c9071495dae9189428aa1cb8774c30
642a1c165499bcbd4cfdf907af313ac7ffe44ff4

The backport did not apply cleanly because these call have
been factored out into PeeringState.cc in octopus and newer.

The original callers have been fixed in PG.cc.

Fixes: https://tracker.ceph.com/issues/50153
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
4 years agoMerge pull request #41448 from idryomov/wip-monc-rotating-timeout-nautilus
Yuri Weinstein [Mon, 31 May 2021 17:05:41 +0000 (10:05 -0700)]
Merge pull request #41448 from idryomov/wip-monc-rotating-timeout-nautilus

nautilus: mon/MonClient: tolerate a rotating key that is slightly out of date

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #41394 from batrick/i50128
Yuri Weinstein [Mon, 31 May 2021 17:05:05 +0000 (10:05 -0700)]
Merge pull request #41394 from batrick/i50128

nautilus: pybind/mgr/volumes: deadlock on async job hangs finisher thread

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #40769 from smithfarm/wip-49514-nautilus
Yuri Weinstein [Mon, 31 May 2021 17:03:38 +0000 (10:03 -0700)]
Merge pull request #40769 from smithfarm/wip-49514-nautilus

nautilus: cephfs: client: add ability to lookup snapped inodes by inode number

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
4 years agomsg: throw a system error when center.init fails 41593/head
Xiubo Li [Fri, 7 Aug 2020 07:45:52 +0000 (15:45 +0800)]
msg: throw a system error when center.init fails

In the libcephfs test case, it will run handreds of threads in
parallel, it will possibly reach the open files limit, but there
won't useful logs about what has happened.

This will just throw a system error, just like:

C++ exception with description "(24) Too many open files" thrown in the test body.

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

Conflicts:
      src/msg/async/Stack.cc
- nautilus uses plain "i" as the for loop counter variable, while
master has more fancy "worker_id"

4 years agolibcephfs: ignore restoring the open files limit
Xiubo Li [Fri, 7 Aug 2020 08:21:07 +0000 (16:21 +0800)]
libcephfs: ignore restoring the open files limit

Let's just ignore restoring the open files limit, the kernel will
defer releasing the file descriptors and then the process will be
possibly reachthe open files limit.

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

4 years agoMerge pull request #41297 from kotreshhr/wip-50628-nautilus
Yuri Weinstein [Sat, 29 May 2021 15:17:18 +0000 (08:17 -0700)]
Merge pull request #41297 from kotreshhr/wip-50628-nautilus

nautilus: client: Fix executeable access check for the root user

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #40865 from lxbsz/wip-49519-nautilus
Yuri Weinstein [Sat, 29 May 2021 15:16:47 +0000 (08:16 -0700)]
Merge pull request #40865 from lxbsz/wip-49519-nautilus

nautilus: cephfs: client: wake up the front pos waiter

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #41144 from smithfarm/wip-50634-nautilus
Yuri Weinstein [Sat, 29 May 2021 15:16:11 +0000 (08:16 -0700)]
Merge pull request #41144 from smithfarm/wip-50634-nautilus

nautilus: mds: do not trim the inodes from the lru list in standby_replay

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #41519 from tchaikov/nautilus-pr-41516
Yuri Weinstein [Thu, 27 May 2021 15:15:57 +0000 (08:15 -0700)]
Merge pull request #41519 from tchaikov/nautilus-pr-41516

nautilus: mon/OSDMonitor: drop stale failure_info even if can_mark_down()

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agotest: add ceph_mksnap and ceph_rmsnap replacements 40769/head
Jeff Layton [Wed, 26 May 2021 11:05:13 +0000 (07:05 -0400)]
test: add ceph_mksnap and ceph_rmsnap replacements

Signed-off-by: Jeff Layton <jlayton@redhat.com>
4 years agoMerge pull request #36679 from josecastroleon/nautilus
Yuri Weinstein [Wed, 26 May 2021 13:57:47 +0000 (06:57 -0700)]
Merge pull request #36679 from josecastroleon/nautilus

nautilus: pybind: volume_client handle purge of directory names encoded in utf-8

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agomgr/pybind/volumes: avoid acquiring lock for thread count updates 41394/head
Patrick Donnelly [Mon, 22 Mar 2021 16:17:43 +0000 (09:17 -0700)]
mgr/pybind/volumes: avoid acquiring lock for thread count updates

Perform thread count updates in a dedicated tick thread. This avoids the
mgr Finisher thread from getting potentially hung via a mutex deadlock
in the cloner thread management.

Fixes: https://tracker.ceph.com/issues/49605
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b27ddfaed4a3c66bac2343c8315a1fe542edb63e)

4 years agoqa: bump debugging for mgr
Patrick Donnelly [Fri, 19 Mar 2021 21:44:37 +0000 (14:44 -0700)]
qa: bump debugging for mgr

Hunting [1].

[1] https://tracker.ceph.com/issues/49605
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 17b291e57d18d13643761570adf208fbbca06252)

Conflicts:
qa/suites/fs/basic_functional/tasks/volumes.yaml
qa/suites/fs/volumes/tasks/volumes/overrides.yaml

4 years agomgr: add debug output for commands dispatched
Patrick Donnelly [Fri, 19 Mar 2021 21:41:58 +0000 (14:41 -0700)]
mgr: add debug output for commands dispatched

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit bb56c30167bed615db86aff5290550a887b3731a)

Conflicts:
src/mgr/DaemonServer.cc

4 years agomgr/dashboard: fix OSDs Host details/overview grafana graphs 41531/head
Alfonso Martínez [Fri, 7 May 2021 13:38:07 +0000 (15:38 +0200)]
mgr/dashboard: fix OSDs Host details/overview grafana graphs

Fixes: https://tracker.ceph.com/issues/50686
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 7d79efb0252e970b3621d1540e69e2115788dcc3)

4 years agodashboard: Fixed name clash when hostname similar to anaother
Michael Wodniok [Fri, 12 Mar 2021 16:08:54 +0000 (17:08 +0100)]
dashboard: Fixed name clash when hostname similar to anaother

Fixes: #49769
Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit e97e27ebdbb394c01aa1cf502039a798d9c4e110)

4 years agoMerge pull request #41521 from rhcs-dashboard/wip-50961-nautilus
Ernesto Puerta [Tue, 25 May 2021 11:28:57 +0000 (13:28 +0200)]
Merge pull request #41521 from rhcs-dashboard/wip-50961-nautilus

nautilus: mgr/dashboard: fix API docs link

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agomon/OSDMonitor: drop stale failure_info even if can_mark_down() 41519/head
Kefu Chai [Tue, 25 May 2021 06:31:02 +0000 (14:31 +0800)]
mon/OSDMonitor: drop stale failure_info even if can_mark_down()

in a124ee85b03e15f4ea371358008ecac65f9f4e50, we add a check to drop
stale failure_info reports. but if osdmap does not prohibit us from
marking the osd in question down, the branch checking the stale info
is not executed. in general, it is allowed to mark an osd down, so
the fix of a124ee85b03e15f4ea371358008ecac65f9f4e50 just fails to
work.

in this change, we check for stale failure report of osd in question
as long as the osd is not marked down in the same function. this should
address the slow ops of failure report issue.

Fixes: https://tracker.ceph.com/issues/50964
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2d21ab905889c36bf9a9ecc6f0b66f4142c826e3)

4 years agomgr/dashboard: fix API docs link 41521/head
Avan Thakkar [Wed, 19 May 2021 23:57:29 +0000 (05:27 +0530)]
mgr/dashboard: fix API docs link

Fixes: https://tracker.ceph.com/issues/50890
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit e79c9d3f51970fbe275087e92e468205f70e6f12)

 Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts
       - Adopt the master branch changes.

4 years agoMerge pull request #41310 from k0ste/wip-50777-nautilus
Yuri Weinstein [Mon, 24 May 2021 19:37:55 +0000 (12:37 -0700)]
Merge pull request #41310 from k0ste/wip-50777-nautilus

nautilus: mgr/progress: ensure progress stays between [0,1]

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #41164 from linuxbox2/wip-nautilus-41031
Yuri Weinstein [Mon, 24 May 2021 19:36:46 +0000 (12:36 -0700)]
Merge pull request #41164 from linuxbox2/wip-nautilus-41031

nautilus: rgw: check object locks in multi-object delete

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa: avoid TypeError in cleanup 41485/head
Patrick Donnelly [Fri, 21 May 2021 03:34:18 +0000 (20:34 -0700)]
qa: avoid TypeError in cleanup

Fixes: https://tracker.ceph.com/issues/50933
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #41238 from trociny/wip-50701-nautilus
Yuri Weinstein [Thu, 20 May 2021 17:04:39 +0000 (10:04 -0700)]
Merge pull request #41238 from trociny/wip-50701-nautilus

nautilus: os/FileStore: fix to handle readdir error correctly

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #41111 from k0ste/wip-50603-nautilus
Yuri Weinstein [Thu, 20 May 2021 15:17:50 +0000 (08:17 -0700)]
Merge pull request #41111 from k0ste/wip-50603-nautilus

nautilus: osd: compute OSD's space usage ratio via raw space utilization

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #40106 from xijiacun/nautilus
Yuri Weinstein [Thu, 20 May 2021 15:17:13 +0000 (08:17 -0700)]
Merge pull request #40106 from xijiacun/nautilus

nautilus: rgw: Use correct bucket info when put or get large object with swift.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agomon/MonClient: tolerate a rotating key that is slightly out of date 41448/head
Ilya Dryomov [Mon, 17 May 2021 19:16:16 +0000 (21:16 +0200)]
mon/MonClient: tolerate a rotating key that is slightly out of date

Commit 918c12c2ab5d ("monclient: avoid key renew storm on clock skew")
made wait_auth_rotating() wait for a key set with a valid "current" key
(instead of any key set, including with all keys expired if the clocks
are skewed).  While a good idea in general, this is a bit too stringent
because the monitors will hand out key sets with "current" key that is
_just_ about to expire.  There is nothing wrong with that as "next" key
is also there, valid for the entire auth_service_ticket_ttl.  So even
if the daemon is talking to the leader, it is possible to get a key set
with an expired "current" key.  If the daemon is talking to a peon, it
is pretty easy to run into in practice.  This, coupled with the fact
that _check_auth_rotating() explicitly allows the keys to go slightly
out of date, can lead to wait_auth_rotating() stalling the boot for up
to 30 seconds:

  15:41:11.824+0000  1 ... ==== auth_reply(proto 2 0 (0) Success)
  15:41:41.824+0000  0 monclient: wait_auth_rotating timed out after 30
  15:41:41.824+0000 -1 mds.b unable to obtain rotating service keys; retrying

Apply the same 30 second or less tolerance in wait_auth_rotating().

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

Conflicts:
src/mon/MonClient.cc [ commit 85157d5aae3d ("mon:
  s/Mutex/ceph::mutex/") not in nautilus ]

4 years agoclient: Fix executeable access check for the root user 41297/head
Kotresh HR [Fri, 16 Apr 2021 04:14:05 +0000 (09:44 +0530)]
client: Fix executeable access check for the root user

Executeable permission check always returned sucessful
even when executeable bit is not set on any of the user,
group or others. This patch fixes it by overiding
executeable permission check for root only if one of
the executeable bit is set

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

Conflicts:
   src/client/Client.cc: The commit 6aa78836548f (cephfs errno aliases) is not present in
nautilus and some other trivial conflict, may be because some patches are missing
in nautilus.

4 years agomgr/dashboard: grafana panels for rgw multisite sync performance 41386/head
Alfonso Martínez [Fri, 22 May 2020 11:36:10 +0000 (13:36 +0200)]
mgr/dashboard: grafana panels for rgw multisite sync performance

* RGW sync perf. counters are now exposed through grafana panels.
* Sync Performance tab is only shown if rgw realm is detected.
* Prometheus module: added metrics suitable for prometheus consumption (from existing ones, not replacing for backward compatibility).

Fixes: https://tracker.ceph.com/issues/45310
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit cf4ff7d2f03bc285a3fae3f27577333f11dab58a)

 Conflicts:
   - Solved conflicts from cherry-pick:
       src/pybind/mgr/dashboard/controllers/rgw.py
       src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts
       src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts
       src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts
       src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.spec.ts
       src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.ts
       src/pybind/mgr/dashboard/services/rgw_client.py
       src/pybind/mgr/dashboard/tests/test_rgw_client.py
   - src/pybind/mgr/dashboard/tools.py: added method included in a feature not to be backported.
   - src/pybind/mgr/dashboard/module.py: fixed linting issue.

4 years agorgw: Use correct bucket info when put or get large object with swift. 40106/head
zhangzhiming [Mon, 15 Mar 2021 01:42:33 +0000 (09:42 +0800)]
rgw: Use correct bucket info when put or get large object with swift.

Fixes: https://tracker.ceph.com/issues/49791
Signed-off-by: zhiming zhang <zhangzhm1@chinatelecom.cn>
Signed-off-by: yupeng chen <chenyupeng@chinatelecom.cn>
(cherry picked from commit bdd0635fbb0632c881e8f38c563f88d0957688bf)

 Conflicts:
src/rgw/rgw_op.cc
src/rgw/rgw_rest_swift.cc

-In octopus:
- RGWRados::Object op_target(store->getRados(), ...)
-In nautilus:
- RGWRados::Object op_target(store, ...)

4 years agoMerge pull request #41137 from tchaikov/nautilus-50456
Yuri Weinstein [Mon, 17 May 2021 15:21:11 +0000 (08:21 -0700)]
Merge pull request #41137 from tchaikov/nautilus-50456

nautilus: bind on loopback address if no other addresses are available

4 years agoMerge pull request #41318 from neha-ojha/wip-50692-nautilus
Yuri Weinstein [Fri, 14 May 2021 17:48:39 +0000 (10:48 -0700)]
Merge pull request #41318 from neha-ojha/wip-50692-nautilus

nautilus: pybind/rados: should pass "name" to cstr()

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #39818 from ceph/wip-yuriw-client-upgrade-nautilus-pacific-nautilus
Yuri Weinstein [Fri, 14 May 2021 17:06:36 +0000 (10:06 -0700)]
Merge pull request #39818 from ceph/wip-yuriw-client-upgrade-nautilus-pacific-nautilus

nautilus: qa/tests: added client-upgrade-nautilus-pacific tests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge remote-tracking branch 'origin/nautilus-saved' into nautilus
Sage Weil [Fri, 14 May 2021 14:15:48 +0000 (10:15 -0400)]
Merge remote-tracking branch 'origin/nautilus-saved' into nautilus

4 years ago14.2.21 v14.2.21
Jenkins Build Slave User [Thu, 13 May 2021 17:23:08 +0000 (17:23 +0000)]
14.2.21

4 years agomgr/dashboard: fix cookie injection issue
Ernesto Puerta [Thu, 13 May 2021 15:43:56 +0000 (17:43 +0200)]
mgr/dashboard: fix cookie injection issue

Fixes: CVE-2021-3509
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit b39922818bc57cde1b016e9ad41908b18063b93b)

 Conflicts:
src/pybind/mgr/dashboard/controllers/docs.py
        - Remove allow_empty_body and _with_token method

4 years agoUpdate qa/suites/upgrade-clients/client-upgrade-nautilus-pacific/nautilus-client... 39818/head
Yuri Weinstein [Thu, 25 Mar 2021 22:32:04 +0000 (15:32 -0700)]
Update qa/suites/upgrade-clients/client-upgrade-nautilus-pacific/nautilus-client-x/rbd/1-install/nautilus-client-x.yaml

Co-authored-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agomgr/dashboard: fix base-href: revert it to previous approach
Avan Thakkar [Fri, 7 May 2021 09:38:11 +0000 (15:08 +0530)]
mgr/dashboard: fix base-href: revert it to previous approach

Fixes: https://tracker.ceph.com/issues/50684
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit b6f92922f5c80223fd288d98ce85405a650c0135)

 Conflicts:

src/pybind/mgr/dashboard/frontend/src/app/app.module.ts
      - Adopt the changes coming from master for this file.

(cherry picked from commit 3802683035532bc15d95e16232e69e0fa96c474f)

4 years agocommon/pick_addr: use grading machinery to refactor pick_address() 41137/head
Kefu Chai [Thu, 22 Apr 2021 17:03:54 +0000 (01:03 +0800)]
common/pick_addr: use grading machinery to refactor pick_address()

as picking iface on the same NUMA node is not a hard requirement, the
grading machinery is a nice fit for this purpose.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 329d51c68ec6bf1864aa9430a62d65a93362a1b9)

4 years agocommon/pick_address: prefer non-loopback addresses
Kefu Chai [Wed, 21 Apr 2021 11:50:48 +0000 (19:50 +0800)]
common/pick_address: prefer non-loopback addresses

instead of filtering out loopback ifaces, check for loopback addresses,
and prefer non-loopback addresses over loopback addresses.

before this change, iface named "lo" is filtered out by default,
and "lo" is allowed if `ms_bind_exclude_lo_iface` is false.

after this change, iface with address out of 127/8 is prefered.
the iface marked down is not considered.

the option of "ms_bind_exclude_lo_iface" is removed. the tests are
updated accordingly.

Fixes: https://tracker.ceph.com/issues/50456
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a9b9bcd53215a07608a28ac2c8e4a8c8b8e80e66)

Conflicts:
src/common/options/global.yaml.in
src/common/pick_address.cc: trivial resolution

4 years agocommon/pick_address: Allow binding on loopback iface
Kefu Chai [Fri, 26 Mar 2021 12:03:09 +0000 (20:03 +0800)]
common/pick_address: Allow binding on loopback iface

in 6147c0917157efd2d35610e759685656a4989abb, "lo" is also skipped when
daemon is trying to find an address to bind. but that change reverts the
fix of 201b59204374ebdab91bb554b986577a97b19c36, to address the problem.

an option named "ms_bind_exclude_lo_iface" is added, it defaults to
"true". but it can be changed to false to allow daemon to bind on "lo".

Fixes: https://tracker.ceph.com/issues/50012
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7f01d36a2ca0576f1ff103ae3fa7c3662e93b722)

4 years agocommon/pick_address: document find_ip_in_subnet_list()
Kefu Chai [Fri, 26 Mar 2021 07:36:21 +0000 (15:36 +0800)]
common/pick_address: document find_ip_in_subnet_list()

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b106ec0bbf7fa726062989114f461f2d0a1f93a9)

4 years agocommon/pick_address: pass string by reference
Kefu Chai [Sat, 27 Mar 2021 02:03:02 +0000 (10:03 +0800)]
common/pick_address: pass string by reference

to silence warnings from clang-tidy.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 6d0ed81f796209f27b96811f9140b7fff16a7940)

4 years agocommon/pick_addr: refactor pick_address.cc and ipaddr.cc
Kefu Chai [Fri, 26 Mar 2021 10:23:35 +0000 (18:23 +0800)]
common/pick_addr: refactor pick_address.cc and ipaddr.cc

* do not replicate the same logic in IPv4 and IPv6 paths
* use helpers returning bool for filtering the candidate addresses
  for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 52785d5a3607b2f2ee6d41069d18a154b3eb5d45)

Conflicts:
src/common/ipaddr.cc
src/common/pick_address.cc: trivial resolution

4 years agocommon/pick_address: use scope_guard for freeifaddrs()
Kefu Chai [Fri, 26 Mar 2021 10:34:32 +0000 (18:34 +0800)]
common/pick_address: use scope_guard for freeifaddrs()

for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit c3c110b5763ac420c4b88f8a545c1c87a71ce59a)

4 years agocommon/pick_address: fail if cannot bind with specified network family
Kefu Chai [Mon, 19 Oct 2020 13:50:45 +0000 (21:50 +0800)]
common/pick_address: fail if cannot bind with specified network family

this change partially reverts 9f75dfbf364f5140b3f291e0a2c6769bc3d8cbac

we should not proceed against user's will if dual stack is specified but
only one network for a network family can be found. the right fix is
have better error message and documentation, not to tolerate the
failure.

Fixes: https://tracker.ceph.com/issues/46845
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d752acafa0d99c3d7cacfaaaf3ae51770e251aff)

4 years agopick_address: Warn and continue when you find at least 1 IPv4 or IPv6 address
Matthew Oliver [Mon, 10 Aug 2020 04:46:21 +0000 (04:46 +0000)]
pick_address: Warn and continue when you find at least 1 IPv4 or IPv6 address

Currently if specify a single public or cluster network, yet have both
`ms bind ipv4` and `ms bind ipv6` set daemons crash when they can't find
both IPs from the same network:

    unable to find any IPv4 address in networks '2001:db8:11d::/120' interfaces ''

And rightly so, of course it can't find an IPv4 network in an IPv6
network.
This patch, adds a new helper method, networks_address_family_coverage,
that takes the list of networks and returns a bitmap of address families
supported.
We then check to see if we have enough networks defined and if you don't
it'll warn and then continue.

Also update the network-config-ref to mention having to define both
address family addresses for cluster and or public networks.

As well as a warning about `ms bind ipv4` being enabled by default which
is easy to miss, there by enabling dual stack when you may only be
expect single stack IPv6.

Thee is also a drive by to fix a `note` that wan't being displayed due
to missing RST syntax.

Signed-off-by: Matthew Oliver <moliver@suse.com>
Fixes: https://tracker.ceph.com/issues/46845
Fixes: https://tracker.ceph.com/issues/39711
(cherry picked from commit 9f75dfbf364f5140b3f291e0a2c6769bc3d8cbac)

4 years agopybind/rados: should pass "name" to cstr() 41318/head
Kefu Chai [Fri, 22 Mar 2019 06:25:12 +0000 (14:25 +0800)]
pybind/rados: should pass "name" to cstr()

it's a regression introduced by 6cb23f9c

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit dba8326bdf5c9cda08d5bc70640371220bb18073)

4 years agoMerge pull request #41227 from ceph/wip-yuriw-nautilus-p2p nautilus-saved
Yuri Weinstein [Wed, 12 May 2021 19:27:01 +0000 (12:27 -0700)]
Merge pull request #41227 from ceph/wip-yuriw-nautilus-p2p

nautilus: qa/tests: advanced nautilus initial version to 14.2.20

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #41156 from smithfarm/wip-50366-nautilus
Yuri Weinstein [Wed, 12 May 2021 17:00:42 +0000 (10:00 -0700)]
Merge pull request #41156 from smithfarm/wip-50366-nautilus

nautilus: rgw: during reshard lock contention, adjust logging

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agotest: add test case for MDS privated inos accessing
Xiubo Li [Wed, 28 Apr 2021 01:32:24 +0000 (09:32 +0800)]
test: add test case for MDS privated inos accessing

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

Conflicts:
src/test/libcephfs/test.cc
- octopus version of this file is missing lots of tests that were added to
  master post-octopus

4 years agomds: make the lost+found dir accessible from clients
Xiubo Li [Mon, 19 Apr 2021 02:34:02 +0000 (10:34 +0800)]
mds: make the lost+found dir accessible from clients

Inode number 0x4 is reserved for the lost+found dir, and the apps
or recovery apps need to access it.

At the same time the 0x3 is reserved for the global snaprealm, which
will also be lookup by the clients when looking up the snaprealm inodes.

Here will make all the inode less than 100 accessible by clients.

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

Conflicts:
src/mds/Server.cc
- code being changed does not exist in octopus: change omitted
        src/mds/mdstypes.h
- trivial resolution

4 years agomds: move the inos 1,2 and 3 macros to ceph_fs.h
Xiubo Li [Tue, 20 Apr 2021 01:08:20 +0000 (09:08 +0800)]
mds: move the inos 1,2 and 3 macros to ceph_fs.h

For inos 1 and 2 there has two places are defining them, to make
sure we won't miss any one of them, let's define them in only one
header file.

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

Conflicts:
src/client/Inode.h
src/mds/CInode.h
src/mds/MDCache.cc
src/mds/Server.cc
        src/mds/SnapServer.h
- change MDS_INO_ROOT to CEPH_INO_ROOT in src/mds/SnapServer.h (nautilus-only)

4 years agomgr/progress: ensure progress stays between [0,1] 41310/head
Dan van der Ster [Thu, 29 Apr 2021 23:06:17 +0000 (01:06 +0200)]
mgr/progress: ensure progress stays between [0,1]

If _original_pg_count is 0 then progress can be negative.

Fixes: https://tracker.ceph.com/issues/50591
Related-to: https://tracker.ceph.com/issues/50587
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit 20990a94598d0249745e2ec25c9197d842119d92)

4 years agoclient: don't allow access to MDS-private inodes
Xiubo Li [Wed, 7 Apr 2021 11:37:26 +0000 (19:37 +0800)]
client: don't allow access to MDS-private inodes

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

Conflicts:
src/client/Client.cc
- nautilus wants ESTALE instead of CEPHFS_ESTALE

4 years agoclient: add testcase for ceph_ll_lookup_vino
Jeff Layton [Wed, 3 Feb 2021 15:24:16 +0000 (10:24 -0500)]
client: add testcase for ceph_ll_lookup_vino

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit a956c7986fd43da851918b87c71524f9a2bb1162)

Conflicts:
src/test/libcephfs/test.cc
- octopus is missing a bunch of tests, but this doesn't matter because the
  commit being cherry-picked did not touch those

4 years agoclient: add ceph_ll_lookup_vino
Jeff Layton [Mon, 1 Feb 2021 16:04:07 +0000 (11:04 -0500)]
client: add ceph_ll_lookup_vino

Add a new API function for looking up an inode via a vinodeno_t. This
should give ganesha a way to reliably look up snapshot inodes.

We do need to add some special handling for CEPH_SNAPDIRs. If we're
looking for one, then find the non-snapped parent, and then call
open_snapdir to get the snapdir inode.

Also, have the function check the local cache before calling the MDS
to look up an inode.

Fixes: https://tracker.ceph.com/issues/48991
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 70622079c2ec55222a139fa5042902e0b19bd839)

Conflicts:
src/client/Client.cc

4 years agoclient: make _lookup_ino take a vinodeno_t
Jeff Layton [Mon, 1 Feb 2021 15:41:14 +0000 (10:41 -0500)]
client: make _lookup_ino take a vinodeno_t

Currently, it always leaves the snapid as 0. Rename it to
_lookup_vino and make it fill the snapid from the vinodeno_t
instead, but only when it's a "real" snapid.

Change the existing callers to pass in a vinodeno_t with the
snapid set to CEPH_NOSNAP.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 0e0bebd22dc1abea3f0132debc0b524a01fadf63)

Conflicts:
src/client/Client.cc

4 years agoclient: stop doing unnecessary work in ll_lookup_inode
Jeff Layton [Wed, 3 Feb 2021 13:12:41 +0000 (08:12 -0500)]
client: stop doing unnecessary work in ll_lookup_inode

It's not clear to me why we're looking up the parent and name of the
inode in ll_lookup_inode, as we don't actually do anything with them.
Just return once we get an inode reference.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 2b0b895e888c0f3dece3c1e717ca6e1552e588d8)

4 years agoqa/tests: resolved comment - changed to 14.2.20 41227/head
Yuri Weinstein [Tue, 11 May 2021 19:48:16 +0000 (12:48 -0700)]
qa/tests: resolved comment  - changed to 14.2.20

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>