]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 years agorgw/kms/vault - PendingReleaseNotes pointer 40094/head
Marcus Watts [Tue, 2 Mar 2021 04:10:35 +0000 (23:10 -0500)]
rgw/kms/vault - PendingReleaseNotes pointer

The "new" transit logic requires configure changes to be
effective.  Here is a pointer to the revised
documentation for those who already have data encrypted
using the previous version.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 7c3ef90913afa0d8a0c8dbfeecf5026b9c49dc6f)

5 years agorgw/kms/vault - s3tests for both old and new test logic.
Marcus Watts [Tue, 26 Jan 2021 01:49:16 +0000 (20:49 -0500)]
rgw/kms/vault - s3tests for both old and new test logic.

Test both "old" and "new" transit logic with s3tests.  Does not test
migration - that will need to be done separately.  I've added
a "flavor" parameter so the test logic can tell the difference
between the "old" engine and the "new" engine.  The vault
keys creation logic now has options to determine whether
the keys created are exportable (needed for the old transit
engine), or not (should be the case going forward with the
new transit engine.)

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit e8ff0464d4ee2c418a119c03df3d313f3769ffdb)

5 years agorgw/kms/vault - rework unit test logic for new transit logic.
Marcus Watts [Fri, 8 Jan 2021 22:49:20 +0000 (17:49 -0500)]
rgw/kms/vault - rework unit test logic for new transit logic.

The "new" transit logic is organized quite differently
than the old logic, so the existing unit test logic was
very broken.  Additionally, it's possible to test the
input arguments and send_request() has more of them now,
so add logic to verify most of those arguments are correct.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 806a564f53a49586a30ee32d27ec3ab10b015bfa)

5 years agorgw/kms/vault - 0 terminate before rapidjson
Marcus Watts [Fri, 8 Jan 2021 22:43:58 +0000 (17:43 -0500)]
rgw/kms/vault - 0 terminate before rapidjson

bufferlist c_str() doesn't guarantee a trailing nul, which is req'd
by rapidjson.  So, append a nul to make that guarantee explicit.

Also, add an optional "virtual" so unit test logic can override
send_request().

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 30ee3d473bed7318491fc28c7eaa66e8b7633c75)

5 years agorgw/kms/vault - document configuration for new transit logic
Marcus Watts [Tue, 5 Jan 2021 02:22:07 +0000 (21:22 -0500)]
rgw/kms/vault - document configuration for new transit logic

Using the new transit logic requires slightly different configuration.
additionally there is some backwards compatibility support, which
also needed documentation.

The existing description of how to configure hashicorp vault
to work with ceph was also incomplete.  I've fleshed that out a bit,
including considerably more information on how to use configure
and use the vault secret agent with ceph.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit a9edb632a5a8a768b1cbb5fa855aa22246b06c6a)

5 years agorgw/kms/vault - new transit logic - fix compat logic
Marcus Watts [Tue, 5 Jan 2021 02:21:33 +0000 (21:21 -0500)]
rgw/kms/vault - new transit logic - fix compat logic

Teuthology passes in a vault uri that ends in /export/encryption-key/
So: we need to handle (and ignore) trailing slashes when deciding
to enable compatibility support.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit eceb06022c435bfed0edde32ffb7297d55f7c252)

5 years agorgw/kms/vault - define attribute for new transit logic
Marcus Watts [Sat, 12 Dec 2020 19:09:44 +0000 (14:09 -0500)]
rgw/kms/vault - define attribute for new transit logic

For the new transit logic; I need to store a wrapped key
per object.  This names that attribute on the rados object.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit ea72d0daaa88cdf944e34867afee8b03a19f832e)

5 years agorgw/kms/vault - "compat" option
Marcus Watts [Tue, 8 Dec 2020 23:09:04 +0000 (18:09 -0500)]
rgw/kms/vault - "compat" option

For transit engine:
"compat" option: 0=new only, 1=old & new, 2=old only.
This is just the option parsing itself: not the actual logic
for make_key | reconstitute_key.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit c190b741f88dc5e2e864c6a43689a444cc929123)

5 years agorgw/kms/vault - encryption context - first part
Marcus Watts [Mon, 7 Dec 2020 22:55:22 +0000 (17:55 -0500)]
rgw/kms/vault - encryption context - first part

This includes the logic to process the user provided
encryption context, turn it into "canonical json", and
to add in a default arn if it's not present.

Also present here is the start of logic to distinguish
between "prepare_encrypt" and "prepare_decrypt" at a lower
level; as "make_key" and "reconstitute_key" these will be
the functions that separately create a new datakey using
the vault transit operation, and to retrieve a previously
stored datakey.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit abcf87dc52ad46a23bd4b2bca56a0af807bcf770)

5 years agorgw/kms/vault - define attribute to store encryption context
Marcus Watts [Mon, 7 Dec 2020 22:53:05 +0000 (17:53 -0500)]
rgw/kms/vault - define attribute to store encryption context

For rgw sse:kms use, the aws s3 standard provides an attribute
to store the base-64 encoded canonical json "encryption context".
This should be used to vary the per-object keys used for the
actual object encryption.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 2ea143711430cb76c55479fdfbf7ba02d1fd80fb)

5 years agorgw/kms/vault - share get/set attr between rgw_crypt.cc and rgw_kms.cc
Marcus Watts [Mon, 7 Dec 2020 22:48:31 +0000 (17:48 -0500)]
rgw/kms/vault - share get/set attr between rgw_crypt.cc and rgw_kms.cc

