]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agotest/rbd_mirror: drop redundant MockJournaler instances 44753/head
Ilya Dryomov [Fri, 21 Jan 2022 13:26:31 +0000 (14:26 +0100)]
test/rbd_mirror: drop redundant MockJournaler instances

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

3 years agorbd-mirror: fix races in snapshot-based mirroring deletion propagation
Ilya Dryomov [Fri, 21 Jan 2022 12:41:46 +0000 (13:41 +0100)]
rbd-mirror: fix races in snapshot-based mirroring deletion propagation

When remote image is deleted, rbd-mirror can encounter three cases:

  1) no remote image id
  2) no remote mirror metadata
  3) MIRROR_IMAGE_STATE_DISABLING in remote mirror metadata

Commit d4c66ac5c615 ("rbd-mirror: fix issue with snapshot-based
mirroring deletion propagation") fixed case 1.  Cases 2 and 3 remained
broken because for both of them finalize_snapshot_state_builder() would
populate not only remote_mirror_peer_uuid but also remote_image_id,
thus disabling ENOLINK logic in handle_prepare_remote_image() and
handle_bootstrap().  Commit ff60aec2d9ef ("rbd-mirror: fix bootstrap
sequence while the image is removed") touched on case 3, but it made
a difference only for journal-based mirroring.

Stop calling finalize_snapshot_state_builder() on errors.  Instead,
align with journal-based mirroring by filling remote_mirror_peer_uuid
together with remote_mirror_uuid.

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

3 years agorbd-mirror: don't default replay_requires_remote_image() implementation
Ilya Dryomov [Fri, 21 Jan 2022 12:41:46 +0000 (13:41 +0100)]
rbd-mirror: don't default replay_requires_remote_image() implementation

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

3 years agorbd-mirror: untangle StateBuilder::is_linked() overloads
Ilya Dryomov [Fri, 21 Jan 2022 12:41:46 +0000 (13:41 +0100)]
rbd-mirror: untangle StateBuilder::is_linked() overloads

Make it clear that the local image non-primariness is asserted
independent of the mode; avoid the default implementation being
overridden but still relied on by both modes.

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

3 years agorbd-mirror: drop redundant initialization of StateBuilder members
Ilya Dryomov [Thu, 20 Jan 2022 15:25:46 +0000 (16:25 +0100)]
rbd-mirror: drop redundant initialization of StateBuilder members

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

3 years agoMerge pull request #44689 from MrFreezeex/wip-53937-octopus
Yuri Weinstein [Fri, 21 Jan 2022 22:35:12 +0000 (14:35 -0800)]
Merge pull request #44689 from MrFreezeex/wip-53937-octopus

octopus: cls/journal: skip disconnected clients when calculating min_commit_position

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
3 years agoMerge pull request #43806 from sunnyku/wip-53027-octopus
Yuri Weinstein [Fri, 21 Jan 2022 22:33:58 +0000 (14:33 -0800)]
Merge pull request #43806 from sunnyku/wip-53027-octopus

octopus: librbd/object_map: rbd diff between two snapshots lists entire image content

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
3 years agoMerge pull request #44320 from guits/wip-53618-octopus
Guillaume Abrioux [Fri, 21 Jan 2022 12:51:09 +0000 (13:51 +0100)]
Merge pull request #44320 from guits/wip-53618-octopus

octopus: ceph-volume: make it possible to skip needs_root()

3 years agoMerge pull request #44673 from idryomov/wip-diff-iterate-parent-tests-octopus
Yuri Weinstein [Thu, 20 Jan 2022 23:34:17 +0000 (15:34 -0800)]
Merge pull request #44673 from idryomov/wip-diff-iterate-parent-tests-octopus

octopus: backport diff-iterate include_parent tests

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoMerge pull request #44595 from idryomov/wip-xfstests-qemu-cert-octopus
Yuri Weinstein [Thu, 20 Jan 2022 21:01:33 +0000 (13:01 -0800)]
Merge pull request #44595 from idryomov/wip-xfstests-qemu-cert-octopus

octopus: qa/run_xfstests_qemu.sh: stop reporting success without actually running any tests

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoMerge pull request #44548 from cfsnyder/wip-53840-octopus
Yuri Weinstein [Thu, 20 Jan 2022 21:01:04 +0000 (13:01 -0800)]
Merge pull request #44548 from cfsnyder/wip-53840-octopus

octopus: librbd: diff-iterate reports incorrect offsets in fast-diff mode

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
3 years agoMerge pull request #43663 from MrFreezeex/wip-53031-octopus
Yuri Weinstein [Thu, 20 Jan 2022 20:59:32 +0000 (12:59 -0800)]
Merge pull request #43663 from MrFreezeex/wip-53031-octopus

octopus: rbd-mirror: fix mirror image removal

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
3 years agocls/journal: skip disconnected clients when finding min_commit_position 44689/head
Mykola Golub [Fri, 14 Jan 2022 18:21:29 +0000 (18:21 +0000)]
cls/journal: skip disconnected clients when finding min_commit_position

When a new journal client is registered, all already registered
clients are checked, and a client with min position is selected
as a position for the new client. Thus we may expect that
starting from the registered position all journal entries will be
available (not trimmed) for the new client.

But when looking for a min commit position, the client_register
function did not take into account that a registered client might
be in disconnected state, and in that case the journal entries
might be trimmed for this client.

Fixes: https://tracker.ceph.com/issues/53888
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 078d72e5e6cfa41f809045ff03971ac8acf0d31e)

3 years agotest/librbd: make diff-iterate clone tests exercise fast-diff mode 44673/head
Ilya Dryomov [Fri, 7 Jan 2022 12:31:08 +0000 (13:31 +0100)]
test/librbd: make diff-iterate clone tests exercise fast-diff mode

The fast-diff feature wasn't propagated to the clone so these tests
were exercising the slow list_snaps path no matter what RBD_FEATURES
value was supplied to ceph_test_librbd.

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

Conflicts:
src/test/librbd/test_librbd.cc [ commit d1c82d55827e ("librbd:
  enable image cache after getting exclusive lock") not in
  octopus ]

3 years agolibrbd: restore diff-iterate include_parent functionality in fast-diff mode
Ilya Dryomov [Wed, 5 Jan 2022 19:24:40 +0000 (20:24 +0100)]
librbd: restore diff-iterate include_parent functionality in fast-diff mode

Commit 4429ed4f3f4c ("librbd: switch diff iterate API to use new snaps
list dispatch methods") removed the recursive execute() call.  The new
list_snaps method does indeed handle parent diffs internally but it is
not used in fast-diff mode.  Nothing changed there -- we still need to
load the parent object map, calculate parent object_diff_state, etc.

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

Conflicts:
src/librbd/api/DiffIterate.cc [ drop all changes, bring in
  just the new test ]

3 years agolibrbd: diff-iterate reports incorrect offsets if whole_object=true 44548/head
Ilya Dryomov [Wed, 19 Jan 2022 20:08:01 +0000 (21:08 +0100)]
librbd: diff-iterate reports incorrect offsets if whole_object=true

It turns out that in octopus both fast-diff and list-snaps (slow)
modes were broken.  As long as whole_object=true, the same incorrect
offset was reported in both modes.  The fast-diff mode is fixed in
in previous commit.

This is an octopus-only patch for list-snaps mode.  In pacific this
issue was addressed with 4429ed4f3f4c ("librbd: switch diff iterate
API to use new snaps list dispatch methods").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
3 years agoMerge pull request #44373 from rhcs-dashboard/cypress-octopus
Ernesto Puerta [Tue, 18 Jan 2022 19:59:00 +0000 (20:59 +0100)]
Merge pull request #44373 from rhcs-dashboard/cypress-octopus

octopus: mgr/dashboard: upgrade Cypress to the latest stable version

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
3 years agomgr/dashboard: upgrade Cypress to the latest stable version 44373/head
Alfonso Martínez [Tue, 23 Nov 2021 14:17:54 +0000 (15:17 +0100)]
mgr/dashboard: upgrade Cypress to the latest stable version

- Remove unneeded dependency that was causing UI performance issues: zone.js
- Ignore 'ResizeObserver loop limit exceeded' error.
- run-frontend-e2e-tests.sh refactoring: create rgw dashboard user through
  'ceph dashboard set-rgw-credentials' and use it on rgw buckets' tests.

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

 Conflicts:
src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/buckets.e2e-spec.ts
   Reject the current changes
        src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/buckets.po.ts
   Reject the current changes
src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.po.ts
   Deleted this file since its not in octopus
src/pybind/mgr/dashboard/frontend/package-lock.json
   Generated new file
src/pybind/mgr/dashboard/frontend/package.json
   Kept zone.js and changed the cypress version to 9.0.0
src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh
   Accept the current change

3 years agoqa/tasks/qemu: get the new Let's Encrypt root certificate 44595/head
Ilya Dryomov [Tue, 11 Jan 2022 20:26:12 +0000 (21:26 +0100)]
qa/tasks/qemu: get the new Let's Encrypt root certificate

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

3 years agoqa/run_xfstests_qemu.sh: harden against wget failures
Ilya Dryomov [Tue, 11 Jan 2022 12:13:01 +0000 (13:13 +0100)]
qa/run_xfstests_qemu.sh: harden against wget failures

If wget fails (e.g. due to a certificate issue), it still creates
an empty file.  Then this file is marked executable, ./"${SCRIPT}"
immediately returns 0 and run_xfstests_qemu.sh exits successfully
without running a single xfstest.

This started on Sep 30, 2021 with the expiration of Let's Encrypt
root certificate -- all qemu jobs with "test: qa/run_xfstests_qemu.sh"
just booted the VM for a couple of seconds and reported success.

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

3 years agoMerge pull request #43822 from trociny/wip-48925-octopus
Yuri Weinstein [Wed, 12 Jan 2022 21:02:49 +0000 (13:02 -0800)]
Merge pull request #43822 from trociny/wip-48925-octopus

octopus: cephadm: Fix iscsi client caps (allow mgr <service status> calls)

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
3 years agoMerge pull request #43788 from sebastian-philipp/backport-43039
Yuri Weinstein [Wed, 12 Jan 2022 21:02:09 +0000 (13:02 -0800)]
Merge pull request #43788 from sebastian-philipp/backport-43039

octopus: qa/distros: Remove stale kubic distros

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Adam King adking@redhat.com
3 years agorbd-mirror: make RemoveImmediateUpdate test synchronous 43663/head
Arthur Outhenin-Chalandre [Tue, 23 Nov 2021 14:25:46 +0000 (15:25 +0100)]
rbd-mirror: make RemoveImmediateUpdate test synchronous

Try fixing sporadic failure linked in the tracker in
TestMockMirrorStatusUpdater.RemoveImmediateUpdate by making it
synchronous.

Fixes: https://tracker.ceph.com/issues/53375
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 9385acfc25a2bd0e214b4191109b7ed84f5826b4)

3 years agorbd-mirror: remove image_map next_state if sets to the same state
Arthur Outhenin-Chalandre [Fri, 6 Aug 2021 13:54:38 +0000 (15:54 +0200)]
rbd-mirror: remove image_map next_state if sets to the same state

In some cases, set_state is called with DISSOCIATING, then ASSOCIATING
and DISSOCIATING again. In this case the state DISSOCIATING is
processed to remove the image and then schedule the next action which is
associating.

To fix this case, this commit removes the next_state if the state is
sets to the same state.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit b664a95889b35d0d3afbd8428e3af4976d7f81eb)

3 years agorbd-mirror: handle disabling/creating image in PrepareLocalImageRequest
Arthur Outhenin-Chalandre [Thu, 29 Jul 2021 09:54:45 +0000 (11:54 +0200)]
rbd-mirror: handle disabling/creating image in PrepareLocalImageRequest

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 965bc4150eafc8e3bbe69f63beea9c7fbb20ceb6)
Conflicts:
        src/tools/rbd_mirror/image_replayer/PrepareLocalImageRequest.cc
- Trivial conflict resolution; s/lirbd::asio:://

3 years agorbd-mirror: fix bootstrap sequence while the image is removed
Arthur Outhenin-Chalandre [Wed, 28 Jul 2021 12:14:47 +0000 (14:14 +0200)]
rbd-mirror: fix bootstrap sequence while the image is removed

If the image is being removed the PrepareRemoteImageRequest was
returning the same error if the image was disabled or non primary which
doesn't allow the BootstrapRequest to have the correct error handling.

This commit fix this behavior by considering that the remote image is
already deleted if the image is in disabling state.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit ff60aec2d9efa1842383ba0a5c3bd6b5a29389c6)

