]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agoMerge pull request #46715 from mkogan1/rgw-pacific-fix-fips-segf
Yuri Weinstein [Tue, 5 Jul 2022 14:38:48 +0000 (07:38 -0700)]
Merge pull request #46715 from mkogan1/rgw-pacific-fix-fips-segf

pacific rgw: on FIPS enabled, fix segfault performing s3 multipart PUT

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46235 from vumrao/wip-vumrao-54278
Yuri Weinstein [Tue, 5 Jul 2022 14:37:59 +0000 (07:37 -0700)]
Merge pull request #46235 from vumrao/wip-vumrao-54278

pacific: rgw: remove rgw_rados_pool_pg_num_min and its use on pool creation use the cluster defaults for pg_num_min

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #43802 from rjhaverkamp/wip-53145-pacific
Yuri Weinstein [Tue, 5 Jul 2022 14:36:38 +0000 (07:36 -0700)]
Merge pull request #43802 from rjhaverkamp/wip-53145-pacific

pacific: rgw: fix self-comparison for RGWCopyObj optimization

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46909 from idryomov/wip-rbd-deep-copy-progress-pacific
Yuri Weinstein [Tue, 5 Jul 2022 14:15:31 +0000 (07:15 -0700)]
Merge pull request #46909 from idryomov/wip-rbd-deep-copy-progress-pacific

pacific: librbd: update progress for non-existent objects on deep-copy

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Christopher Hoffman <choffman@redhat.com>
3 years agoMerge pull request #46815 from idryomov/wip-55389-pacific
Yuri Weinstein [Tue, 5 Jul 2022 14:14:32 +0000 (07:14 -0700)]
Merge pull request #46815 from idryomov/wip-55389-pacific

pacific: librbd/cache/pwl: fix endianness issue

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoMerge pull request #46813 from idryomov/wip-rbd-mirror-remote-not-primary-pacific
Yuri Weinstein [Tue, 5 Jul 2022 14:13:46 +0000 (07:13 -0700)]
Merge pull request #46813 from idryomov/wip-rbd-mirror-remote-not-primary-pacific

pacific: rbd-mirror: generally skip replay/resync if remote image is not primary

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
3 years agoMerge pull request #46778 from idryomov/wip-rbd-schedule-backports-pacific
Yuri Weinstein [Tue, 5 Jul 2022 14:12:31 +0000 (07:12 -0700)]
Merge pull request #46778 from idryomov/wip-rbd-schedule-backports-pacific

pacific: mirror snapshot schedule and trash purge schedule fixes

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Sunny Kumar <sunkumar@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
3 years agoMerge pull request #46531 from rhcs-dashboard/wip-55752-pacific
Ernesto Puerta [Mon, 4 Jul 2022 11:52:54 +0000 (13:52 +0200)]
Merge pull request #46531 from rhcs-dashboard/wip-55752-pacific

pacific: mgr/dashboard: batch rbd-mirror backports

Reviewed-by: Pegonzal <NOT@FOUND>
Reviewed-by: Sarthak Gupta <sarthak.dev.0702@gmail.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: melissa-kun-li <NOT@FOUND>
Reviewed-by: Nizamudeen A <nia@redhat.com>
3 years agoMerge pull request #46870 from rhcs-dashboard/wip-56118-pacific
Pere Diaz Bou [Fri, 1 Jul 2022 09:35:51 +0000 (11:35 +0200)]
Merge pull request #46870 from rhcs-dashboard/wip-56118-pacific

pacific: mgr/dashboard: iterate through copy of items

Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agomgr/dashboard: fix rbd remote calls 46531/head
Pere Diaz Bou [Thu, 30 Jun 2022 11:44:49 +0000 (13:44 +0200)]
mgr/dashboard: fix rbd remote calls

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agomgr/dashboard: rbd image primary ui
Pedro Gonzalez Gomez [Fri, 3 Jun 2022 10:13:44 +0000 (12:13 +0200)]
mgr/dashboard: rbd image primary ui

Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agomgr/dashboard: fix linting issues
Pere Diaz Bou [Tue, 21 Jun 2022 08:34:56 +0000 (10:34 +0200)]
mgr/dashboard: fix linting issues

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agomgr/dashboard: Error page cleanup
Nizamudeen A [Wed, 15 Jun 2022 17:22:39 +0000 (22:52 +0530)]
mgr/dashboard: Error page cleanup

Some error page cleanups

Signed-off-by: Nizamudeen A <nia@redhat.com>
3 years agomgr/dashboard: add rbd status endpoint
Melissa Li [Thu, 26 May 2022 18:07:30 +0000 (14:07 -0400)]
mgr/dashboard: add rbd status endpoint