In order to pass down and manage "attrs" from crypt logic to kms
logic, it's necessary to share the functions that can get and
set strings in that structure.  Eventually, I plan to have
the various engines store and retrieve a per-object "datakey" that
is encrypted (wrapped) by the named kms key.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 89959fb1946c82e48144ba29f9587932730c396b)

5 years agorgw/kms/vault - relax configuration parsing for rgw_crypt_vault_secret_engine
Marcus Watts [Mon, 7 Dec 2020 22:28:59 +0000 (17:28 -0500)]
rgw/kms/vault - relax configuration parsing for rgw_crypt_vault_secret_engine

To better manage forwards and backwards compatibility when using vault
transit for rgw object encryption (sse:kms); it is desirable to provide
parameters to control how this works.  It was more attractive to overload
the existing rgw_crypt_vault_secret_engine parameter for this purpose
than to invent one or more all-new parameters.

Additionally, the enum support in the configuration parser looks like
it ought to have helpful syntax checking functionality.  This is not so;
failure to provide a supported enum results in silently replacing that
with the default option, resulting in confusing and non-obvious behavior
that is not at all helpful.

This change removes the enum constraint on rgw_crypt_vault_secret_engine,
allowing for more useful messages from the rgw code, and the possibility
to also provide additional information on the same line.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 845dd67b3d0b5ee297171bba437797a18e8711ee)

5 years agorgw/kms/vault - need libicu to make canonical json for encryption contexts.
Marcus Watts [Mon, 7 Dec 2020 22:20:49 +0000 (17:20 -0500)]
rgw/kms/vault - need libicu to make canonical json for encryption contexts.

for encryption, aws s3 provides an "encryption" context to vary per-object
keys.  The encryption context is a base64 encoded json structure, which
must be converted to a determinstic form -- "canonical json".  This
requires converting all strings to a normalized canonical form: "utf-8 nfc",
it also requires thta keys in objects be sorted in a fixed order; so some
form of sorting based on nfc.

It turns out that libicu was the best way to produce utf-8 nfc (boost also
provides a mechanism, but it has many quirks).  So, here are the hooks
to pull the system libicu into the build.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 8afd92425b69c7556bda040c02833d3a4a39210d)

5 years agorgw/kms/kmip - document configuration for a new feature: kmip kms 40096/head
Marcus Watts [Wed, 3 Feb 2021 19:26:46 +0000 (14:26 -0500)]
rgw/kms/kmip - document configuration for a new feature: kmip kms

I've written up a brief description of using kmip
with ceph.  Major features:
* ceph configuration.
* making keys with a "paste-in" python script.
* pointers to PyKMIP and IBM SKLM.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 891bf1a6223bb2ba6be46096bd0d626eb46baa11)

5 years agorgw/kms/kmip - rgw / kmip test integration.
Marcus Watts [Wed, 18 Nov 2020 19:37:31 +0000 (14:37 -0500)]
rgw/kms/kmip - rgw / kmip test integration.

Actually add kmip to the kms crypt suite.

This also makes some ssl certs which is required for use of kmip.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 809677d991abeb5b0aa8b764862a666c0d126c7b)

5 years agorgw/kms/kmip - rgw / kmip test integration.
Marcus Watts [Thu, 12 Nov 2020 03:38:18 +0000 (22:38 -0500)]
rgw/kms/kmip - rgw / kmip test integration.

s3tests needs to know key names in order to run kms tests.
It seems desirable to have s3tests default to discovering
the names that were created by the pykmip task, and that
if there is more than one rgw connected to more than one
pykmip, that names belonging to the appropriate pykmip
instance should be used.

This logic does the following:
rgw task: save pykmip role name.
s3tests task: set kms_key (and kms_keyid2) to
these in order of priority
1 s3tests client task property ['kms_key'] (or ['kms_key2'])
2 first (second) secret created in the matching pykmip instance.
3 testkey-1 (testkey-2)

For case 2, names from the secrets have an initial "token-" stripped from them.
The assumption here is that rgw is being run with a setting such as
rgw crypt kmip kms key template: pykmip-$keyid
therefore "pykmip-" will be prefixed back onto the key before use.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 096cdfaee3caa126260e0c30f2578e4a5ced331d)

5 years agorgw/kms/kmip - rgw / kmip test integration.
Marcus Watts [Tue, 3 Nov 2020 23:17:28 +0000 (18:17 -0500)]
rgw/kms/kmip - rgw / kmip test integration.

Pass endpoint configuration from pykmip to radosgw at runtime.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 7105fa6cfe1853edd84fc53acfacf48c40c040ca)

5 years agorgw/kms/kmip - correct documentation.
Marcus Watts [Thu, 29 Oct 2020 16:04:36 +0000 (12:04 -0400)]
rgw/kms/kmip - correct documentation.

The pykmip task should be after ceph, and before rgw.

kmip needs ssl certs in order to function correctly.
Because the openssl_keys task has an indeterminate
order of execution, it is best to create the ca as
a separate task.  The ca can be shared with rgw, but
real life deployments of kmip are likely to have their
own CA.

In order to create kmip secrets, a client certificate
is necessary, so must be supplied to the pykmip task.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 4e04dc1d2ed7db5dd47da9fd521b4e8054505683)

5 years agorgw/kms/kmip - pykmip.py needs to make keys too.
Marcus Watts [Thu, 29 Oct 2020 03:40:58 +0000 (23:40 -0400)]
rgw/kms/kmip - pykmip.py needs to make keys too.

