]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agocephadm: updates to cephadm configuration and runtime behaviour
Paul Cuzner [Thu, 26 Nov 2020 00:02:54 +0000 (13:02 +1300)]
cephadm: updates to cephadm configuration and runtime behaviour

Multiple changes based on PR feedback
- invocation of set-exporter-config now sets all paramters
- customvalidation of exporter-config now throws
argparse exceptions
- config validation now checks for SSL crt/key format
- failing threads are now caught and change the http
response to the caller (500, and 503 may not be returned)
- bootstrap options descriptions tidied up

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: Handle exporter config in a dedicated class
Paul Cuzner [Wed, 25 Nov 2020 23:52:47 +0000 (12:52 +1300)]
cephadm: Handle exporter config in a dedicated class

Several changes related to feedback during review
- repositioned stdlib imports
- added an exporterconfig class to handle config interactions
- service prepare and create simplified due to new class

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: remove unused variable
Paul Cuzner [Tue, 17 Nov 2020 22:23:43 +0000 (11:23 +1300)]
cephadm: remove unused variable

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: tests - updated to include cephadm-exporter
Paul Cuzner [Tue, 17 Nov 2020 20:57:17 +0000 (09:57 +1300)]
cephadm: tests - updated to include cephadm-exporter

Main unit tests now includes daemon and service
deployments for cephadm-exporter.

In addition, the assert_rm_daemon function has been
tweaked, to avoid problems with services that contain
'-' during fnmatch invocations. Service names that use
'-' could result in "bad character range" exceptions from
the re module, it can be treated like a range separator.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: tests - add cephadm-exporter to service check
Paul Cuzner [Tue, 17 Nov 2020 20:39:03 +0000 (09:39 +1300)]
cephadm: tests - add cephadm-exporter to service check

Add cephadm-exporter service, and confirm the instance
doesn't contain ceph methods like get_auth_entity (same
approach as taken for the monitoring stack)

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: tests - add cephadm to the spec checks
Paul Cuzner [Tue, 17 Nov 2020 20:35:10 +0000 (09:35 +1300)]
cephadm: tests - add cephadm to the spec checks

Adds cephadm-exporter to the servicespec checks

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: add cephadm-exporter
Paul Cuzner [Tue, 17 Nov 2020 20:34:27 +0000 (09:34 +1300)]
cephadm: add cephadm-exporter

Adds the exporter apply call

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: tests - add mock for the exporter deployment
Paul Cuzner [Tue, 17 Nov 2020 20:32:34 +0000 (09:32 +1300)]
cephadm: tests - add mock for the exporter deployment

Adds a mock function to represent the cephadm binary
deployment method

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: update the exporter class to apply defaults
Paul Cuzner [Tue, 17 Nov 2020 20:31:03 +0000 (09:31 +1300)]
cephadm: update the exporter class to apply defaults

Use defaults during prepare and generate phases to
reduce user interaction, and simplify the workflow for
unit tests.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: file copy moved to seperate method
Paul Cuzner [Tue, 17 Nov 2020 20:29:14 +0000 (09:29 +1300)]
cephadm: file copy moved to seperate method

Moving to a separate method, means the copy can be
mocked out within the unit tests.

In addition, the the generate_config call has been removed
from the add_cephadm_exporter since it's not needed.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: add unit tests case for TLS
Paul Cuzner [Mon, 16 Nov 2020 00:46:44 +0000 (13:46 +1300)]
cephadm: add unit tests case for TLS

Adds tests to validate creation, and verification of
crt and key files

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: edd exporter support to mgr/cephadm
Paul Cuzner [Thu, 12 Nov 2020 02:55:38 +0000 (15:55 +1300)]
cephadm: edd exporter support to mgr/cephadm

Several changes to introduce support for the exporter
1. new commands for generating/managing the config
settings required;
- generate-exporter-config (defaults)
- get-exporter-config
- clear-exporter-config
- set-exporter-config token/port
- set-exporter-tls (crt/key)

2. exporter is not a container, so a patch is added to the
run_cephadm method to 'tolerate' cephadm-exporter
daemons