3 years agorbd-mirror: remove image_mapped condition to remove image_map
Arthur Outhenin-Chalandre [Thu, 22 Jul 2021 16:53:16 +0000 (18:53 +0200)]
rbd-mirror: remove image_mapped condition to remove image_map

In some split-brain scenario the image is removed while the image_mapped
is false. This prevents the removal of image_map in OMAP and thus the
entry will not be removed until the daemon is restarted.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 35398a5e17dc5a536ccd63417c937f2efe742654)

3 years agocls/rbd: prevent image_status when mirror image is not created
Arthur Outhenin-Chalandre [Thu, 22 Jul 2021 14:37:47 +0000 (16:37 +0200)]
cls/rbd: prevent image_status when mirror image is not created

This prevent image_status_set to succeed when there is no mirror image
yet. This solves some stale entries that were not removed in
rbd-mirror and prevent to add entries that would not be visible from the
rbd cli.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 416e25794af0252ec45b35c897c8cf2e91aca383)

3 years agorbd-mirror: add image_map cleanup in LoadRequest
Arthur Outhenin-Chalandre [Tue, 13 Jul 2021 12:19:49 +0000 (14:19 +0200)]
rbd-mirror: add image_map cleanup in LoadRequest

In the LoadRequest in the ImageMap class add initial cleanup to remove
stale entries. To cleanup the LoadRequest will query the mirror image
list and remove all the image_map that are notin the list.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit e135403c736295b63fe1c8a861af40de302b8b57)