The logic to deploy pykmip in teuthology was not complete.
The necessary logic to add kmip keys was missing.

Existing logic for other key services providers could use rest based
protocols directly from the teuthology host.  For kmip, it is necessary
to use a special protocol, and it is more convenient to run this directly
on the pykmip server.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit ef294fea7e4f37f357cf5ffc699a42ebdb3ca429)

5 years agorgw/kms/kmip - pykmip.py should actually run pykmip.
Marcus Watts [Tue, 27 Oct 2020 21:16:14 +0000 (17:16 -0400)]
rgw/kms/kmip - pykmip.py should actually run pykmip.

The logic to deploy pykmip in teuthology was not complete.
While it deployed all the code and certs to run pykmip,
it didn't actually run it.  This commit fixes that.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 1e457c5b58d09ffa5bf88e0e0c247454d38a2480)

5 years agorgw/kms/kmip - python3 changes for testing.
Marcus Watts [Fri, 23 Oct 2020 23:07:09 +0000 (19:07 -0400)]
rgw/kms/kmip - python3 changes for testing.

python3 requires different imports and there's a different
way to get at the first element in a view.
This is to match changes introduced in the rest of ceph in these
commits: 24e7acc261a4 d7258ea7fdcd

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 70d95ee6adbf373784292576ec33d7ffd2f39f83)

5 years agorgw/kms/kmip - string handling cleanup.
Marcus Watts [Thu, 22 Oct 2020 05:31:05 +0000 (01:31 -0400)]
rgw/kms/kmip - string handling cleanup.

Use string::data and string_view to clean up some string handling,
as suggested by reviewers.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 0d46a623bbd0dcbb6ebf85a641f23192a5514844)

5 years agoteuthology/rgw: pykmip task
Marcus Watts [Sun, 1 Mar 2020 06:44:14 +0000 (01:44 -0500)]
teuthology/rgw: pykmip task

Configure and run a simple pykmip daemon,
similar in concept to barbican | vault.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit c7afcbd2f87a7557ecf48e46c09842df4c492fd9)

5 years agokmip: first pass at implementation logic.
Marcus Watts [Sun, 16 Feb 2020 02:08:29 +0000 (21:08 -0500)]
kmip: first pass at implementation logic.

This implements SSE-KMS for the radosgw using kmip.
This uses symmetric raw keys with a name attribute in kmip,
so providing the same functionality as the "kv" key store
in hashicorp vault.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 0430ff7f9bee9ba88ba7f8dad1592e4bfbc2cc4d)

5 years agokmip: configuration options.
Marcus Watts [Wed, 12 Feb 2020 10:58:31 +0000 (05:58 -0500)]
kmip: configuration options.

First pass at configuration configuration for kmip.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 480431015a11229da56b9b7c69f5f8cb863300b0)

5 years agoIncluding cmake build logic inside of libkmip.
Marcus Watts [Wed, 12 Feb 2020 10:57:46 +0000 (05:57 -0500)]
Including cmake build logic inside of libkmip.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 4dee60339de02823dbb2f8684e26728704dda6c7)

5 years agocmake glue to build libkmip.
Marcus Watts [Wed, 12 Feb 2020 10:55:40 +0000 (05:55 -0500)]
cmake glue to build libkmip.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 3ba138490655f9645c87285a8ceea27d37b63ed3)

5 years agoAdded libkmip as a submodule.
Marcus Watts [Wed, 12 Feb 2020 10:54:36 +0000 (05:54 -0500)]
Added libkmip as a submodule.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit bb72f10f86908f8089667f4bcedda5db3e226756)

5 years agoMerge pull request #39921 from neha-ojha/wip-revert-autoscaler-pacific
Yuri Weinstein [Tue, 9 Mar 2021 23:58:59 +0000 (15:58 -0800)]
Merge pull request #39921 from neha-ojha/wip-revert-autoscaler-pacific

pacific: Revert "mgr/pg_autoscaler: avoid scale-down until there is pressure"

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kamoltat (Junior) Sirivadhna <ksirivad@redhat.com>
5 years agoMerge pull request #39844 from neha-ojha/wip-49565-pacific
Yuri Weinstein [Tue, 9 Mar 2021 23:57:38 +0000 (15:57 -0800)]
Merge pull request #39844 from neha-ojha/wip-49565-pacific

pacific: tests: ceph_test_rados_api_watch_notify: Allow for reconnect

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
5 years agoMerge pull request #39901 from tchaikov/pr-39461-pacific
Yuri Weinstein [Tue, 9 Mar 2021 17:35:48 +0000 (09:35 -0800)]
Merge pull request #39901 from tchaikov/pr-39461-pacific

pacific: rgw/test: allow for duplicate events in pubsub

Reviewed-by: Yuval Lifshitz <yuvalif@yahoo.com>
5 years agoMerge pull request #39829 from smithfarm/wip-49593-pacific
Yuri Weinstein [Tue, 9 Mar 2021 16:11:44 +0000 (08:11 -0800)]
Merge pull request #39829 from smithfarm/wip-49593-pacific

pacific: rpm: use PMDK system libraries on SUSE

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agoMerge pull request #39925 from tchaikov/pacific-github-workflow-milestone
Kefu Chai [Tue, 9 Mar 2021 09:21:03 +0000 (17:21 +0800)]
Merge pull request #39925 from tchaikov/pacific-github-workflow-milestone