Show "No RBD pools available" error page when accessing block/rbd if there are no rbd pools.
Add a "button_name" and "button_route" property to `ModuleStatusGuardService` config to customize the button on the error page.
Modify `ModuleStatusGuardService` to execute API calls to `/ui-api/<uiApiPath>/status` which uses the `UIRouter`.

Fixes: https://tracker.ceph.com/issues/42109
Signed-off-by: Melissa Li <melissali@redhat.com>
(cherry picked from commit 6ac9b3cfe171a8902454ea907b3ba37d83eda3dc)

3 years agomgr/dashboard: configure rbd mirroring
Nizamudeen A [Mon, 6 Jun 2022 05:51:29 +0000 (11:21 +0530)]
mgr/dashboard: configure rbd mirroring

One-click button in the case of an orch cluster for configuring the
rbd-mirroring when its not properly setup. This button will create an
rbd-mirror service and also an rbd labelled pool(replicated: size-3) (if they are not
existing)

Fixes: https://tracker.ceph.com/issues/55646
Signed-off-by: Nizamudeen A <nia@redhat.com>
 Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.ts
src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py

error component and module-status-guard.service.ts had one minor
conflict which was resolved by getting incoming changes (add missing
logic).
test_rbd_mirroring had an import conflict which was resolved by
accepting incoming changes which had the same imports with new ones.

3 years agomgr/dashboard: improve edit site name action in rbd-mirroring
Nizamudeen A [Mon, 13 Jun 2022 08:24:15 +0000 (13:54 +0530)]
mgr/dashboard: improve edit site name action in rbd-mirroring

Fixes: https://tracker.ceph.com/issues/55896
Signed-off-by: Nizamudeen A <nia@redhat.com>
3 years agomgr/dashboard: rbd force resync from fornt-end
Sarthak0702 [Thu, 2 Jun 2022 22:58:31 +0000 (04:28 +0530)]
mgr/dashboard: rbd force resync from fornt-end

Signed-off-by: Sarthak0702 <sarthak.dev.0702@gmail.com>
3 years agomgr/dashboard: fix mirroring e2e and lint errors
Avan Thakkar [Wed, 8 Jun 2022 11:03:18 +0000 (16:33 +0530)]
mgr/dashboard: fix mirroring e2e and lint errors

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
3 years agomgr/dashboard: add byte info, move state, add idle state
Pere Diaz Bou [Tue, 7 Jun 2022 17:57:44 +0000 (19:57 +0200)]
mgr/dashboard: add byte info, move state, add idle state

Idle substate added from snapshot mode.
Instead of seconds info we display bytes and entries info.

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Conflicts:
src/pybind/mgr/dashboard/controllers/rbd_mirroring.py

Fixed a minor import conflict

3 years agomgr/dashboard: move replaying images to Syncing tab
Pere Diaz Bou [Mon, 30 May 2022 14:10:11 +0000 (16:10 +0200)]
mgr/dashboard: move replaying images to Syncing tab

Images with 'Replaying' state will be displayed in Syncing tab. syncTmpl
removed as it was unnecessary if sate is provided from the backend.

Replaying images in contrast of Syncing images don't have a progress
percentage, nevertheless, we have an approximation of how much time left
there is until the image is fully synced. Therefore, we can use seconds_until_synced to represent the progress.

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agomgr/dashboard: snapshot mirroring from dashboard
Pere Diaz Bou [Fri, 13 May 2022 15:15:33 +0000 (17:15 +0200)]
mgr/dashboard: snapshot mirroring from dashboard

Enable snapshot mirroring from the Pools -> Image

Also show the mirror-snapshot in the image where snapshot is enabled

When parsing images if an image has the snapshot mode enabled, it will
try to  run commands that don't work with that mode. The solution was
not running those for now and appending the mode in the get call.

Fixes: https://tracker.ceph.com/issues/55648
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Signed-off-by: Nizamudeen A <nia@redhat.com>
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit 489a385a95d6ffa5dbd4c5f9c53c1f80ea179142)

3 years agomgr/dashboard: expose image mirroring commands as endpoints
Pere Diaz Bou [Thu, 12 May 2022 18:29:01 +0000 (20:29 +0200)]
mgr/dashboard: expose image mirroring commands as endpoints

Expose:
  - enable/disable mirroring in image
  - promote/demote (primary and non-primary)
  - resync
  - snapshot mode:
    - mirror image snapshot (manual snapshot)
    - schedule

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

3 years agolibrbd: make ImageCopyRequest::send_next_object_copy() return void 46909/head
Ilya Dryomov [Tue, 28 Jun 2022 18:47:25 +0000 (20:47 +0200)]
librbd: make ImageCopyRequest::send_next_object_copy() return void

Make send_object_copies() consistent with handle_object_copy() wrt
calling send_next_object_copy().

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