3 years agoqa/rbd-mirror: add OMAP cleanup checks
Arthur Outhenin-Chalandre [Fri, 11 Jun 2021 07:29:59 +0000 (09:29 +0200)]
qa/rbd-mirror: add OMAP cleanup checks

This make sure that all images are deleted in the existing qa scripts
and checks if all rbd-mirror metadata in OMAP are correctly deleted.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 4db66da51211504ba0a2353180ae084ba1ab3fcf)

3 years agorbd-mirror: remove mirror image at shut_down when there is no images
Arthur Outhenin-Chalandre [Fri, 25 Jun 2021 08:15:23 +0000 (10:15 +0200)]
rbd-mirror: remove mirror image at shut_down when there is no images

Some cases makes the ImageReplayer to be eternally restarted if there is
no local and remote images.

If both images are absent and that the local image id exists, the
ImageReplayer shutdown will request a mirror image removal.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 0c1c7fb886fcaaff5f00937cf62cf69feb8d4deb)

 Conflicts:
src/tools/rbd_mirror/image_deleter/TrashMoveRequest.cc

Added a condition to handle the case where m_image_ctx is null on
close_image and handle_close_image in the TrashMoveRequest. This fix is
not needed in newer versions of Ceph as ImageCtx no longer needs to be
destroyed explicitely with a destroy method after Octopus.

3 years agorbd-mirror: add mirror status removal on ImageReplayer shutdown
Arthur Outhenin-Chalandre [Mon, 7 Jun 2021 12:58:03 +0000 (14:58 +0200)]
rbd-mirror: add mirror status removal on ImageReplayer shutdown

In a scenario where you have rbd-mirror daemons on both clusters. The
rbd-mirror daemon on the primary site will not properly cleanup his
status on image removal.

This commit add a path for direct removal at the shut_down of the
ImageReplayer to properly cleanup the metadata.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit a538c5d279c90397d375668baddd65776d2462b0)

Conflicts:
        src/test/rbd_mirror/test_mock_MirrorStatusUpdater.cc
- Trivial conflict resolution; io_ctx exec has 1 less argument

3 years agocls/rbd: add mirror_image_status_remove on client
Arthur Outhenin-Chalandre [Mon, 7 Jun 2021 10:53:48 +0000 (12:53 +0200)]
cls/rbd: add mirror_image_status_remove on client

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 0e147f779d73d0688c2b89428db6012ed1560f20)

 Conflicts:
src/cls/rbd/cls_rbd_client.h
- Trivial conflict resolution

3 years agorbd-mirror: fix mirror image removal
Arthur Outhenin-Chalandre [Fri, 4 Jun 2021 16:29:37 +0000 (18:29 +0200)]
rbd-mirror: fix mirror image removal

Invoke ImageRemoveRequest instead of calling directly
mirror_image_remove so that the MirrroringWatcher can pick up local
image deletion.

Fixes: https://tracker.ceph.com/issues/51031
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 34082b7ee48a33e566348395395858e1e0db3013)

 Conflicts:
src/test/rbd_mirror/image_deleter/test_mock_TrashMoveRequest.cc
- Trivial conflict resolution

3 years agolibrbd: diff-iterate reports incorrect offsets in fast-diff mode
Ilya Dryomov [Tue, 4 Jan 2022 19:38:35 +0000 (20:38 +0100)]
librbd: diff-iterate reports incorrect offsets in fast-diff mode

If rbd_diff_iterate2() is called on an image offset that doesn't
correspond to an object boundary, the callback is invoked with an
incorrect image offset.  For example, assuming a fully allocated
image, a diff request for 806354944~57344 results in offs=807403520,
len=57344, exists=true invocation, which is ahead by 1048576 bytes.
This occurs only in fast-diff mode, for a diff request on an image
with the fast-diff feature disabled or if whole_object parameter is
set to false the invocation is correct.