3. the purge method is called on removal of a service. This has a default do-nothing response in CephService, but in
the CephadmExporter service, purge will remove it's config
from the mon store

4. during deploy (_create_daemon) a new remoto call to copy
the cephadm binary to the target is needed - prior to
invoking the deploy request

5. Default placement for the exporter is *, so by default once
the service is created, exporter daemons will appear on all
cluster nodes

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: updated binary to integrate the exporter
Paul Cuzner [Thu, 12 Nov 2020 02:43:39 +0000 (15:43 +1300)]
cephadm: updated binary to integrate the exporter

Calling the deploy from orch (stdin) forced changes to the
way the parameters are read, and how the validation of the
config is done. In addition the bootstrap has a couple of new
parameters to allow the exporter to be deployed
automatically (in future!). This patch is a first step with
--with-exporter,but without this parm, there are no changes,
In addition, since deployment needs cephadm commands the
full deployment will be enabled in a follow up PR (once the
new commands are merged in the mgr/cephadm!)

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: add cephadm-exporter and service purge 'hook'
Paul Cuzner [Thu, 12 Nov 2020 02:33:58 +0000 (15:33 +1300)]
cephadm: add cephadm-exporter and service purge 'hook'

Adds a class for the cephadm-exporter that handles the
prepare and generate_config calls. Since the exporter uses
TLS, prepare validates the the crt/key and generate_config
pulls the ssl settings from the store returning a valid config
that the deploy process can consume.

In addition a purge method has been added to the default cephservice class, that by default does nothing. In
CephadmExporter class a purge method is provided which
deletes the variables in the mon store used by the exporter.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: add cephadm-exporter to deployment cmds
Paul Cuzner [Thu, 12 Nov 2020 02:27:50 +0000 (15:27 +1300)]
cephadm: add cephadm-exporter to deployment cmds

Add cephadm-exporter to the daemon add and apply
subcommands

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: add cephadm-exporter to service types
Paul Cuzner [Thu, 12 Nov 2020 02:25:35 +0000 (15:25 +1300)]
cephadm: add cephadm-exporter to service types

Adds the cephadm-exporter as one of the known
service types to permit deployment.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: add entrypoints for the exporter
Paul Cuzner [Thu, 12 Nov 2020 02:24:31 +0000 (15:24 +1300)]
cephadm: add entrypoints for the exporter

Add dummy entry points for the cephadm-exporter and
fix some errnoneous method docstrings

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: remove the exporter from QA tests
Paul Cuzner [Thu, 12 Nov 2020 02:22:53 +0000 (15:22 +1300)]
cephadm: remove the exporter from QA tests

removing the tests from the script since the exporter
needs to issue cephadm commands that will fail until
the changes in mgr/cephadm are merged.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agoMerge branch 'master' into cephadm-exporter
pcuzner [Tue, 3 Nov 2020 21:46:53 +0000 (10:46 +1300)]
Merge branch 'master' into cephadm-exporter

4 years agocephadm: update self-signed cert generation
Paul Cuzner [Tue, 3 Nov 2020 21:35:25 +0000 (10:35 +1300)]
cephadm: update self-signed cert generation

Generating a self-signed cert patched to accept a
DNAME dictionary. This allows features like the cephadm
exporter to generate a crt/key pair that doesn't use CN
to make the same crt usable across multiple hosts.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agocephadm: rebase patch
Paul Cuzner [Tue, 3 Nov 2020 21:34:49 +0000 (10:34 +1300)]
cephadm: rebase patch

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agoMerge PR #37825 into master
Patrick Donnelly [Tue, 3 Nov 2020 21:06:12 +0000 (13:06 -0800)]
Merge PR #37825 into master

* refs/pull/37825/head:
doc: document MDS cache configuration
test: add DecayCounter test

Reviewed-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
4 years agoMerge PR #37923 into master
Patrick Donnelly [Tue, 3 Nov 2020 20:54:16 +0000 (12:54 -0800)]
Merge PR #37923 into master