3 years agolibrbd: update progress for non-existent objects on deep-copy
Ilya Dryomov [Sun, 26 Jun 2022 11:05:09 +0000 (13:05 +0200)]
librbd: update progress for non-existent objects on deep-copy

As a side effect of commit e5a21e904142 ("librbd: deep-copy image copy
state machine skips clean objects"), handle_object_copy() stopped being
called for non-existent objects.  This broke progress_object_no logic,
which expects to "see" all object numbers so that update_progress()
callback invocations can be ordered.  Currently update_progress() based
progress reporting gets stuck after encountering a hole in the image.

To fix, arrange for handle_object_copy() to be called for all object
numbers, even if ObjectCopyRequest isn't created.  Defer the extra call
to the image work queue to avoid locking issues.

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

3 years agoMerge pull request #46903 from zdover23/wip-doc-2022-06-30-backport-46984-to-pacific
zdover23 [Thu, 30 Jun 2022 10:58:24 +0000 (20:58 +1000)]
Merge pull request #46903 from zdover23/wip-doc-2022-06-30-backport-46984-to-pacific

pacific: doc/index.rst: add link to Dev Guide basic workfl.

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/index.rst: add link to Dev Guide basic workfl. 46903/head
Zac Dover [Wed, 29 Jun 2022 12:57:13 +0000 (22:57 +1000)]
doc/index.rst: add link to Dev Guide basic workfl.

This PR adds a link to the "Basic Workflow" section of the
Developer Guide on the landing page of docs.ceph.com.

This PR is meant to improve the documentation for developers
new to Ceph and to guide them to instructions that will allow
them to become full-fledged contributors to the Ceph project
as quickly as possible.

The "Basic Workflow" page of the Developer Guide contains
information that answers almost all of the questions that I had
about contributing to the Ceph project when I was new to it,
and I am finally acting on my long-held conviction that the
"Basic Workflow" page of the Developer Guide should have a more
prominent position in the documentation suite than it has had.

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

3 years agoMerge pull request #46717 from rhcs-dashboard/wip-56075-pacific
Ernesto Puerta [Wed, 29 Jun 2022 18:20:30 +0000 (20:20 +0200)]
Merge pull request #46717 from rhcs-dashboard/wip-56075-pacific

pacific: mgr/dashboard: bump moment from 2.29.1 to 2.29.3 in /src/pybind/mgr/dashboard/frontend

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agoMerge pull request #46626 from neesingh-rh/wip-55937-pacific
Laura Flores [Wed, 29 Jun 2022 16:01:01 +0000 (11:01 -0500)]
Merge pull request #46626 from neesingh-rh/wip-55937-pacific

pacific: client: Inode::hold_caps_until is time from monotonic clock now.

3 years agotest/librados: modify LibRadosMiscConnectFailure.ConnectFailure to comply with new... 46626/head
Laura Flores [Thu, 9 Jun 2022 18:55:48 +0000 (18:55 +0000)]
test/librados: modify LibRadosMiscConnectFailure.ConnectFailure to comply with new seconds unit

The unit type for `client_mount_timeout` was changed from "float" to "secs" in
983b10506dc8466a0e47ff0d320d480dd09999ec. To make this test comply with the new
seconds unit change, we need to change the value to an integer, as seconds
does not accept float values.

Fixes: https://tracker.ceph.com/issues/55971
Signed-off-by: Laura Flores <lflores@redhat.com>
(cherry picked from commit f357459e6b159229ad40491709f756b06a6e87f1)
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
3 years agoclient: Inode::hold_caps_until is time from monotonic clock now.
Neeraj Pratap Singh [Wed, 8 Dec 2021 08:42:59 +0000 (14:12 +0530)]
client: Inode::hold_caps_until is time from monotonic clock now.

Inode::hold_caps_until storing time from ceph::coarse_mono_clock now.

This upstream code of this PR i.e. the parent PR contains the file
`src/common/options/mds-client.yaml.in` which intends to fix a part
of this PR whereas this file didn't exist in pacific branch.So, those
changes of `src/common/options/mds-client.yaml.in` are incorporated in
the below mentioned files in Conlicts.
Fixes: https://tracker.ceph.com/issues/52982
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
(cherry picked from commit 983b10506dc8466a0e47ff0d320d480dd09999ec)

Conflicts:`/src/common/legacy_config_opts.h`
          `/src/common/options.cc`

3 years agoMerge pull request #46802 from lxbsz/wip-56105
Yuri Weinstein [Tue, 28 Jun 2022 15:17:28 +0000 (08:17 -0700)]
Merge pull request #46802 from lxbsz/wip-56105

pacific: qa: wait rank 0 to become up:active state before mounting fuse client

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
3 years agoMerge pull request #46799 from lxbsz/wip-56110
Yuri Weinstein [Tue, 28 Jun 2022 15:15:42 +0000 (08:15 -0700)]
Merge pull request #46799 from lxbsz/wip-56110

pacific: client: choose auth MDS for getxattr with the Xs caps

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46798 from lxbsz/wip-55449
Yuri Weinstein [Tue, 28 Jun 2022 15:15:08 +0000 (08:15 -0700)]
Merge pull request #46798 from lxbsz/wip-55449

pacific: client: add option to disable collecting and sending metrics

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46682 from lxbsz/wip-56016
Yuri Weinstein [Tue, 28 Jun 2022 15:14:27 +0000 (08:14 -0700)]
Merge pull request #46682 from lxbsz/wip-56016

Pacific: mds: clear MDCache::rejoin_*_q queues before recovering file inodes

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46679 from lxbsz/wip-55993
Yuri Weinstein [Tue, 28 Jun 2022 15:13:53 +0000 (08:13 -0700)]
Merge pull request #46679 from lxbsz/wip-55993

Pacific: client: switch AT_NO_ATTR_SYNC to AT_STATX_DONT_SYNC

Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46646 from rhcs-dashboard/wip-54577-pacific
Yuri Weinstein [Tue, 28 Jun 2022 15:12:17 +0000 (08:12 -0700)]
Merge pull request #46646 from rhcs-dashboard/wip-54577-pacific

pacific: Add mapping for ernno:13 and adding path in error msg in opendir()/cephfs.pyx

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
3 years agoMerge pull request #46557 from lxbsz/wip-55935
Yuri Weinstein [Tue, 28 Jun 2022 15:11:13 +0000 (08:11 -0700)]
Merge pull request #46557 from lxbsz/wip-55935

Pacific: client: always return ESTALE directly in handle_reply

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46425 from lxbsz/wip-55660
Yuri Weinstein [Tue, 28 Jun 2022 15:10:45 +0000 (08:10 -0700)]
Merge pull request #46425 from lxbsz/wip-55660

Pacific: qa: add filesystem/file sync stuck test support

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46424 from lxbsz/wip-55659
Yuri Weinstein [Tue, 28 Jun 2022 15:09:59 +0000 (08:09 -0700)]
Merge pull request #46424 from lxbsz/wip-55659

Pacific: mds: trigger to flush the mdlog in handle_find_ino()

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46423 from lxbsz/wip-55757
Yuri Weinstein [Tue, 28 Jun 2022 15:08:33 +0000 (08:08 -0700)]
Merge pull request #46423 from lxbsz/wip-55757

Pacific: mds: flush mdlog if locked and still has wanted caps not satisfied

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agomgr/dashboard: iterate through copy of items 46870/head
Pedro Gonzalez Gomez [Mon, 6 Jun 2022 08:32:49 +0000 (10:32 +0200)]
mgr/dashboard: iterate through copy of items

Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
(cherry picked from commit f6de56a02c4f1db557211621f1a369e3f8cff615)

3 years agoMerge pull request #46688 from trociny/wip-56053-pacific
Yuri Weinstein [Mon, 27 Jun 2022 21:05:46 +0000 (14:05 -0700)]
Merge pull request #46688 from trociny/wip-56053-pacific

pacific: mgr: relax "pending_service_map.epoch > service_map.epoch" assert

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #46775 from adk3798/wip-56042-pacific
Adam King [Mon, 27 Jun 2022 14:01:27 +0000 (10:01 -0400)]
Merge pull request #46775 from adk3798/wip-56042-pacific

pacific: mgr/cephadm: try to get FQDN for active instance

Reviewed-by: Tatjana Dehler <tdehler@suse.com>
3 years agoMerge pull request #46810 from rhcs-dashboard/wip-56164-pacific
Ernesto Puerta [Fri, 24 Jun 2022 11:13:49 +0000 (13:13 +0200)]
Merge pull request #46810 from rhcs-dashboard/wip-56164-pacific

pacific: mgr/dashboard: dashboard help command showing wrong syntax for login-banner

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
3 years agomgr/dashboard: dashboard help command showing wrong syntax for login-banner 46810/head
Sarthak0702 [Tue, 21 Jun 2022 09:52:12 +0000 (15:22 +0530)]
mgr/dashboard: dashboard help command showing wrong syntax for login-banner

Signed-off-by: Sarthak0702 <sarthak.dev.0702@gmail.com>
(cherry picked from commit 826741f192e754ed32b1636b06b9939efa5c5226)

3 years agoMerge pull request #46529 from rhcs-dashboard/wip-54623-pacific
Nizamudeen A [Fri, 24 Jun 2022 08:16:46 +0000 (13:46 +0530)]
Merge pull request #46529 from rhcs-dashboard/wip-54623-pacific

pacific: mgr/dashboard: BDD approach for the dashboard cephadm e2e

Reviewed-by: Sarthak Gupta <sarthak.dev.0702@gmail.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
3 years agoMerge pull request #46817 from zdover23/wip-doc-2022-06-23-backport-46769-pacific...
zdover23 [Thu, 23 Jun 2022 22:01:17 +0000 (08:01 +1000)]
Merge pull request #46817 from zdover23/wip-doc-2022-06-23-backport-46769-pacific-dev-guide-command-context

pacific: doc/dev: add context note to dev guide config

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46622 from cfsnyder/wip-55998-pacific
Cory Snyder [Thu, 23 Jun 2022 16:54:57 +0000 (12:54 -0400)]
Merge pull request #46622 from cfsnyder/wip-55998-pacific

pacific: rgw: log access key id in ops logs

3 years agoMerge pull request #46737 from rhcs-dashboard/wip-iops-pacific
Ernesto Puerta [Thu, 23 Jun 2022 12:38:02 +0000 (14:38 +0200)]
Merge pull request #46737 from rhcs-dashboard/wip-iops-pacific

pacific: mgr/dashboard: iops optimized option enabled

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agomgr/dashboard: save mgr logs inside a folder on kcli e2e 46529/head
Nizamudeen A [Fri, 8 Apr 2022 14:56:11 +0000 (20:26 +0530)]
mgr/dashboard: save mgr logs inside a folder on kcli e2e

Save the mgr container logs of cephadm inside a folder and later on
archive it and get it as an artifact on the cephadm dashboard e2e jobs

Fixes: https://tracker.ceph.com/issues/55247
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit d74defbbb3282f056e26619ecd65fc63216f2f59)