This bug goes back to the introduction of fast-diff mode in commit
6d5b969d4206 ("librbd: add diff_iterate2 to API").

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

Conflicts:
src/librbd/api/DiffIterate.cc

Cherry-pick notes:
- Octopus still has explicit iterator syntax in for loop for extents

3 years agoMerge pull request #43785 from lxbsz/wip-51415
Yuri Weinstein [Fri, 7 Jan 2022 16:48:50 +0000 (08:48 -0800)]
Merge pull request #43785 from lxbsz/wip-51415

Octopus: mds: just respawn mds daemon when osd op requests timeout

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #44271 from nmshelke/wip-53331-octopus
Yuri Weinstein [Fri, 7 Jan 2022 16:22:23 +0000 (08:22 -0800)]
Merge pull request #44271 from nmshelke/wip-53331-octopus

octopus: doc: prerequisites fix for cephFS mount

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #44270 from vshankar/tr-53444
Yuri Weinstein [Fri, 7 Jan 2022 16:21:48 +0000 (08:21 -0800)]
Merge pull request #44270 from vshankar/tr-53444

octopus: qa: account for split of the kclient "metrics" debugfs file

Reviewed-by: Xiubo Li <xiubli@redhat.com>
3 years agoMerge pull request #44169 from cfsnyder/wip-50850-octopus
Yuri Weinstein [Fri, 7 Jan 2022 16:20:28 +0000 (08:20 -0800)]
Merge pull request #44169 from cfsnyder/wip-50850-octopus

octopus: mds: PurgeQueue.cc fix for 32bit compilation

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #43842 from vshankar/wip-52953
Yuri Weinstein [Fri, 7 Jan 2022 16:19:42 +0000 (08:19 -0800)]
Merge pull request #43842 from vshankar/wip-52953

octopus: mds: skip journaling blocklisted clients when in `replay` state

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #43816 from lxbsz/wip-53163
Yuri Weinstein [Fri, 7 Jan 2022 16:18:56 +0000 (08:18 -0800)]
Merge pull request #43816 from lxbsz/wip-53163

octopus: mds: do not trim stray dentries during opening the root

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #43252 from kotreshhr/wip-52632-octopus
Yuri Weinstein [Fri, 7 Jan 2022 16:16:59 +0000 (08:16 -0800)]
Merge pull request #43252 from kotreshhr/wip-52632-octopus

octopus: mds: Add new flag to MClientSession

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #41295 from kotreshhr/wip-50626-octopus
Yuri Weinstein [Fri, 7 Jan 2022 16:16:27 +0000 (08:16 -0800)]
Merge pull request #41295 from kotreshhr/wip-50626-octopus

octopus: cephfs: client: Fix executeable access check for the root user

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #44159 from callithea/wip-53094-octopus
Ernesto Puerta [Tue, 21 Dec 2021 17:00:15 +0000 (18:00 +0100)]
Merge pull request #44159 from callithea/wip-53094-octopus

octopus: mgr/dashboard: all pyfakefs must be pinned on same version

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: rishabh-d-dave <NOT@FOUND>
3 years agoMerge pull request #43965 from cfsnyder/wip-51485-octopus
Yuri Weinstein [Thu, 16 Dec 2021 16:26:21 +0000 (08:26 -0800)]
Merge pull request #43965 from cfsnyder/wip-51485-octopus

octopus: pybind/mgr/balancer: define Plan.{dump,show}()

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agopybind/mgr/balancer: define Plan.{dump,show}() 43965/head
Kefu Chai [Thu, 4 Feb 2021 13:15:27 +0000 (21:15 +0800)]
pybind/mgr/balancer: define Plan.{dump,show}()

as they are called by the commands

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

Conflicts:
src/pybind/mgr/balancer/module.py

Cherry-pick notes:
- Conflicts due to missing type annotations in Octopus

3 years agoceph-volume: make it possible to skip needs_root() 44320/head
Guillaume Abrioux [Tue, 7 Dec 2021 14:18:10 +0000 (15:18 +0100)]
ceph-volume: make it possible to skip needs_root()

Add the possibility to skip the `needs_root()` decorator.
See linked tracker for details.

Fixes: https://tracker.ceph.com/issues/53511
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 068a1d2a300bc21e9aa08142c4195970ef480e41)

3 years agoMerge pull request #43967 from cfsnyder/wip-53224-octopus
Yuri Weinstein [Tue, 14 Dec 2021 16:05:33 +0000 (08:05 -0800)]
Merge pull request #43967 from cfsnyder/wip-53224-octopus

octopus: qa/rgw: bump tempest version to resolve dependency issue

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #43963 from cfsnyder/wip-53099-octopus
Yuri Weinstein [Tue, 14 Dec 2021 16:04:32 +0000 (08:04 -0800)]
Merge pull request #43963 from cfsnyder/wip-53099-octopus

octopus: qa/rgw: Fix vault token file access.case

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #43953 from guits/wip-53279-octopus
Guillaume Abrioux [Tue, 14 Dec 2021 12:35:10 +0000 (13:35 +0100)]
Merge pull request #43953 from guits/wip-53279-octopus

octopus: cephadm/ceph-volume: do not use lvm binary in containers

3 years agoMerge pull request #44177 from cfsnyder/wip-52451-octopus
Kefu Chai [Tue, 14 Dec 2021 02:32:01 +0000 (10:32 +0800)]
Merge pull request #44177 from cfsnyder/wip-52451-octopus

octopus: rpm, debian: move smartmontools and nvme-cli to ceph-base

Reviewed-by: Yaarit Hatuka <yaarit@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
3 years agoMerge pull request #43947 from guits/wip-53277-octopus
Guillaume Abrioux [Mon, 13 Dec 2021 08:54:53 +0000 (09:54 +0100)]
Merge pull request #43947 from guits/wip-53277-octopus