* refs/pull/37923/head:
client: increment file position on _read_sync near eof

Reviewed-by: Jeff Layton <jlayton@redhat.com>
4 years agoMerge pull request #37737 from votdev/issue_47926_orch_status
Lenz Grimmer [Tue, 3 Nov 2020 12:57:51 +0000 (13:57 +0100)]
Merge pull request #37737 from votdev/issue_47926_orch_status

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
4 years agoMerge pull request #37757 from votdev/issue_47884_display_time
Lenz Grimmer [Tue, 3 Nov 2020 08:30:52 +0000 (09:30 +0100)]
Merge pull request #37757 from votdev/issue_47884_display_time

mgr/dashboard: displaying time in human-readable format

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #37827 from dillaman/wip-librbd-migration-2
Mykola Golub [Tue, 3 Nov 2020 07:30:18 +0000 (09:30 +0200)]
Merge pull request #37827 from dillaman/wip-librbd-migration-2

librbd: added API and CLI support for source-spec import migrations

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoMerge pull request #37829 from liu-chunmei/seastore-extentmap-fix
Kefu Chai [Tue, 3 Nov 2020 01:22:08 +0000 (09:22 +0800)]
Merge pull request #37829 from liu-chunmei/seastore-extentmap-fix

crimson/seastore: add Extentmap node type in cache.cc

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agodoc/man: add new RBD migration prepare source-spec optionals 37827/head
Jason Dillaman [Sun, 1 Nov 2020 14:44:59 +0000 (09:44 -0500)]
doc/man: add new RBD migration prepare source-spec optionals

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agoqa/suite/rbd: simple migration import test case
Jason Dillaman [Mon, 26 Oct 2020 18:47:17 +0000 (14:47 -0400)]
qa/suite/rbd: simple migration import test case

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agoqa/tasks: support explicit disk configuration for qemu task
Jason Dillaman [Fri, 23 Oct 2020 18:31:36 +0000 (14:31 -0400)]
qa/tasks: support explicit disk configuration for qemu task

The 'disks' key will now be treated as a dictionary where all previous
global settings can be individually applied. Additionally, a disk can be
pre-created and provided for use by qemu.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agorbd: add new 'migration prepare --import-only' CLI optional
Jason Dillaman [Wed, 21 Oct 2020 18:29:15 +0000 (14:29 -0400)]
rbd: add new 'migration prepare --import-only' CLI optional

The '--import-only' optional can be combined with either a
'--source-spec' or '--source-spec-path' optional to define
the source for the read-only import.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37872 from theanalyst/doc/releases/v14.2.13
Josh Durgin [Mon, 2 Nov 2020 23:58:56 +0000 (15:58 -0800)]
Merge pull request #37872 from theanalyst/doc/releases/v14.2.13

doc: releases: v14.2.13 release notes

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
4 years agoclient: increment file position on _read_sync near eof 37923/head
Patrick Donnelly [Mon, 2 Nov 2020 20:01:29 +0000 (12:01 -0800)]
client: increment file position on _read_sync near eof

Fixes: https://tracker.ceph.com/issues/48076
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agocrimson/seastore: add replay test for extent map tree 37829/head
chunmei-liu [Wed, 28 Oct 2020 00:01:37 +0000 (17:01 -0700)]
crimson/seastore: add replay test for extent map tree

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
4 years agoMerge pull request #37287 from pcuzner/dashboard-goals
Lenz Grimmer [Mon, 2 Nov 2020 18:27:40 +0000 (19:27 +0100)]
Merge pull request #37287 from pcuzner/dashboard-goals

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agoMerge PR #37878 into master
Patrick Donnelly [Mon, 2 Nov 2020 17:00:09 +0000 (09:00 -0800)]
Merge PR #37878 into master

* refs/pull/37878/head:
doc/mgr/orchestrator: Update about "{mds, rgw} add" status in rook

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Travis Nielsen <tnielsen@redhat.com>
4 years agoMerge PR #37732 into master
Patrick Donnelly [Mon, 2 Nov 2020 16:24:04 +0000 (08:24 -0800)]
Merge PR #37732 into master