3 years agoMerge pull request #46570 from guits/wip-55945-pacific
Adam King [Wed, 22 Jun 2022 18:08:31 +0000 (14:08 -0400)]
Merge pull request #46570 from guits/wip-55945-pacific

pacific: cephadm: add 'is_paused' field in orch status output

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
3 years agoMerge pull request #46776 from adk3798/wip-55948-pacific
Adam King [Wed, 22 Jun 2022 18:06:53 +0000 (14:06 -0400)]
Merge pull request #46776 from adk3798/wip-55948-pacific

pacific: mgr/cephadm: capture exception when not able to list upgrade tags

Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agoMerge pull request #46779 from adk3798/wip-55950-pacific
Adam King [Wed, 22 Jun 2022 18:03:50 +0000 (14:03 -0400)]
Merge pull request #46779 from adk3798/wip-55950-pacific

pacific: mgr/cephadm: check if a service exists before trying to restart it

Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agoMerge pull request #46780 from adk3798/wip-55963-pacific
Adam King [Wed, 22 Jun 2022 18:01:18 +0000 (14:01 -0400)]
Merge pull request #46780 from adk3798/wip-55963-pacific

pacific: mgr/cephadm: adding logic to close ports when removing a daemon

Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agoMerge pull request #46619 from cfsnyder/wip-55996-pacific
Yuri Weinstein [Wed, 22 Jun 2022 16:36:10 +0000 (09:36 -0700)]
Merge pull request #46619 from cfsnyder/wip-55996-pacific