octopus: ceph-volume: fix bug with miscalculation of required db/wal slot size for VGs with multiple PVs

3 years agoceph-volume: remove --root param from nsenter cmd 43953/head
Guillaume Abrioux [Wed, 24 Nov 2021 08:07:46 +0000 (09:07 +0100)]
ceph-volume: remove --root param from nsenter cmd

This is redundant and makes nsenter throw messages like following:
```
  Failed to find sysfs mount point
  dev/block/11:0/holders/: opendir failed: Not a directory
  dev/block/252:0/holders/: opendir failed: Not a directory
  dev/block/253:0/holders/: opendir failed: Not a directory
  dev/block/252:1/holders/: opendir failed: Not a directory
  dev/block/253:1/holders/: opendir failed: Not a directory
  dev/block/252:2/holders/: opendir failed: Not a directory
  dev/block/253:2/holders/: opendir failed: Not a directory
  dev/block/252:3/holders/: opendir failed: Not a directory
  dev/block/253:3/holders/: opendir failed: Not a directory
  dev/block/252:16/holders/: opendir failed: Not a directory
  dev/block/252:32/holders/: opendir failed: Not a directory
  dev/block/252:48/holders/: opendir failed: Not a directory
  dev/block/252:64/holders/: opendir failed: Not a directory
  ```

Fixes: https://tracker.ceph.com/issues/52926
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e4667e81301295f4c81328505e4376d2aef66fb2)

3 years agocephadm: mount rootfs in osd containers
Guillaume Abrioux [Thu, 14 Oct 2021 07:46:36 +0000 (09:46 +0200)]
cephadm: mount rootfs in osd containers

See ceph-volume tracker for details [1]

[1] https://tracker.ceph.com/issues/52926

Fixes: https://tracker.ceph.com/issues/51592
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 48b369e2caf3222bf594dc09f87b5969a53dfbe7)

3 years agoceph-volume: implement lvm wrapper
Guillaume Abrioux [Thu, 14 Oct 2021 07:41:42 +0000 (09:41 +0200)]
ceph-volume: implement lvm wrapper

ceph-volume should run pv/vg/lv commands in the host namespace rather than
running them inside the container in order to avoid lvm metadata corruption.

Fixes: https://tracker.ceph.com/issues/52926
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 4d33630deeaee51578868fb29337da802e9cb231)

3 years agoMerge pull request #44210 from guits/wip-53372-octopus
Guillaume Abrioux [Mon, 13 Dec 2021 08:50:33 +0000 (09:50 +0100)]
Merge pull request #44210 from guits/wip-53372-octopus

octopus: ceph-volume: human_readable_size() refactor

3 years agoMerge pull request #44174 from cfsnyder/wip-51149-octopus
Yuri Weinstein [Sat, 11 Dec 2021 16:15:20 +0000 (08:15 -0800)]
Merge pull request #44174 from cfsnyder/wip-51149-octopus

octopus: osd: set r only if succeed in FillInVerifyExtent

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #44176 from cfsnyder/wip-51171-octopus
Yuri Weinstein [Fri, 10 Dec 2021 23:44:44 +0000 (15:44 -0800)]
Merge pull request #44176 from cfsnyder/wip-51171-octopus

octopus: common/PriorityCache: low perf counters priorities for submodules.

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
3 years agoMerge pull request #44165 from cfsnyder/wip-52710-octopus
Yuri Weinstein [Fri, 10 Dec 2021 23:43:41 +0000 (15:43 -0800)]
Merge pull request #44165 from cfsnyder/wip-52710-octopus

octopus: osd: fix partial recovery become whole object recovery after restart osd

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #44097 from cfsnyder/wip-53389-octopus
Yuri Weinstein [Fri, 10 Dec 2021 23:43:04 +0000 (15:43 -0800)]
Merge pull request #44097 from cfsnyder/wip-53389-octopus

octopus: osd/OSDMap.cc: clean up pg_temp for nonexistent pgs

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
3 years agoMerge pull request #44254 from neha-ojha/wip-perf-octopus
Yuri Weinstein [Fri, 10 Dec 2021 19:11:25 +0000 (11:11 -0800)]
Merge pull request #44254 from neha-ojha/wip-perf-octopus

octopus: qa: miscellaneous perf suite fixes

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
3 years agoMerge pull request #43962 from cfsnyder/wip-53200-octopus
Yuri Weinstein [Fri, 10 Dec 2021 18:29:12 +0000 (10:29 -0800)]
Merge pull request #43962 from cfsnyder/wip-53200-octopus

octopus: osd: fix 'ceph osd stop <osd.nnn>' doesn't take effect

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #43861 from pponnuvel/wip-53198-octopus
Yuri Weinstein [Fri, 10 Dec 2021 18:26:29 +0000 (10:26 -0800)]
Merge pull request #43861 from pponnuvel/wip-53198-octopus

octopus: mon/MgrStatMonitor: ignore MMgrReport from non-active mgr

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agodoc: prerequisites fix for cephFS mount 44271/head
Nikhilkumar Shelke [Thu, 11 Nov 2021 10:34:30 +0000 (16:04 +0530)]
doc: prerequisites fix for cephFS mount

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

3 years agoqa: account for split of the kclient "metrics" debugfs file 44270/head
Jeff Layton [Wed, 10 Nov 2021 18:10:50 +0000 (13:10 -0500)]
qa: account for split of the kclient "metrics" debugfs file

Recently, Luis posted a patch to turn the metrics debugfs file into a
directory with separate files for the different sections in the old
metrics file.

Account for this change in get_op_read_count().

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

3 years agoqa: test_readahead add kernel client support
Xiubo Li [Thu, 12 Nov 2020 06:18:16 +0000 (14:18 +0800)]
qa: test_readahead add kernel client support

If the "ceph.cluster_fsid" and "ceph.client_id" vxattrs or the
"metric" debug file are not support yet, will assume the test
succeeds.

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