* refs/pull/37732/head:
osdc: restart read on truncate/discard

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agodoc: releases/nautilus: add more changelog entries & fix date 37872/head
Abhishek Lekshmanan [Mon, 2 Nov 2020 15:54:23 +0000 (16:54 +0100)]
doc: releases/nautilus: add more changelog entries & fix date

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
4 years agoMerge pull request #37898 from lxbsz/nbd_reexpandmeta
Mykola Golub [Mon, 2 Nov 2020 12:53:26 +0000 (14:53 +0200)]
Merge pull request #37898 from lxbsz/nbd_reexpandmeta

rbd-nbd: reexpand the conf meta in child process

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoMerge pull request #37547 from ifed01/wip-ifed-fix-bmap-alloc
Igor Fedotov [Mon, 2 Nov 2020 12:26:04 +0000 (15:26 +0300)]
Merge pull request #37547 from ifed01/wip-ifed-fix-bmap-alloc

os/bluestore: fix segfault on out-of-bound offset provided to  claim_…

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
4 years agoMerge pull request #37879 from tchaikov/wip-seastar-v6
Kefu Chai [Mon, 2 Nov 2020 10:27:54 +0000 (18:27 +0800)]
Merge pull request #37879 from tchaikov/wip-seastar-v6

crimson: use Seastar API v6

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agoMerge pull request #37894 from dillaman/wip-48035 37889/head
Mykola Golub [Mon, 2 Nov 2020 09:02:59 +0000 (11:02 +0200)]
Merge pull request #37894 from dillaman/wip-48035

librbd: global config overrides do not apply to in-use images

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoMerge pull request #37907 from athanatos/sjust/wip-fix-init-weak
Kefu Chai [Mon, 2 Nov 2020 08:38:23 +0000 (16:38 +0800)]
Merge pull request #37907 from athanatos/sjust/wip-fix-init-weak

crimson/os/seastore/.../lba_btree_node_impl: hold reference to *this during lookup

Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os/seastore/.../lba_btree_node_impl: hold reference to *this during lookup 37907/head
Samuel Just [Fri, 30 Oct 2020 21:18:27 +0000 (14:18 -0700)]
crimson/os/seastore/.../lba_btree_node_impl: hold reference to *this during lookup

4f2f4f modified TransactionManager::mount() to use a weak_transaction
while calling init_cached_extents.  This is fine, but lookup() needs
to hold a reference to *this until the child lookup completes in order
to ensure residence in the lba pinning set.

Signed-off-by: Samuel Just <sjust@redhat.com>
4 years agodoc/dev/dashboard: typo fix 37287/head
Paul Cuzner [Mon, 2 Nov 2020 04:50:42 +0000 (17:50 +1300)]
doc/dev/dashboard: typo fix

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agodoc/dev/dashboard: link designs to dev guide
Paul Cuzner [Thu, 22 Oct 2020 23:15:23 +0000 (12:15 +1300)]
doc/dev/dashboard: link designs to dev guide

Add a feature design section to the dashboard dev
guide, linking to the individual docs under dov/dev/dashboard

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agodoc/dev/dashboard: Document key UI design principles
Paul Cuzner [Mon, 21 Sep 2020 21:19:49 +0000 (09:19 +1200)]
doc/dev/dashboard: Document key UI design principles

Document which defines the high level design principles
for the Ceph Dashboard UI

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agoMerge pull request #37590 from pcuzner/prometheus-slow-ops
Kefu Chai [Mon, 2 Nov 2020 03:32:06 +0000 (11:32 +0800)]
Merge pull request #37590 from pcuzner/prometheus-slow-ops

mgr/prometheus: Add SLOW_OPS healthcheck as a metric

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agomgr: add doc to describe relationship to prometheus 37590/head
Paul Cuzner [Thu, 8 Oct 2020 03:35:45 +0000 (16:35 +1300)]
mgr: add doc to describe relationship to prometheus