pacific: .github: add workflow for adding milestone

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
5 years ago.github/workflows: use a released sha1 39925/head
Kefu Chai [Tue, 9 Mar 2021 04:16:26 +0000 (12:16 +0800)]
.github/workflows: use a released sha1

otherwise the action cannot be found

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

5 years ago.github/workflows: rename labeler.yml to pr-triage.yml
Kefu Chai [Mon, 8 Mar 2021 18:46:46 +0000 (02:46 +0800)]
.github/workflows: rename labeler.yml to pr-triage.yml

to reflect the change in the actions in it.

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

5 years ago.github/workflows: use @{sha1} for actions
Kefu Chai [Mon, 8 Mar 2021 18:26:34 +0000 (02:26 +0800)]
.github/workflows: use @{sha1} for actions

more secure this way. see also https://julienrenaux.fr/2019/12/20/github-actions-security-risk/

point the sha1 to

* labeler@v3
* milestone@main HEAD

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

5 years ago.github/workflows: move milestone.yml into labeler.yml
Kefu Chai [Sun, 7 Mar 2021 11:21:25 +0000 (19:21 +0800)]
.github/workflows: move milestone.yml into labeler.yml

no need to have two actions triggered by the same event.

we could backport this labeler.yml to LTS branches.

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

5 years ago.github: correct the regex in mileston workflow
Kefu Chai [Sat, 6 Mar 2021 16:32:42 +0000 (00:32 +0800)]
.github: correct the regex in mileston workflow

also use pull_request_target event so the action is run in the
context of the base of the pull request. this helps us to overcome
the "Resource not accessible by integration" issue where the action
is run in the context of the pull request.

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

5 years ago.github: add workflow for adding milestone
Kefu Chai [Sat, 6 Mar 2021 13:18:13 +0000 (21:18 +0800)]
.github: add workflow for adding milestone

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

5 years agoRevert "mgr/pg_autoscaler: avoid scale-down until there is pressure" 39921/head
Neha Ojha [Mon, 8 Mar 2021 17:16:15 +0000 (17:16 +0000)]
Revert "mgr/pg_autoscaler: avoid scale-down until there is pressure"

This reverts commit de2a4684ea2e8719cc18a70d9f4be9715e409264.

Signed-off-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #39741 from tchaikov/pacific-49502
Yuri Weinstein [Mon, 8 Mar 2021 16:08:30 +0000 (08:08 -0800)]
Merge pull request #39741 from tchaikov/pacific-49502

pacific: mgr/rbd_support: bail out if snapshot mirroring is not enabled

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
5 years agoMerge PR #39856 into pacific
Sage Weil [Mon, 8 Mar 2021 15:42:59 +0000 (09:42 -0600)]
Merge PR #39856 into pacific

* refs/pull/39856/head:
qa/distro/ubuntu_20.04_podman: Avoid getting asked
qa/suites/rados/cephadm: drop centos/rhel cephadm tests for the moment
qa/sites/rados/cephadm/thrash: rename 3-tasks.yaml/ -> 3-tasks/
qa/suites/rados/cephadm: adjust distros
qa/suites/upgrade: use kubic; test all distros
qa/suites/rados/cephadm/upgrade: use kubic on centos
qa: new kubic distro files; use kubic podman for centos/rhel
qa/suites/rados/cephadm: Add 20.04 podman:testing

Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agocmake: make the linkage to pmem::pmemobj public 39829/head
Kefu Chai [Sat, 6 Mar 2021 07:43:33 +0000 (15:43 +0800)]
cmake: make the linkage to pmem::pmemobj public

tools/ceph-dencoder/rbd_types.cc includes Types.h which in turn includes
libpmemobj.h via librbd/cache/pwl/Types.h. and ceph-dencoder pulls in the
rbd_type.cc's linked libraries by linking against rbd_types. but before
this change, rbd_types links against pmem::pmemobj as a PRIVATE library.

so, if we want to pull in rbd_types linkage we should always link
rbd_types as a PUBLIC library. as rbd_types include libpmemobj.h in its
header file.

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

5 years agocmake: link libpmemobj against libpmem
Kefu Chai [Sat, 6 Mar 2021 04:22:39 +0000 (12:22 +0800)]
cmake: link libpmemobj against libpmem

libpmemobj should link against libpmem, but, in CMake, imported library
does not allow PRIVATE linkage. so pmem::pmem is added to the list of
INTERFACE_LINK_LIBRARIES.

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

5 years agocmake: support COMPONENTS param in Findpmem.cmake
Kefu Chai [Fri, 5 Mar 2021 06:04:23 +0000 (14:04 +0800)]
cmake: support COMPONENTS param in Findpmem.cmake

add two components: pmem and pmemobj to this package. so we can find
them and link against them in a more intuitive way.

before this change the COMPONENTS parameter passed to

find_package(pmem ...)

is dropped on the floor and ignored.

after this change, it is checked and taken into consideration.

also, in this change, the exposed variables are renamed from

PMEM_* to pmem_*

to be consistent with the package name. it's encouraged to be consistent
with the package name when it comes to the INCLUDE_DIR and LIBRARIES
variable names.

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

5 years agocmake: do not link blk against pmem::pmemobj
Kefu Chai [Fri, 5 Mar 2021 13:15:59 +0000 (21:15 +0800)]
cmake: do not link blk against pmem::pmemobj

as blk does not use pmem::pmemobj, librbd does.

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

5 years agorgw/test: allow for duplicate events in pubsub 39901/head
Yuval Lifshitz [Sun, 14 Feb 2021 15:19:17 +0000 (17:19 +0200)]
rgw/test: allow for duplicate events in pubsub