pacific: rgw: reopen ops log file on sighup

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
3 years agoMerge pull request #46597 from idryomov/wip-qa-rwl-on-tmpfs-pacific
Yuri Weinstein [Wed, 22 Jun 2022 16:35:13 +0000 (09:35 -0700)]
Merge pull request #46597 from idryomov/wip-qa-rwl-on-tmpfs-pacific

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

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

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

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

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

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

pacific: mgr/volumes: subvolumegroup quotas

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

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

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agodoc/dev: add context note to dev guide config 46817/head
Zac Dover [Tue, 21 Jun 2022 14:09:05 +0000 (00:09 +1000)]
doc/dev: add context note to dev guide config

This PR adds a note directing first-time cloners of
their Ceph git forks to make sure to cd into the ceph/
directory before trying to run the "git config" commands.

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

3 years agolibrbd/cache/pwl: fix endianness issue 46815/head
Yin Congmin [Mon, 25 Apr 2022 17:10:18 +0000 (01:10 +0800)]
librbd/cache/pwl: fix endianness issue

fix endianness issue with WriteLogCacheEntry encoding. abandon the
use of bits in the union. make '&' operation with the whole union
filed(flags) to get the bit information.

Fixes: https://tracker.ceph.com/issues/55389
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
(cherry picked from commit 64f741ecebf3ff9a31d99f9f3d121ffeff54173b)

Conflicts:
src/librbd/cache/pwl/Types.cc [ commit e96cdcb65851
  ("librbd/cache/pwl: merge multiple output "<<" calls") not
  in pacific ]