The healthcheck for slow_ops is used by the mgr/prometheus
module so it's important the alert generated matches the
format expected in mgr/prometheus.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agomgr/prometheus: Add healthcheck metric for SLOW_OPS
Paul Cuzner [Thu, 8 Oct 2020 03:30:56 +0000 (16:30 +1300)]
mgr/prometheus: Add healthcheck metric for SLOW_OPS

SLOW_OPS is triggered by op tracker, and generates a health
alert but healthchecks do not create metrics for prometheus to
use as alert triggers. This change adds SLOW_OPS metric, and
provides a simple means to extend to other relevant health
checks in the future

If the extract of the value from the health check message fails
we log an error and remove the metric from the metric set. In
addition the metric description has changed to better reflect
the scenarios where SLOW_OPS can be triggered.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
4 years agorbd: show migration source spec in image status
Jason Dillaman [Tue, 27 Oct 2020 00:29:57 +0000 (20:29 -0400)]
rbd: show migration source spec in image status

When using the non-legacy mode image migration, the 'rbd status'
command will now show the source-spec for the migration if the
source pool id is invalid.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agorbd: ensure the help printer doesn't print past the end of the line
Jason Dillaman [Wed, 21 Oct 2020 19:15:09 +0000 (15:15 -0400)]
rbd: ensure the help printer doesn't print past the end of the line

When long command names and long optional names are combined,
it's possible for the help text to be printed beyond the 80
character limit.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: replace direct reads from ImageRequest with ImageDispatchSpec
Jason Dillaman [Tue, 27 Oct 2020 18:57:54 +0000 (14:57 -0400)]
librbd: replace direct reads from ImageRequest with ImageDispatchSpec

Read requests will always need to go via the image dispatch layer to
ensure migrations are properly handled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd/migration: allow native v2 images to be opened by name
Jason Dillaman [Fri, 30 Oct 2020 14:27:32 +0000 (10:27 -0400)]
librbd/migration: allow native v2 images to be opened by name

When in import-only mode, allow the source image to be opened by
name in case it's a V2 image format w/o its image id specified in
the JSON.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd/migration: close image if failed to open source
Jason Dillaman [Fri, 30 Oct 2020 14:00:27 +0000 (10:00 -0400)]
librbd/migration: close image if failed to open source

To remain consistent between the native which will automatically close
the ImageCtx if it fails to open the image, the raw format should also
close the ImageCtx.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd/migration: initialize default source image layout
Jason Dillaman [Tue, 27 Oct 2020 15:27:33 +0000 (11:27 -0400)]
librbd/migration: initialize default source image layout

For backing source formats that don't care about the low-level
RBD layout details, provide safe default values for the layout
to ensure that striping logic will still function.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: fix potential recursive lock of ImageCtx::image_lock
Jason Dillaman [Wed, 21 Oct 2020 19:58:20 +0000 (15:58 -0400)]
librbd: fix potential recursive lock of ImageCtx::image_lock

If the "list_snaps" IO call returns immediately, it can result
in an attempted recursive lock starting from CopyupRequest.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: migration execute should allow "EXECUTING" state
Jason Dillaman [Wed, 21 Oct 2020 19:39:34 +0000 (15:39 -0400)]
librbd: migration execute should allow "EXECUTING" state

If the "execute" action was interrupted, we need to be able to
restart it.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: read image size when opening migration raw format
Jason Dillaman [Wed, 21 Oct 2020 19:32:47 +0000 (15:32 -0400)]
librbd: read image size when opening migration raw format

The migration prepare operation will need to know the size of
the source image so that it can create the destination image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd/migration: fix issue with prepare-import and native-format
Jason Dillaman [Tue, 27 Oct 2020 01:25:02 +0000 (21:25 -0400)]
librbd/migration: fix issue with prepare-import and native-format

When preparing an import, the native format can not expect to have
the child image opened since it hasn't been created yet.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: added new 'migration_prepare_import' API methods
Jason Dillaman [Wed, 21 Oct 2020 18:27:38 +0000 (14:27 -0400)]
librbd: added new 'migration_prepare_import' API methods