when tested via radosgw-admin.
also, add verification for the content of the events

Fixes: https://tracker.ceph.com/issues/49261
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit a695cf7e9d8351f67f4ad210a4359e2067769b72)

5 years agoqa/distro/ubuntu_20.04_podman: Avoid getting asked 39856/head
Sebastian Wagner [Mon, 22 Feb 2021 13:58:38 +0000 (14:58 +0100)]
qa/distro/ubuntu_20.04_podman: Avoid getting asked

... for confic changes interactively

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 0defae4e65dee123ee0b8474bf3cb417ddff7eb1)

5 years agoMerge PR #39628 into pacific
Sage Weil [Fri, 5 Mar 2021 20:35:26 +0000 (14:35 -0600)]
Merge PR #39628 into pacific

* refs/pull/39628/head:
mgr/dashboard: set security headers

Reviewed-by: Nizamudeen A <nia@redhat.com>
5 years agoMerge PR #39702 into pacific
Sage Weil [Fri, 5 Mar 2021 20:35:15 +0000 (14:35 -0600)]
Merge PR #39702 into pacific

* refs/pull/39702/head:
mon: simplify fs 'services' view of 'ceph status'
mds: add volumes + status to data: section of 'ceph status'

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #39727 into pacific
Sage Weil [Fri, 5 Mar 2021 20:35:05 +0000 (14:35 -0600)]
Merge PR #39727 into pacific

* refs/pull/39727/head:
mgr/telemetry: check if 'ident' channel is active
qa/tasks/mgr/dashboard: identify cluster in telemetry test

Reviewed-by: Yaarit Hatuka <yaarithatuka@gmail.com>
5 years agoMerge PR #39788 into pacific
Sage Weil [Fri, 5 Mar 2021 20:34:51 +0000 (14:34 -0600)]
Merge PR #39788 into pacific

* refs/pull/39788/head:
mon/ConfigMonitor: make config changes via KVMonitor's pending set

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge PR #39805 into pacific
Sage Weil [Fri, 5 Mar 2021 20:34:28 +0000 (14:34 -0600)]
Merge PR #39805 into pacific

* refs/pull/39805/head:
src/global/signal_handler.h: fix preprocessor logic for alpine

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge PR #39811 into pacific
Sage Weil [Fri, 5 Mar 2021 20:34:16 +0000 (14:34 -0600)]
Merge PR #39811 into pacific

* refs/pull/39811/head:
doc/rbd: clarify QCOW2 migration support

Reviewed-by: Mykola Golub <mgolub@suse.com>
5 years agoMerge pull request #39806 from liewegas/pr-39665-pacific
Yuri Weinstein [Fri, 5 Mar 2021 17:16:46 +0000 (09:16 -0800)]
Merge pull request #39806 from liewegas/pr-39665-pacific

pacific: qa/rados/dashbord use "random" objectore

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #39796 from dzafman/wip-48984-pacific
Yuri Weinstein [Fri, 5 Mar 2021 17:16:03 +0000 (09:16 -0800)]
Merge pull request #39796 from dzafman/wip-48984-pacific

pacific: osd: Don't clear m_planned_scrub until scrub finishes successfully

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #39773 from myoungwon/pacific-backport-49482
Yuri Weinstein [Fri, 5 Mar 2021 17:15:32 +0000 (09:15 -0800)]
Merge pull request #39773 from myoungwon/pacific-backport-49482

pacific: osd, test: fix to avoid fail notification when testing manifest refcount

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
5 years agoMerge pull request #39753 from ifed01/wip-ifed-bluefs-zero-read-retry-pac
Yuri Weinstein [Fri, 5 Mar 2021 17:14:46 +0000 (09:14 -0800)]
Merge pull request #39753 from ifed01/wip-ifed-bluefs-zero-read-retry-pac

pacific: os/bluestore: Add option to check BlueFS reads

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
5 years agoMerge pull request #39748 from liewegas/pr-39631-pacific
Yuri Weinstein [Fri, 5 Mar 2021 17:14:20 +0000 (09:14 -0800)]
Merge pull request #39748 from liewegas/pr-39631-pacific

pacific: mon/OSDMonitor: do not mark newly created OSDs OUT

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #39688 from ifed01/wip-ifed-fix-huge-bluefs-writes-pac
Yuri Weinstein [Fri, 5 Mar 2021 17:13:23 +0000 (09:13 -0800)]
Merge pull request #39688 from ifed01/wip-ifed-fix-huge-bluefs-writes-pac

pacific: os/bluestore: fix huge(>4GB) writes from RocksDB to BlueFS.

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoqa/suites/rados/cephadm: drop centos/rhel cephadm tests for the moment
Sage Weil [Thu, 4 Mar 2021 18:33:12 +0000 (12:33 -0600)]
qa/suites/rados/cephadm: drop centos/rhel cephadm tests for the moment

...until we sort out the podman problems!  :( :(

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit e42223c4fc8ca42e03a5721ae5b0bc5362f144ce)

5 years agoqa/sites/rados/cephadm/thrash: rename 3-tasks.yaml/ -> 3-tasks/
Sage Weil [Thu, 4 Mar 2021 18:32:27 +0000 (12:32 -0600)]
qa/sites/rados/cephadm/thrash: rename 3-tasks.yaml/ -> 3-tasks/

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 5f5472b7daede39a7bf35bf9135fc4fc75ac5a86)