3 years agoqa: switch to 'osdop_read' instead of 'op_r'
Xiubo Li [Wed, 11 Nov 2020 02:09:47 +0000 (10:09 +0800)]
qa: switch to 'osdop_read' instead of 'op_r'

The 'op_r' will just acount CEPH_OSD_FLAG_READ flag, which will
include some other none real data read opcodes, like the CEPH_OSD_OP_STAT.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 4f1817aa8fd62d70e708e69aeb1ad7413498b63b)

3 years agoMerge pull request #43887 from ifed01/wip-ifed-more-errors-shared-blob-repair-oct
Yuri Weinstein [Thu, 9 Dec 2021 21:29:14 +0000 (13:29 -0800)]
Merge pull request #43887 from ifed01/wip-ifed-more-errors-shared-blob-repair-oct

octopus: os/bluestore: fix additional errors during missed shared blob repair.

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #43885 from ifed01/wip-ifed-fix-invalid-offset-repair-oct
Yuri Weinstein [Thu, 9 Dec 2021 21:28:43 +0000 (13:28 -0800)]
Merge pull request #43885 from ifed01/wip-ifed-fix-invalid-offset-repair-oct

octopus: os/bluestore: fix writing to invalid offset when repairing

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #43883 from ifed01/wip-ifed-fix-53011-oct
Yuri Weinstein [Thu, 9 Dec 2021 21:28:06 +0000 (13:28 -0800)]
Merge pull request #43883 from ifed01/wip-ifed-fix-53011-oct

octopus: os/bluestore: use proper prefix when removing undecodable Share Blob.

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #43757 from ifed01/wip-ifed-fix-write-small-head-pad-oct
Yuri Weinstein [Thu, 9 Dec 2021 21:27:22 +0000 (13:27 -0800)]
Merge pull request #43757 from ifed01/wip-ifed-fix-write-small-head-pad-oct

octopus: os/bluestore: _do_write_small fix head_pad

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #44172 from cfsnyder/wip-52074-octopus
Yuri Weinstein [Thu, 9 Dec 2021 16:19:56 +0000 (08:19 -0800)]
Merge pull request #44172 from cfsnyder/wip-52074-octopus

octopus: rgw: user stats showing 0 value for "size_utilized" and "size_kb_utilized" fields

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #44170 from cfsnyder/wip-53133-octopus
Yuri Weinstein [Thu, 9 Dec 2021 16:19:04 +0000 (08:19 -0800)]
Merge pull request #44170 from cfsnyder/wip-53133-octopus

octopus: rgw: disable prefetch in rgw_file to fix 3x read amplification

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoqa/suites/rados/perf/ceph.yaml: remove rgw 44254/head
Neha Ojha [Mon, 9 Aug 2021 14:35:01 +0000 (14:35 +0000)]
qa/suites/rados/perf/ceph.yaml: remove rgw

This is no longer required because we removed cosbench workloads in
fd350fd0150a2d4072f055658c20314a435a19ba. This is also required to prevent
failures like the following or any other changes that break the rgw task:

```
2021-08-06T20:13:25.812 INFO:teuthology.orchestra.run.smithi060.stderr:curl: (7) Failed to connect to smithi060.front.sepia.ceph.com port 80: Connection refused
2021-08-06T20:15:33.813 ERROR:teuthology.contextutil:Saw exception from nested tasks
Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_git_teuthology_04c2febe7099917d97a71271f17abb5710030132/teuthology/contextutil.py", line 31, in nested
    vars.append(enter())
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/home/teuthworker/src/github.com_ceph_ceph-c_3c0f8c8164075af7aac4d1f2805d3f4580709461/qa/tasks/rgw.py", line 191, in start_rgw
    wait_for_radosgw(url, remote)
  File "/home/teuthworker/src/github.com_ceph_ceph-c_3c0f8c8164075af7aac4d1f2805d3f4580709461/qa/tasks/util/rgw.py", line 94, in wait_for_radosgw
    assert exit_status == 0
AssertionError
```

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 119544bb29e253322af33e593ffd09e325c2af8a)

3 years agoqa: remove cosbench workloads from perf suites
Neha Ojha [Fri, 21 May 2021 20:17:11 +0000 (20:17 +0000)]
qa: remove cosbench workloads from perf suites

Due to https://tracker.ceph.com/issues/49139

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit fd350fd0150a2d4072f055658c20314a435a19ba)

3 years agoqa: use ubuntu_latest for perf suites
Neha Ojha [Fri, 21 May 2021 16:15:37 +0000 (16:15 +0000)]
qa: use ubuntu_latest for perf suites

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 5957d1797a4f67b4545c2554dff240463af87359)

3 years agoMerge pull request #44227 from ceph/octopus-mistune
Deepika Upadhyay [Wed, 8 Dec 2021 23:32:41 +0000 (05:02 +0530)]
Merge pull request #44227 from ceph/octopus-mistune

doc: Use older mistune

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoMerge pull request #43863 from ivancich/wip-multipart-purge-fix-octopus
Yuri Weinstein [Tue, 7 Dec 2021 18:56:26 +0000 (10:56 -0800)]
Merge pull request #43863 from ivancich/wip-multipart-purge-fix-octopus

octopus: rgw: fix bucket purge incomplete multipart uploads

Reviewed-by: Adam Emerson <aemerson@redhat.com>
3 years agoMerge pull request #43961 from cfsnyder/wip-53272-octopus
Yuri Weinstein [Tue, 7 Dec 2021 17:00:17 +0000 (09:00 -0800)]
Merge pull request #43961 from cfsnyder/wip-53272-octopus

octopus: rgw/beast: optimizations for request timeout

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #43810 from cbodley/wip-qa-rgw-java-octopus
Yuri Weinstein [Tue, 7 Dec 2021 16:59:17 +0000 (08:59 -0800)]
Merge pull request #43810 from cbodley/wip-qa-rgw-java-octopus