These related methods accept a JSON-encoded source-spec that
describes how to read from the source image. The migration is
a one-way operation, so children/groups/etc won't be updated
to point to the new destination image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: store migration progress on both source+destination images
Jason Dillaman [Wed, 21 Oct 2020 18:16:57 +0000 (14:16 -0400)]
librbd: store migration progress on both source+destination images

When migrating from an import-only source-spec like an external
file, it will be important to also store the progress on the
destination image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: switch to migration source-spec builder
Jason Dillaman [Tue, 20 Oct 2020 22:45:04 +0000 (18:45 -0400)]
librbd: switch to migration source-spec builder

Remove all the hard-coded references to the NativeFormat
handler and allow the RawFormat+FileStream handlers to be
instantiated.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: switch migration native format to use source-spec JSON object
Jason Dillaman [Tue, 20 Oct 2020 21:46:02 +0000 (17:46 -0400)]
librbd: switch migration native format to use source-spec JSON object

Remove the dependency on the MigrationInfo struct and allow the native
format to directly pull parameters from the JSON-encoded object
structure.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: tweak native-format migration source-spec
Jason Dillaman [Tue, 20 Oct 2020 21:05:30 +0000 (17:05 -0400)]
librbd: tweak native-format migration source-spec

Renamed "format" property to "type" and always include the original
"image_id".

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd/api: ImageCtx must be closed instead of deleted
Jason Dillaman [Tue, 20 Oct 2020 06:55:36 +0000 (02:55 -0400)]
librbd/api: ImageCtx must be closed instead of deleted

On error, the destination image context will need to be properly
closed instead of just deleted.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #36626 from lixiaoy1/rbd_image_discard
Jason Dillaman [Sun, 1 Nov 2020 13:42:01 +0000 (08:42 -0500)]
Merge pull request #36626 from lixiaoy1/rbd_image_discard

librbd/rwl: discard cache

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37870 from xxhdx1985126/wip-crimson-recovery-bug-fixes
Kefu Chai [Sun, 1 Nov 2020 13:23:59 +0000 (21:23 +0800)]
Merge pull request #37870 from xxhdx1985126/wip-crimson-recovery-bug-fixes

crimson: recovery-related bug fixes

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37910 from tchaikov/wip-crimson-osd-send-pg-temp
Kefu Chai [Sun, 1 Nov 2020 13:21:42 +0000 (21:21 +0800)]
Merge pull request #37910 from tchaikov/wip-crimson-osd-send-pg-temp

crimson/osd: merge pg_temp_wanted before sending them

Reviewed-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agoMerge pull request #37656 from yuvalif/allow_lua_to_set_metadata
Yuval Lifshitz [Sun, 1 Nov 2020 10:03:26 +0000 (12:03 +0200)]
Merge pull request #37656 from yuvalif/allow_lua_to_set_metadata

rgw/lua: allow setting metadata via lua

4 years agomgr/dashboard: displaying time in human-readable format 37757/head
Volker Theile [Thu, 22 Oct 2020 09:17:31 +0000 (11:17 +0200)]
mgr/dashboard: displaying time in human-readable format

Fixes: https://tracker.ceph.com/issues/47884
Signed-off-by: Volker Theile <vtheile@suse.com>
4 years agocrimson/osd: merge pg_temp_wanted before sending them 37910/head
Kefu Chai [Sun, 1 Nov 2020 03:23:13 +0000 (11:23 +0800)]
crimson/osd: merge pg_temp_wanted before sending them

there is chance that new pg_temp_wanted is added when we are sending
them in ShardServices::send_pg_temp(), but the pg temp are already
collected into the messages before seastar::parallel_for_each(). so,
we cannot move all elements from pg_temp_wanted to pg_temp_pending after
sending the messages, that'd also move the unsent pg temps to
pg_temp_pending as well. so we have to do this before do the async call,

this issue was root caused by Xuehan Xu <xxhdx1985126@gmail.com>.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: drop ShardServices::_sent_pg_temp()
Kefu Chai [Sun, 1 Nov 2020 03:14:48 +0000 (11:14 +0800)]
crimson/osd: drop ShardServices::_sent_pg_temp()