5 years agoqa/suites/rados/cephadm: adjust distros
Sage Weil [Thu, 4 Mar 2021 18:32:00 +0000 (12:32 -0600)]
qa/suites/rados/cephadm: adjust distros

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 93e77ac3c81b5e6fc363786429b7eee0ac8567c3)

5 years agoqa/suites/upgrade: use kubic; test all distros
Sage Weil [Wed, 3 Mar 2021 14:23:56 +0000 (08:23 -0600)]
qa/suites/upgrade: use kubic; test all distros

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit b378c042296858ec4d1c63a42cd257580ca11c96)

5 years agoqa/suites/rados/cephadm/upgrade: use kubic on centos
Sage Weil [Wed, 3 Mar 2021 14:18:19 +0000 (08:18 -0600)]
qa/suites/rados/cephadm/upgrade: use kubic on centos

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f4de8738ca86b7b31998718b53c8b7659fcdd27f)

5 years agoqa: new kubic distro files; use kubic podman for centos/rhel
Sage Weil [Wed, 3 Mar 2021 14:14:29 +0000 (08:14 -0600)]
qa: new kubic distro files; use kubic podman for centos/rhel

The current centos/rhel version of podman (2.2.1) is broken.

- create new qa/distros/podman/* files that install kubic podman
- include centos/rhel variants
- adjust cephadm jobs to use new yaml files
- remove old qa/distros/all/*_podman.yaml files

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 11beb7287084b56ac7cbd45ac3d28b3d9fa4cc5b)

5 years agoqa/suites/rados/cephadm: Add 20.04 podman:testing
Sebastian Wagner [Thu, 11 Feb 2021 15:01:57 +0000 (16:01 +0100)]
qa/suites/rados/cephadm: Add 20.04 podman:testing

make sure next podman versions aren't breaking cephadm

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 2216350b567102db4ab80dc42dfff9dced2b9740)

5 years agoMerge pull request #39808 from liewegas/pr-39801-pacific
Ernesto Puerta [Fri, 5 Mar 2021 09:20:43 +0000 (10:20 +0100)]
Merge pull request #39808 from liewegas/pr-39801-pacific

pacific: mgr/dashboard: fix issues related with PyJWT versions >=2.0.0

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
5 years agotests: ceph_test_rados_api_watch_notify: Allow for reconnect 39844/head
Brad Hubbard [Mon, 22 Feb 2021 03:28:12 +0000 (13:28 +1000)]
tests: ceph_test_rados_api_watch_notify: Allow for reconnect

An injected socket failure may cause rados_watch_check() to return
ENOENT instead of the expected ENOTCONN.

Fixes: https://tracker.ceph.com/issues/47719
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit 0a03a81f633f11bd3247b2f8f10f719c7b3d38e3)

5 years agoMerge PR #39737 into pacific
Sage Weil [Thu, 4 Mar 2021 21:08:22 +0000 (15:08 -0600)]
Merge PR #39737 into pacific

* refs/pull/39737/head:
mgr/DaemonServer: osd ok-to-stop: return json when there are unknown PGs
doc/man/8/ceph: document --max option
src/test/osd/safe-to-destroy: adjust test
ceph: print command output to stdout even on error
mgr/DaemonServer: include details in 'osd ok-to-stop' output
mgr: add --max <n> to 'osd ok-to-stop' command
mgr: relax osd ok-to-stop condition on degraded pgs

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge pull request #39517 from k0ste/wip-49325-pacific
Ernesto Puerta [Thu, 4 Mar 2021 19:54:58 +0000 (20:54 +0100)]
Merge pull request #39517 from k0ste/wip-49325-pacific

pacific: mgr/dashboard: fix MTU Mismatch alert

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
5 years agoMerge PR #39736 into pacific
Sage Weil [Thu, 4 Mar 2021 18:49:37 +0000 (12:49 -0600)]
Merge PR #39736 into pacific

* refs/pull/39736/head:
crush/CrushWrapper: rebuild shadow tree on 'osd crush reweight-subtree'
crush/CrushWrapper: update shadow trees on update_item()

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge PR #39734 into pacific
Sage Weil [Thu, 4 Mar 2021 18:49:12 +0000 (12:49 -0600)]
Merge PR #39734 into pacific

* refs/pull/39734/head:
mon/PGMap: include the per-pool usage breakdown in pg dump

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge PR #39735 into pacific
Sage Weil [Thu, 4 Mar 2021 18:46:41 +0000 (12:46 -0600)]
Merge PR #39735 into pacific

* refs/pull/39735/head:
mon/OSDMonitor: fix safety/idempotency of {set,rm}-device-class

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
5 years agoMerge PR #39597 into pacific
Sage Weil [Thu, 4 Mar 2021 18:46:18 +0000 (12:46 -0600)]
Merge PR #39597 into pacific

* refs/pull/39597/head:
osd: Don't clear m_planned_scrub until scrub finishes successfully

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
5 years agomgr/DaemonServer: osd ok-to-stop: return json when there are unknown PGs 39737/head
Sage Weil [Thu, 4 Mar 2021 13:35:24 +0000 (08:35 -0500)]
mgr/DaemonServer: osd ok-to-stop: return json when there are unknown PGs

In 791952cc01201010f298033003ba52374cc0159f we switched to return JSON
both on success and fail to describe which PGs are affected or are blocking
the ability to stop/restart OSDs.  Do the same for the case where
some PG states are unknown (i.e., just after a mgr restart) so that
the cephadm upgrade process can unconditionally expect a JSON result.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 2cce16537c9f9e92bf0a8fce746d0364cbb2d15d)

5 years agoMerge pull request #39524 from rhcs-dashboard/wip-49326-pacific
Ernesto Puerta [Thu, 4 Mar 2021 12:54:36 +0000 (13:54 +0100)]
Merge pull request #39524 from rhcs-dashboard/wip-49326-pacific

pacific: mgr/dashboard: avoid using document.write()

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
5 years agoMerge pull request #39647 from rhcs-dashboard/wip-49390-pacific
Ernesto Puerta [Thu, 4 Mar 2021 12:53:54 +0000 (13:53 +0100)]
Merge pull request #39647 from rhcs-dashboard/wip-49390-pacific

pacific: mgr/dashboard: fix tooltip for Provisioned/Total Provisioned fields

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
5 years agorpm: use PMDK system libraries on SUSE
Nathan Cutler [Mon, 1 Mar 2021 11:07:29 +0000 (12:07 +0100)]
rpm: use PMDK system libraries on SUSE

As of a49d1dbb32e2436ff2836a85b2fa84418f0a5fff, when the rbd_rwl_cache and
rbd_ssd_cache bconds are enabled and WITH_SYSTEM_PMDK is disabled (as it is by
default), the RPM build attempts to

    git clone https://github.com/ceph/pmdk.git

but of course that won't work in the OBS, where the build workers have no
Internet connectivity.

Fortunately, the openSUSE/SLE versions targeted by Ceph master and pacific ship
the necessary PMDK libraries as RPM packages.

Fixes: a49d1dbb32e2436ff2836a85b2fa84418f0a5fff
Fixes: https://tracker.ceph.com/issues/49550
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 30df650e6496e35c798eab7d85ea0806fd58722b)

Conflicts:
ceph.spec.in

5 years agoMerge pull request #39816 from cbodley/wip-49585
Casey Bodley [Wed, 3 Mar 2021 20:59:01 +0000 (15:59 -0500)]
Merge pull request #39816 from cbodley/wip-49585

pacific: valgrind: suppress operator delete[] for tcmalloc

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
5 years agovalgrind: suppress operator delete[] for tcmalloc 39816/head
Casey Bodley [Tue, 2 Mar 2021 14:31:08 +0000 (09:31 -0500)]
valgrind: suppress operator delete[] for tcmalloc

suppresses a mismatched operator delete[] from the librados client's
destructor:

<error>
  <unique>0xeef7eb</unique>
  <tid>1</tid>
  <kind>MismatchedFree</kind>
  <what>Mismatched free() / delete / delete []</what>
  <stack>
    <frame>
      <ip>0x4C32EA0</ip>
      <obj>/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
      <fn>operator delete[](void*, unsigned long)</fn>
      <dir>/builddir/build/BUILD/valgrind-3.16.0/coregrind/m_replacemalloc</dir>
      <file>vg_replace_malloc.c</file>
      <line>660</line>
    </frame>
    <frame>
      <ip>0x5FBEB86</ip>
      <obj>/usr/lib64/librados.so.2.0.0</obj>
    </frame>
    <frame>
      <ip>0x5FBEF2C</ip>
      <obj>/usr/lib64/librados.so.2.0.0</obj>
    </frame>
    <frame>
      <ip>0x5F7F7C5</ip>
      <obj>/usr/lib64/librados.so.2.0.0</obj>
      <fn>librados::v14_2_0::Rados::shutdown()</fn>
    </frame>

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

5 years agomgr/dashboard: fix issues related with PyJWT versions >=2.0.0 39808/head
Alfonso Martínez [Wed, 3 Mar 2021 14:36:06 +0000 (15:36 +0100)]
mgr/dashboard: fix issues related with PyJWT versions >=2.0.0

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

5 years agodoc/rbd: clarify QCOW2 migration support 39811/head
Jason Dillaman [Tue, 2 Mar 2021 22:29:29 +0000 (17:29 -0500)]
doc/rbd: clarify QCOW2 migration support

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 68fda590cf88e6b232dfb573236fe3ae3949db28)

5 years agoMerge pull request #39568 from tchaikov/pr-39365-pacific
Kefu Chai [Wed, 3 Mar 2021 14:07:08 +0000 (22:07 +0800)]
Merge pull request #39568 from tchaikov/pr-39365-pacific

pacific: mgr/devicehaelth: extract and present SSD wear

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoqa/rados/dashbord use "random" objectore 39806/head
Sebastian Wagner [Wed, 24 Feb 2021 12:01:54 +0000 (13:01 +0100)]
qa/rados/dashbord use "random" objectore

1. removed symlink to `.qa/objectstore`
2. added `random-objectstore&` to `.qa/objectstore`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 72229a098b878036e2738147814898bc65efcaea)

5 years agosrc/global/signal_handler.h: fix preprocessor logic for alpine 39805/head
Duncan Bellamy [Thu, 25 Feb 2021 12:05:56 +0000 (12:05 +0000)]
src/global/signal_handler.h: fix preprocessor logic for alpine
Fixes: https://tracker.ceph.com/issues/49494
Co-authored-by: Kefu Chai <tchaikov@gmail.com>
Signed-off-by: Duncan Bellamy <dunk@denkimushi.com>
(cherry picked from commit 387f33e7265825ae4cdd3580289f5154e250b05b)

5 years agoMerge PR #39525 into pacific
Jan Fajerski [Wed, 3 Mar 2021 08:40:13 +0000 (09:40 +0100)]
Merge PR #39525 into pacific

* refs/pull/39525/head:
ceph-volume: pass --filter-for-batch from drive-group subcommand

Reviewed-by: Rishabh Dave <ridave@redhat.com>
5 years agoMerge PR #39468 into pacific
Jan Fajerski [Wed, 3 Mar 2021 08:31:24 +0000 (09:31 +0100)]
Merge PR #39468 into pacific

* refs/pull/39468/head:
Update batch.py

Reviewed-by: Rishabh Dave <ridave@redhat.com>
5 years agoqa/tasks/mgr/dashboard: add wear_level to devices schema 39568/head
Sage Weil [Sun, 21 Feb 2021 16:40:06 +0000 (10:40 -0600)]
qa/tasks/mgr/dashboard: add wear_level to devices schema

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 6f6792cf51f9042452bc79df30b3a4d02dd5ef96)

5 years agomgr/devicehealth: extract+store wear level from metrics scraping
Sage Weil [Thu, 18 Feb 2021 14:27:49 +0000 (08:27 -0600)]
mgr/devicehealth: extract+store wear level from metrics scraping

When we scrape and store health metrics for a device, extract the wear
level from the JSON.  If present, also store it in the config-key
per-device metadata.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 4840507cfcdd5182003671994d0bc9604d072e3e)

 Conflicts:
src/pybind/mgr/devicehealth/module.py
 - type annotations for _get_device_metrics

5 years agomgr/DaemonServer: show wear level in 'device ls' output
Sage Weil [Mon, 8 Feb 2021 18:54:04 +0000 (12:54 -0600)]
mgr/DaemonServer: show wear level in 'device ls' output

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 8f93e3b55351df0bc8308e0cace482aabb15e8c8)

5 years agomgr/DaemonState: store optional wear_level for devices
Sage Weil [Mon, 8 Feb 2021 18:53:51 +0000 (12:53 -0600)]
mgr/DaemonState: store optional wear_level for devices

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit c52fcb51afb6da2dccd6954a40f0f1c616324855)

5 years agocommon/blkdev: collect non-SMART data too
Sage Weil [Mon, 8 Feb 2021 18:53:24 +0000 (12:53 -0600)]
common/blkdev: collect non-SMART data too

Call smartctl with -x instead of -a:

       -a, --all
              Prints  all SMART information about the disk, or TapeAlert infor‐
              mation about the tape drive or changer.  For ATA devices this  is
              equivalent to
              '-H -i -c -A -l error -l selftest -l selective'
              and for SCSI, this is equivalent to
              '-H -i -A -l error -l selftest'.
              For NVMe, this is equivalent to
              '-H -i -c -A -l error'.
              Note  that  for  ATA  disks  this  does  not enable the non-SMART
              options and the SMART options which require  support  for  48-bit
              ATA commands.

vs

       -x, --xall
              Prints all SMART and non-SMART information about the device.  For
              ATA devices this is equivalent to
              '-H -i -g all -g wcreorder -c -A  -f  brief  -l  xerror,error  -l
              xselftest,selftest -l selective -l directory -l scttemp -l scterc
              -l devstat -l defects -l sataphy'.
              and for SCSI, this is equivalent to
              '-H -i -g all -A -l error -l selftest -l background -l sasphy'.
              For NVMe, this is equivalent to
              '-H -i -c -A -l error'.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 176bb54da90e404646c0e80e0c3ea804bb8a58d6)

5 years agomgr/DaemonState: fix serialization/storage of device life expectancy min/max
Sage Weil [Mon, 8 Feb 2021 16:41:48 +0000 (10:41 -0600)]
mgr/DaemonState: fix serialization/storage of device life expectancy min/max

These weren't encoded as strings, which means they were effectively
forgotton on each mgr restart.  Sigh.

Fixes: https://tracker.ceph.com/issues/49215
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 78b72b0be752fce855203b28b558133a0d47eba8)

5 years agopybind/mgr: silence flake8 warnings
Kefu Chai [Fri, 29 Jan 2021 02:30:19 +0000 (10:30 +0800)]
pybind/mgr: silence flake8 warnings

silence following warnings from flake8

* line too long (107 > 100 characters) [E501]

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

5 years agopybind/mgr/mgr_module: correct annotation
Kefu Chai [Wed, 27 Jan 2021 04:07:07 +0000 (12:07 +0800)]
pybind/mgr/mgr_module: correct annotation

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

5 years agomgr/devicehealth: remove handle_command()
Kefu Chai [Wed, 27 Jan 2021 06:34:35 +0000 (14:34 +0800)]
mgr/devicehealth: remove handle_command()

as commands are collected by COMMANDS already.

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

5 years agomgr/devicehealth: return -1 if prediction plugin is not available
Kefu Chai [Wed, 27 Jan 2021 06:58:01 +0000 (14:58 +0800)]
mgr/devicehealth: return -1 if prediction plugin is not available

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

5 years agomgr/devicehealth: add more annotations
Kefu Chai [Wed, 27 Jan 2021 04:08:11 +0000 (12:08 +0800)]
mgr/devicehealth: add more annotations

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

5 years agoosd: Don't clear m_planned_scrub until scrub finishes successfully 39796/head
David Zafman [Wed, 3 Mar 2021 00:24:53 +0000 (16:24 -0800)]
osd: Don't clear m_planned_scrub until scrub finishes successfully

Fixes: https://tracker.ceph.com/issues/48984
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 0b63c850a251f75bcb7436efefe4f24480c4ed7e)