qa/rgw: octopus branch targets ceph-octopus branch of java_s3tests

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
Reviewed-by: Ali Maredia <amaredia@redhat.com>
3 years agoMerge pull request #43696 from cfsnyder/wip-52959-octopus
Yuri Weinstein [Tue, 7 Dec 2021 16:58:19 +0000 (08:58 -0800)]
Merge pull request #43696 from cfsnyder/wip-52959-octopus

octopus: rgw/rgw_rados: make RGW request IDs non-deterministic

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agodoc: Use older mistune 44227/head
David Galloway [Mon, 6 Dec 2021 15:32:56 +0000 (10:32 -0500)]
doc: Use older mistune

https://github.com/miyakogi/m2r/issues/66

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

3 years agoceph-volume: human_readable_size() refactor 44210/head
Guillaume Abrioux [Tue, 16 Nov 2021 19:32:38 +0000 (20:32 +0100)]
ceph-volume: human_readable_size() refactor

This commit refactors the `human_readable_size()` function.

The current implementation has a couple of issues:

in a 'human readable' mindset, I would expect `human_readable_size(1024)` to
return '1.00 KB' instead of '1024.00 KB'.

```
In [1]: from ceph_volume.util.disk import human_readable_size

In [2]: human_readable_size(1024)
Out[2]: '1024.00 B'

In [3]: human_readable_size(1024*1024)
Out[3]: '1024.00 KB'

```

Also, it doesn't support PB unit:

```
In [4]: human_readable_size(1024*1024*1024*1024*1024)
Out[4]: '1024.00 TB'

In [5]: human_readable_size(1024*1024*1024*1024*1024*1024)
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-31-0859861661dc> in <module>
----> 1 human_readable_size(1024*1024*1024*1024*1024*1024)

~/GIT/ceph/src/ceph-volume/ceph_volume/util/disk.py in human_readable_size(size)
    640     return "{size:.2f} {suffix}".format(
    641         size=size,
--> 642         suffix=suffixes[suffix_index])
    643
    644

IndexError: list index out of range
```

This commit fixes this.

Fixes: https://tracker.ceph.com/issues/48492
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 6940856f233f4d365a119eed90ff88fd918f6916)

3 years agorpm, debian: move smartmontools and nvme-cli to ceph-base 44177/head
Yaarit Hatuka [Wed, 25 Aug 2021 02:12:08 +0000 (02:12 +0000)]
rpm, debian: move smartmontools and nvme-cli to ceph-base

We wish to be able to scrape SMART and NVMe metrics from OSD and MON
nodes. For this we require / recommend smartmontools and nvme-cli
dependencies for both the ceph-osd and ceph-mon packages.  However, the
sudoers file (which is required for invoking `smartctl` by user 'ceph')
was installed only in the ceph-osd package.  Since different packages
cannot own the same file, and because we want to be able to scrape from
every daemon, we move the dependencies and the sudoers installation to
ceph-base. For generalization, we rename:
sudoers.d/ceph-osd-smartctl -> sudoers.d/ceph-smartctl

Fixes: https://tracker.ceph.com/issues/50657
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
(cherry picked from commit 7ca39fa92b47427af2f1c6000c653bb4dffc47fe)

Conflicts:
ceph.spec.in
debian/rules

Cherry-pick notes:
- conflict due to octopus not having jaeger dep
- conflict due to octopus not installing rbd-nbd_quiesce on debian

3 years agocommon/PriorityCache: low perf counters priorities for submodules. 44176/head
Igor Fedotov [Thu, 27 May 2021 12:49:05 +0000 (15:49 +0300)]
common/PriorityCache: low perf counters priorities for submodules.

Having too many perf counters with nicknames priorities >= PRIO_INTERESTING spoils daemonperf output and causes no "osd" section there due to presumably too many columns.

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

3 years agoosd: set r only if succeed in FillInVerifyExtent 44174/head
yanqiang-ux [Mon, 7 Jun 2021 07:54:44 +0000 (15:54 +0800)]
osd: set r only if succeed in FillInVerifyExtent

When read failed, ret can be taken as data len in FillInVerifyExtent, which should be avoided.
It may cause errors in crc repair or retry read because of the data len. In my case, we use FillInVerifyExtent for EC read,
when meet -EIO,we will try crc repair, which need read data from other shard accrding to data len.
And I meet assert in ECBackend.cc (loc: line 2288 ceph_assert(range.first != range.second) ), But it seems master branch not support EC crc repair.
In shot, when reuse the readop may cause unpredictable error.

Fixes: https://tracker.ceph.com/issues/51115
Signed-off-by: yanqiang-ux <yanqiang_ux@163.com>
(cherry picked from commit 127745161fbcdee06b2dfa8464270c3934bcd06a)

3 years agorgw: user stats showing 0 value for "size_utilized" and "size_kb_utilized" fields 44172/head
J. Eric Ivancich [Wed, 28 Jul 2021 17:52:29 +0000 (13:52 -0400)]
rgw: user stats showing 0 value for "size_utilized" and "size_kb_utilized" fields

When accumulating user stats, the "utilized" fields are not looked
at. Updates RGWStorageStats::dump so it only outputs the "utilized"
data if they're updated.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 248fbce6b54f6c91e63b05861f8631ca64c8df81)

Conflicts:
src/rgw/rgw_admin.cc

Cherry-pick notes:
- Conflicts due to change of interface for rgw user and rados store

3 years agorgw: disable prefetch in rgw_file 44170/head
Kajetan Janiak [Wed, 18 Nov 2020 10:42:07 +0000 (11:42 +0100)]
rgw: disable prefetch in rgw_file

Each call to rgw_read (rgw_file.cc) invokes three calls to RGWRados::get_obj_state with s->prefetch_data=true. It results in great read amplification. If length argument in rgw_read call is smaller than rgw_max_chunk_size, then the amplification is threefold.

Signed-off-by: Kajetan Janiak <kjaniak@cloudferro.com>
(cherry picked from commit f915e21e5a1baf6030c1407b3058d4f58c638df9)