there is no need to define a wrapper for moving pg_temp_wanted to
pg_temp_pending. and it hurts the readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: report statfs data 37870/head
Xuehan Xu [Sun, 1 Nov 2020 03:30:38 +0000 (11:30 +0800)]
crimson/osd: report statfs data

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agocrimson/osd: rename heartbeat_timer to tick_timer
Xuehan Xu [Sun, 1 Nov 2020 03:29:57 +0000 (11:29 +0800)]
crimson/osd: rename heartbeat_timer to tick_timer

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agocrimson/common: make Gated handle gate_close_exception
Xuehan Xu [Sun, 1 Nov 2020 03:27:52 +0000 (11:27 +0800)]
crimson/common: make Gated handle gate_close_exception

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agocrimson/osd: do not check HAVE_STDLIB_MAP_SPLICING
Kefu Chai [Sun, 1 Nov 2020 03:08:24 +0000 (11:08 +0800)]
crimson/osd: do not check HAVE_STDLIB_MAP_SPLICING

seastar always uses GCC-9 and up, so there is no need to check for
the existence of map::merge() before using it anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: clean up pending_txn when actingset is changed
Xuehan Xu [Tue, 20 Oct 2020 06:52:41 +0000 (14:52 +0800)]
crimson/osd: clean up pending_txn when actingset is changed

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agocrimson/osd: fix pg info statistics error during recovery
Xuehan Xu [Tue, 20 Oct 2020 06:51:30 +0000 (14:51 +0800)]
crimson/osd: fix pg info statistics error during recovery

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agocrimson/osd: make I/O reqs wait for object recovery if it's degraded or backfilling
Xuehan Xu [Tue, 20 Oct 2020 10:21:04 +0000 (18:21 +0800)]
crimson/osd: make I/O reqs wait for object recovery if it's degraded or backfilling

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agoMerge pull request #37327 from kamoltat/wip-mgr-progress-global-event 37427/head
Kefu Chai [Sat, 31 Oct 2020 03:43:27 +0000 (11:43 +0800)]
Merge pull request #37327 from kamoltat/wip-mgr-progress-global-event

mgr/progress: Global Recovery Event in ceph -s

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #37598 from ronen-fr/scrubstore-fix-rf
Kefu Chai [Sat, 31 Oct 2020 03:42:35 +0000 (11:42 +0800)]
Merge pull request #37598 from ronen-fr/scrubstore-fix-rf

osd: fix signatures of get_store_errors() and friends

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-By: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #37751 from changchengx/nasm_avx512
Kefu Chai [Sat, 31 Oct 2020 03:41:19 +0000 (11:41 +0800)]
Merge pull request #37751 from changchengx/nasm_avx512

common: use nasm to build isa-l and isa-l_crypto to prepare for AVX512

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37773 from sunnyku/wip-f33-pyfix
Josh Durgin [Fri, 30 Oct 2020 15:15:59 +0000 (08:15 -0700)]
Merge pull request #37773 from sunnyku/wip-f33-pyfix

do_cmake.sh: use python-3.9 with fedora version 33

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #37789 from trociny/wip-47827
Jason Dillaman [Fri, 30 Oct 2020 13:40:10 +0000 (09:40 -0400)]
Merge pull request #37789 from trociny/wip-47827

mgr/rbd_support: create mirror snapshots asynchronously

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agorgw/lua: use lua exceptions instead of ceph_asserts 37656/head
Yuval Lifshitz [Wed, 28 Oct 2020 16:10:20 +0000 (18:10 +0200)]
rgw/lua: use lua exceptions instead of ceph_asserts

also use lua assert() in uni tests instead of print()
fix bug when accessing user id in an ACL grant

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
4 years agoMerge pull request #37482 from rhcs-dashboard/datatable_click_prevent
Lenz Grimmer [Fri, 30 Oct 2020 08:55:47 +0000 (09:55 +0100)]
Merge pull request #37482 from rhcs-dashboard/datatable_click_prevent