3 years agorbd-mirror: spell out "remote image is not primary" status correctly 46813/head
Ilya Dryomov [Sat, 18 Jun 2022 13:25:49 +0000 (15:25 +0200)]
rbd-mirror: spell out "remote image is not primary" status correctly

There is a difference: non-primary means NON_PRIMARY promotion state,
while "not primary" can refer to any of NON_PRIMARY, ORPHAN or UNKNOWN
promotion states.

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

3 years agorbd-mirror: fix up "error preparing image for replay" messages
Ilya Dryomov [Sat, 18 Jun 2022 11:15:02 +0000 (13:15 +0200)]
rbd-mirror: fix up "error preparing image for replay" messages

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

3 years agorbd-mirror: fix up PrepareReplayDisconnected test case
Ilya Dryomov [Sat, 18 Jun 2022 11:00:34 +0000 (13:00 +0200)]
rbd-mirror: fix up PrepareReplayDisconnected test case

It was botched in commit 2bca9ee96c65 ("rbd-mirror: consolidate
prepare local/remote image steps to bootstrap") and went unnoticed
because currently no special handling is needed for disconnected
clients -- is_disconnected() check happens to be the last step
and it doesn't generate an error.

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

3 years agorbd-mirror: drop m_remote_promotion_state from PrepareReplayRequest
Ilya Dryomov [Mon, 20 Jun 2022 15:21:08 +0000 (17:21 +0200)]
rbd-mirror: drop m_remote_promotion_state from PrepareReplayRequest

Now unused (and if it was used, the entire StateBuilder is passed in
anyway).

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

3 years agorbd-mirror: generally skip replay/resync if remote image is not primary
Ilya Dryomov [Mon, 20 Jun 2022 12:19:41 +0000 (14:19 +0200)]
rbd-mirror: generally skip replay/resync if remote image is not primary

Replay and resync should generally be skipped if the remote image is
not primary.

If this is not done for replay, snapshot-based mirroring can run into
a livelock if the primary image is demoted while a mirror snapshot is
being synced.  On the demote site, rbd-mirror would pick up the just
demoted image, grab the exclusive lock on it and idle waiting for a new
mirror snapshot to be created.  On the (still) non-primary site,
rbd-mirror would eventually finish syncing that mirror snapshot and
attempt to unlink from it on the demote site.  These attempts would
fail with EROFS due to exclusive lock being held in the "refuse proxied
maintenance operations" mode, blocking forward progress (syncing of the
demotion snapshot so that the non-primary image can be orderly promoted
to primary, etc).

If this is not done for resync, data loss can ensue as the just demoted
image would be immediately trashed, underneath the non-primary site that
is still syncing.

Currently this is done in PrepareReplayRequest only for journal-based
mirroring.  Note that it is conditional: if the local image is linked
to the remote image, proceeding is desirable.

Generalize this check, consolidate it with a related check in
PrepareRemoteImageRequest and move the result to BootstrapRequest to
cover both "local image does not exist" and "local image is unlinked"
cases for both modes.

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

3 years agorbd-mirror: strengthen is_local_primary() and is_linked()
Ilya Dryomov [Sat, 18 Jun 2022 10:35:51 +0000 (12:35 +0200)]
rbd-mirror: strengthen is_local_primary() and is_linked()

Initialize local_promotion_state and remote_promotion_state to UNKNOWN
instead of counterintuitive PRIMARY and NON_PRIMARY -- half the time the
final values are flipped.  Then is_local_primary() and is_linked() can
be strengthened as a non-existent image should stay in UNKNOWN.

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

3 years agodoc: Update quota kclient limitation 46668/head
Kotresh HR [Wed, 1 Jun 2022 17:12:06 +0000 (22:42 +0530)]
doc: Update quota kclient limitation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Make quota optional. This commit basically reverts the
commit da9f1d829484fe35e6d5839c19afa371e444c194

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

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

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

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

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

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

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

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

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

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

3 years agoqa: wait rank 0 to become up:active state before mounting fuse client 46802/head
Xiubo Li [Wed, 8 Jun 2022 05:00:20 +0000 (13:00 +0800)]
qa: wait rank 0 to become up:active state before mounting fuse client

When setting the ec pool to the layout the filesystem may not be
ready, so when mounting a fuse client it will fail. To fix this we
need to wait at least the rank 0 to be in up:active state.

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

3 years agoclient: choose auth MDS for getxattr with the Xs caps 46799/head
Xiubo Li [Fri, 27 May 2022 05:11:44 +0000 (13:11 +0800)]
client: choose auth MDS for getxattr with the Xs caps