Conflicts:
src/rgw/rgw_op.cc

Cherry-pick notes:
- Octopus sets prfetch data flag through Rados method vs. method on object

3 years agomds: PurgeQueue.cc fix for 32bit compilation 44169/head
Duncan Bellamy [Sat, 8 May 2021 10:52:35 +0000 (11:52 +0100)]
mds: PurgeQueue.cc fix for 32bit compilation

files_high_water is defined as uint64_t but when compiling on 32bit these max functions
fail as they are both not considered uint64_t by gcc 10 even though they are

  files_high_water = std::max(files_high_water,
                               static_cast<uint64_t>(in_flight.size()));

Fixes: https://tracker.ceph.com/issues/50707
Signed-off-by: Duncan Bellamy <dunk@denkimushi.com>
(cherry picked from commit 0b7f69252c7701f70d38cc6221d393cbd5a507a4)

Conflicts:
src/mds/PurgeQueue.cc

Cherry-pick notes:
- Octopus did not previously have static_cast to uint64

3 years agoosd: fix partial recovery become whole object recovery after restart osd 44165/head
Jianwei Zhang [Mon, 13 Sep 2021 10:13:18 +0000 (18:13 +0800)]
osd: fix partial recovery become whole object recovery after restart osd

support SERVER_OCTOPUS feature for pg_missing_item::encode()

Fixes: https://tracker.ceph.com/issues/52583
Signed-off-by: Jianwei Zhang <jianwei1216@qq.com>
(cherry picked from commit dcdb188b6f577551fb377ba34145419f81322b03)

3 years agomgr/dashboard: all pyfakefs must be pinned on same version 44159/head
Rishabh Dave [Fri, 29 Oct 2021 15:04:12 +0000 (20:34 +0530)]
mgr/dashboard: all pyfakefs must be pinned on same version

Without this patch execution of install-deps.sh fails with an error.

Fixes: https://tracker.ceph.com/issues/53088
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 24d3a01a3019d30fc1d4dc4963a3942665243a48)

3 years agoMerge pull request #42958 from ifed01/wip-ifed-fix-huge-omap-rename-oct
Igor Fedotov [Thu, 25 Nov 2021 10:23:17 +0000 (13:23 +0300)]
Merge pull request #42958 from ifed01/wip-ifed-fix-huge-omap-rename-oct

octopus: os/bluestore: cap omap naming scheme upgrade transactoin.

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
3 years agoosd/OSDMap.cc: clean up pg_temp for nonexistent pgs 44097/head
Cory Snyder [Wed, 17 Nov 2021 18:07:45 +0000 (13:07 -0500)]
osd/OSDMap.cc: clean up pg_temp for nonexistent pgs

Fixes an issue where the OSDMap does not clear pg-temp entries for PGs that no longer exist.

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

3 years agoMerge pull request #43959 from guits/wip-53283-octopus
Guillaume Abrioux [Tue, 23 Nov 2021 16:43:56 +0000 (17:43 +0100)]
Merge pull request #43959 from guits/wip-53283-octopus

octopus: ceph-volume: `get_first_lv()` refactor

3 years agoos/bluestore: Fix omap upgrade to per-pg scheme 42958/head
Adam Kupczyk [Sat, 13 Nov 2021 10:28:18 +0000 (11:28 +0100)]
os/bluestore: Fix omap upgrade to per-pg scheme

This is fix to regression introduced by fix to omap upgrade: https://github.com/ceph/ceph/pull/43687
The problem was that we always skipped first omap entry.
This worked fine with objects having omap header key.
For objects without header key we skipped first actual omap key.

Fixes: https://tracker.ceph.com/issues/53260
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit 65a3f374aa1c57c5bb9401e57dab98a643b4360a)

3 years agoceph-volume: `get_first_*()` refactor 43959/head
Guillaume Abrioux [Mon, 8 Mar 2021 08:59:26 +0000 (09:59 +0100)]
ceph-volume: `get_first_*()` refactor

As indicated by commit 17957d9beb42a04b8f180ccb7ba07d43179a41d3 those
fuctions were meant to avoid writing something like following:

```
lvs = get_lvs()
if len(lvs) >= 1:
lvs = lv[0]
```

Those functions should return `None` if 0 or more than 1 item is returned.
The current name of these functions are confusing and can lead to thinking that
we just want the first item returned, even though it returns more than 1
item, let's rename them to `get_single_pv()`, `get_single_vg()` and
`get_single_lv()`

Closes: https://tracker.ceph.com/issues/49643
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a5e4216b49704783c55fb83b3ae6dde35b0082ad)

3 years agoMerge pull request #43952 from guits/wip-52597-octopus
Guillaume Abrioux [Thu, 18 Nov 2021 08:36:35 +0000 (09:36 +0100)]
Merge pull request #43952 from guits/wip-52597-octopus

octopus: ceph-volume: util/prepare fix osd_id_available()

3 years agoMerge pull request #43950 from guits/wip-53189-octopus
Guillaume Abrioux [Thu, 18 Nov 2021 08:35:32 +0000 (09:35 +0100)]
Merge pull request #43950 from guits/wip-53189-octopus

octopus: ceph-volume: fix a typo causing AttributeError

3 years agoceph-volume/tests: update setup_mixed_type playbook 43947/head
Guillaume Abrioux [Wed, 27 Oct 2021 06:37:07 +0000 (08:37 +0200)]
ceph-volume/tests: update setup_mixed_type playbook

we need to create a file with a larger size.
see https://github.com/ceph/ceph/pull/43300#issuecomment-951961243

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 8af00e25aa4ab60d0309e31f6c20edd6cd5be1ee)

3 years agoqa/rgw: bump tempest version to resolve dependency issue 43967/head
Casey Bodley [Mon, 8 Nov 2021 15:06:24 +0000 (10:06 -0500)]
qa/rgw: bump tempest version to resolve dependency issue

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