mgr/dashboard: Prevent table items from getting selected while expanding

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agoMerge pull request #35769 from Codom/master
Lenz Grimmer [Fri, 30 Oct 2020 08:50:05 +0000 (09:50 +0100)]
Merge pull request #35769 from Codom/master

mgr/dashboard: Added Versioning to the REST API

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agorgw/lua: allow setting metadata via lua
Yuval Lifshitz [Tue, 13 Oct 2020 16:54:18 +0000 (19:54 +0300)]
rgw/lua: allow setting metadata via lua

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
4 years agoMerge pull request #37788 from tchaikov/wip-zbd
Kefu Chai [Fri, 30 Oct 2020 03:17:56 +0000 (11:17 +0800)]
Merge pull request #37788 from tchaikov/wip-zbd

rpm,cmake: s/WITH_LIBZBD/WITH_ZBD/ and enable ZBD on demand

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-By: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #37888 from tchaikov/wip-crimson-gtest
Kefu Chai [Fri, 30 Oct 2020 02:25:49 +0000 (10:25 +0800)]
Merge pull request #37888 from tchaikov/wip-crimson-gtest

crimson/gtest_seastar: do not keep a copy of argv

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
4 years agoMerge pull request #37891 from tchaikov/wip-cmake-alienstore
Kefu Chai [Fri, 30 Oct 2020 02:25:06 +0000 (10:25 +0800)]
Merge pull request #37891 from tchaikov/wip-cmake-alienstore

cmake: build bluestore-tp before crimson-alienstore

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
4 years agoMerge pull request #37893 from tchaikov/wip-wunused-variable
Kefu Chai [Fri, 30 Oct 2020 02:24:11 +0000 (10:24 +0800)]
Merge pull request #37893 from tchaikov/wip-wunused-variable

osd/osd_types: mark unused variable [[maybe_unused]]

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agorbd-nbd: reexpand the conf meta in child process 37898/head
Xiubo Li [Fri, 30 Oct 2020 02:02:51 +0000 (22:02 -0400)]
rbd-nbd: reexpand the conf meta in child process

Fixed: https://tracker.ceph.com/issues/48046
Signed-off-by: Xiubo Li <xiubli@redhat.com>
4 years agoMerge pull request #37864 from trociny/wip-48020
Jason Dillaman [Fri, 30 Oct 2020 00:58:44 +0000 (20:58 -0400)]
Merge pull request #37864 from trociny/wip-48020

mgr/rbd_support: store global schedule without localized prefix

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37880 from trociny/wip-rbd-finisher-cancel
Jason Dillaman [Fri, 30 Oct 2020 00:58:13 +0000 (20:58 -0400)]
Merge pull request #37880 from trociny/wip-rbd-finisher-cancel

librbd: relax requirements on finisher canceled callback

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agomgr/rbd_support: create mirror snapshots asynchronously 37789/head
Mykola Golub [Wed, 21 Oct 2020 17:07:16 +0000 (18:07 +0100)]
mgr/rbd_support: create mirror snapshots asynchronously

To scale up with number of images.

Fixes: https://tracker.ceph.com/issues/47827
Signed-off-by: Mykola Golub <mgolub@suse.com>
4 years agopybind/rbd: add async mirror image get mode and info methods
Mykola Golub [Mon, 26 Oct 2020 11:09:28 +0000 (11:09 +0000)]
pybind/rbd: add async mirror image get mode and info methods

Signed-off-by: Mykola Golub <mgolub@suse.com>
4 years agolibrbd: add missing declaration of rbd_aio_mirror_image_get_mode
Mykola Golub [Mon, 26 Oct 2020 11:06:09 +0000 (11:06 +0000)]
librbd: add missing declaration of rbd_aio_mirror_image_get_mode

Signed-off-by: Mykola Golub <mgolub@suse.com>
4 years agopybind/rbd: add image async open and close methods
Mykola Golub [Fri, 23 Oct 2020 10:38:21 +0000 (11:38 +0100)]
pybind/rbd: add image async open and close methods

Signed-off-by: Mykola Golub <mgolub@suse.com>