If any 'x' caps is issued we can just choose the auth MDS instead
of the random replica MDSes. Because only when the Locker is in
LOCK_EXEC state will the loner client could get the 'x' caps. And
if we send the getattr requests to any replica MDS it must auth pin
and tries to rdlock from the auth MDS, and then the auth MDS need
to do the Locker state transition to LOCK_SYNC. And after that the
lock state will change back.

This cost much when doing the Locker state transition and usually
will need to revoke caps from clients.

And for the 'Xs' caps for getxattr we will also choose the auth MDS,
because the MDS side code is buggy due to setxattr won't notify the
increased xattr_version to replicated MDSes when the values changed
and the replica MDS will return the old xattr_version value. The
client will just drop the xattr values since it sees the xattr_version
doesn't change.

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

3 years agoclient: force send global open_files/metadata metrics 46798/head
Xiubo Li [Thu, 5 May 2022 02:22:04 +0000 (10:22 +0800)]
client: force send global open_files/metadata metrics

This change will fix two missing fixes introduce by commit
e9a26c551c763f75a403ff26f6304d5c10f2ca38.

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

 Conflicts:
src/client/Client.cc

3 years agomds, client: only send the metrices supported by MDSes
Xiubo Li [Wed, 16 Mar 2022 09:15:57 +0000 (17:15 +0800)]
mds, client: only send the metrices supported by MDSes

For the old ceph clusters the clients won't send any metrics to
them as default unless they have backported this commit, but there
has one option 'client_collect_and_send_global_metrics' still could
be used to enable it manually.

This will fix the crash bug when upgrading from old ceph clusters,
which will crash the MDSes once they receive unknown metrics.

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

 Conflicts:
src/client/Client.cc

3 years agoclient: add option to enable and force collecting and sending metrics
Xiubo Li [Mon, 14 Mar 2022 06:29:34 +0000 (14:29 +0800)]
client: add option to enable and force collecting and sending metrics

To be careful to enable this because it may crash the old MDSes while
upgrading.

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

 Conflicts:
src/common/options/mds-client.yaml.in

3 years agomgr/cephadm: try to get FQDN for active instance 46775/head
Tatjana Dehler [Mon, 16 May 2022 13:05:37 +0000 (15:05 +0200)]
mgr/cephadm: try to get FQDN for active instance

Fixes: https://tracker.ceph.com/issues/55674
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
(cherry picked from commit d0385e030b391f588b4ec0dc707d5d46778a2aaa)

Conflicts:
src/pybind/mgr/cephadm/tests/test_services.py

3 years agomgr/cephadm: adding logic to close ports when removing a daemon 46780/head
Redouane Kachach [Tue, 26 Apr 2022 10:30:38 +0000 (12:30 +0200)]
mgr/cephadm: adding logic to close ports when removing a daemon
Fixes: https://tracker.ceph.com/issues/52906
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 4deb546ffd67ac8f05d2788150764a26b5671b87)

Conflicts:
src/pybind/mgr/cephadm/serve.py

3 years agomgr/cephadm: check if a service exists before trying to restart it 46779/head
Redouane Kachach [Tue, 31 May 2022 10:11:03 +0000 (12:11 +0200)]
mgr/cephadm: check if a service exists before trying to restart it
Fixes: https://tracker.ceph.com/issues/55800
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 6b76753c3cabf9663fa1daa47c7bcb7df110a94c)

3 years agomgr/cephadm: capture exception when not able to list upgrade tags 46776/head
Redouane Kachach [Tue, 31 May 2022 10:59:26 +0000 (12:59 +0200)]
mgr/cephadm: capture exception when not able to list upgrade tags
Fixes: https://tracker.ceph.com/issues/55801
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 0e7a4366c0c1edd74d52acad5ed4dc3df0ef7679)

3 years agomgr/rbd_support: always rescan image mirror snapshots on refresh 46778/head
Ilya Dryomov [Sun, 19 Jun 2022 10:12:01 +0000 (12:12 +0200)]
mgr/rbd_support: always rescan image mirror snapshots on refresh

Establishing a watch on rbd_mirroring object and skipping rescanning
image mirror snapshots on periodic refresh unless rbd_mirroring object
gets notified in the interim is flawed.  rbd_mirroring object is
notified when mirroring is enabled or disabled on some image (including
when the image is removed), but it is not notified when images are
promoted or demoted.  However, load_pool_images() discards images that
are not primary at the time of the scan.  If the image is promoted
later, no snapshots are created even if the schedule is in place.  This
happens regardless of whether the schedule is added before or after the
promotion.

This effectively reverts commit 69259c8d3722 ("mgr/rbd_support: make
mirror_snapshot_schedule rescan only updated pools").  An alternative
fix could be to stop discarding non-primary images (i.e. drop

    if not info['primary']:
        continue

check added in commit d39eb283c5ce ("mgr/rbd_support: mirror snapshot
schedule should skip non-primary images")), but that would clutter the
queue and therefore "rbd mirror snapshot schedule status" output with
bogus entries.  Performing a rescan roughly every 60 seconds should be
manageable: currently it amounts to a single mirror_image_status_list
request, followed by mirror_image_get, get_snapcontext and snapshot_get
requests for each snapshot-based mirroring enabled image and concluded
by a single dir_list request.  Among these, per-image get_snapcontext
and snapshot_get requests are necessary for determining primaryness.

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

Conflicts:
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py [ commit
  e4a16e261370 ("mgr/rbd_support: add type annotation") not in
  pacific ]

3 years agomgr/rbd_support: avoid losing a schedule on load vs add race
Ilya Dryomov [Fri, 17 Jun 2022 12:03:20 +0000 (14:03 +0200)]
mgr/rbd_support: avoid losing a schedule on load vs add race

If load_schedules() (i.e. periodic refresh) races with add_schedule()
invoked by the user for a fresh image, that image's schedule may get
lost until the next rebuild (not refresh!) of the queue:

1. periodic refresh invokes load_schedules()
2. load_schedules() creates a new Schedules instance and loads
   schedules from rbd_mirror_snapshot_schedule object
3. add_schedule() is invoked for a new image (an image that isn't
   present in self.images) by the user
4. before load_schedules() can grab self.lock, add_schedule() commits
   the new schedule to rbd_mirror_snapshot_schedule object and adds it
   to self.schedules
5. load_schedules() grabs self.lock and reassigns self.schedules with
   Schedules instance that is now stale
6. periodic refresh invokes load_pool_images() which discovers the new
   image; eventually it is added to self.images
7. periodic refresh invokes refresh_queue() which attempts to enqueue()
   the new image; this fails because a matching schedule isn't present

The next periodic refresh recovers the discarded schedule from
rbd_mirror_snapshot_schedule object but no attempt to enqueue() that
image is made since it is already "known" at that point.  Despite the
schedule being in place, no snapshots are created until the queue is
rebuilt from scratch or rbd_support module is reloaded.

To fix that, extend self.lock critical sections so that add_schedule()
and remove_schedule() can't get stepped on by load_schedules().

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

Conflicts:
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py [ commit
  e4a16e261370 ("mgr/rbd_support: add type annotation") not in
  pacific ]
src/pybind/mgr/rbd_support/trash_purge_schedule.py [ ditto ]

3 years agomgr/rbd_support: refresh schedule queue immediately after delay elapses
Ilya Dryomov [Fri, 17 Jun 2022 08:28:55 +0000 (10:28 +0200)]
mgr/rbd_support: refresh schedule queue immediately after delay elapses

The existing logic often leads to refresh_pools() and refresh_images()
being invoked after a 120 second delay instead of after an intended 60
second delay.

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

Conflicts:
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py [ commit
  e4a16e261370 ("mgr/rbd_support: add type annotation") not in
  pacific ]
src/pybind/mgr/rbd_support/trash_purge_schedule.py [ ditto ]

3 years agomgr/rbd_support: bail from refresh_pools() when there is no schedule
Ilya Dryomov [Thu, 16 Jun 2022 17:23:58 +0000 (19:23 +0200)]
mgr/rbd_support: bail from refresh_pools() when there is no schedule

Make refresh_pools() behave the same as refresh_images().

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

Conflicts:
src/pybind/mgr/rbd_support/trash_purge_schedule.py [ commit
  e4a16e261370 ("mgr/rbd_support: add type annotation") not in
  pacific ]

3 years agomgr/rbd_support: add logs for when there is no schedule and for descheduling
Ilya Dryomov [Thu, 16 Jun 2022 17:10:32 +0000 (19:10 +0200)]
mgr/rbd_support: add logs for when there is no schedule and for descheduling

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

Conflicts:
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py [ commit
  e4a16e261370 ("mgr/rbd_support: add type annotation") not in
  pacific ]
src/pybind/mgr/rbd_support/trash_purge_schedule.py [ ditto ]

3 years agomgr/rbd_support: disambiguate mirror snapshot and trash purge schedule logs
Ilya Dryomov [Thu, 16 Jun 2022 16:15:26 +0000 (18:15 +0200)]
mgr/rbd_support: disambiguate mirror snapshot and trash purge schedule logs

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

Conflicts:
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py [ commit
  e4a16e261370 ("mgr/rbd_support: add type annotation") not in
  pacific ]
src/pybind/mgr/rbd_support/trash_purge_schedule.py [ ditto ]

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

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

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

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

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

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

pacific: doc: add disk benchmarking and cache recommendations

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

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

Reviewed-by: Laura Flores <lflores@redhat.com>