]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agoqa/rgw - run sse-s3 test cases only if configured or requested 44494/head
Marcus Watts [Wed, 27 Apr 2022 22:50:56 +0000 (18:50 -0400)]
qa/rgw - run sse-s3 test cases only if configured or requested

This commit adds logic to automatically detect when sse-s3 is
available and if not, disables sse-s3 tests by default.
Configuration opions are provided to override the default either way.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agoqa/rgw - run sse-s3 test cases by default
Marcus Watts [Thu, 17 Mar 2022 21:54:24 +0000 (17:54 -0400)]
qa/rgw - run sse-s3 test cases by default

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/crypt - fix rest call to fail if insufficient kms args supplied.
Marcus Watts [Fri, 4 Mar 2022 01:37:53 +0000 (20:37 -0500)]
rgw/crypt - fix rest call to fail if insufficient kms args supplied.

in s3-land, it is ok to supply incomplete kms args for bucket encryption
configuration, but not on the rest call.  This is a fix to distinguish
between the two and error out in the case of the latter.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/crypt - improve PutBucketEncryption / RGWBucketEncryptionConfig
Marcus Watts [Tue, 15 Feb 2022 01:16:42 +0000 (20:16 -0500)]
rgw/crypt - improve PutBucketEncryption / RGWBucketEncryptionConfig

The existing logic for bucket encryption was incomplete.  This adds the
rest of the changes necessary to support sse-kms with default bucket
encryption.

The new logic has these changes:

on input: SSEAlgorithm is now optional.

On output: emit xmlns attribute at top level.
also output
BucketKeyEnabled and KMSMasterKeyID.
Hnadle "empty rule" case.

for testing and diagnostics:
support RGWBucketEncryptionConfig in ceph-dencoder

Signed-off-by: Marcus Watts <mwatts@redhat.com>
src/rgw/rgw_bucket_encryption.cc
src/rgw/rgw_bucket_encryption.h
src/rgw/rgw_crypt.cc
src/rgw/rgw_dencoder.cc
src/rgw/rgw_json_enc.cc
src/rgw/rgw_rest_s3.cc
src/tools/ceph-dencoder/rgw_types.h

3 years agorgw/crypt - remote old parts path for sse attributes
Marcus Watts [Tue, 15 Feb 2022 01:02:34 +0000 (20:02 -0500)]
rgw/crypt - remote old parts path for sse attributes

crypt_attribute_map is the place where sse attributes
should be found by the rest of the sse logic.  There is
no longer any need to feed "parts" down to the crypto
logic; this commit removes the old data path.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/crypt - generalize putbucketencryption.
Marcus Watts [Fri, 28 Jan 2022 10:34:43 +0000 (05:34 -0500)]
rgw/crypt - generalize putbucketencryption.

The previous logic only suported putbucketencryption to enable
sse-s3.  The protocol allows putbucketencryption to be used to
enable sse-kms by default, and the surrounding logic is now ready
to do this as well.  This commit removes the checks which stopped
this from working, so that it is now possible to use putbucketencryption
to default either sse-s3 or sse-kms on.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/crypt - fix sse-s3 logic.
Marcus Watts [Fri, 28 Jan 2022 10:32:14 +0000 (05:32 -0500)]
rgw/crypt - fix sse-s3 logic.

The previous logic path was overly eager to do sse-s3.  This version
ensures that the "no-encryption" case does not default to sse-s3.
It also removes some argument sanity checking which is now down before
this code is reached.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/crypt - document that sse-s3 exists.
Marcus Watts [Thu, 13 Jan 2022 23:05:06 +0000 (18:05 -0500)]
rgw/crypt - document that sse-s3 exists.

encryption.rst documents which encryption features are available.
I've added a section on sse-s3, and clarified some other details.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agoqa/rgw: run sse-s3 test cases conditionally
Casey Bodley [Wed, 15 Dec 2021 21:15:10 +0000 (16:15 -0500)]
qa/rgw: run sse-s3 test cases conditionally

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 4e644832b0e584a231d2a6fc4a8caa78ea56ed5b)

3 years agoqa/rgw: configure sse-s3 in vault_transit.yaml
Casey Bodley [Wed, 15 Dec 2021 21:14:38 +0000 (16:14 -0500)]
qa/rgw: configure sse-s3 in vault_transit.yaml

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 1b679e0828ce2f44a03fc8d36a43783014dfba55)

3 years agorgw/sse-s3: remove make_kek_s3/generate_kek_sse_s3
Marcus Watts [Sat, 18 Dec 2021 09:27:51 +0000 (04:27 -0500)]
rgw/sse-s3: remove make_kek_s3/generate_kek_sse_s3

Alternate routines provide more functionality, flexibility.
create_ss3_s3_bucket_key
remove_ss3_s3_bucket_key

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/sse-s3: bucketencryption should not generate bucket key names.
Marcus Watts [Sat, 18 Dec 2021 09:22:31 +0000 (04:22 -0500)]
rgw/sse-s3: bucketencryption should not generate bucket key names.

It is possible to request and use sse-s3 without setting bucketencryption policy
Therefore, logic to manage per-bucket keys belongs elsewhere.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/sse-s3: +get_encryption_defaults, use new crypt_attribute_map
Marcus Watts [Sat, 18 Dec 2021 04:16:09 +0000 (23:16 -0500)]
rgw/sse-s3: +get_encryption_defaults, use new crypt_attribute_map

putobj and postobj: get_encryption_defaults
this fetches bucketencryption policy and resolves defaults.
also errors for various conflicts between parameters (& policy).
verify_permisions
fetch encryption attributes from crypt_attribute_map not x_meta_map
for postobj, x_meta_map only gets meta attributes, not sse.
if bucketencryption policy exists, it *may* be correct to
prepopulate this before bucket policy sees it.

map_qs_metadata
for putobj it now also copies sse attributes into crypt_attribute_map.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/sse-s3: various improvements.
Marcus Watts [Sat, 18 Dec 2021 04:13:09 +0000 (23:13 -0500)]
rgw/sse-s3: various improvements.

1. sse-s3 should not require bucketencryption policy, work w/ postobj
2. make bucket key name configurable
3. +rgw_remove_sse_s3_bucket_key

1. for sse-s3 should not require bucketencryption policy, work w/ postobj
get_crypt_attribute ->
using s->info.crypt_attribute_map instead of s->env to avoid havoing
to know about HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM names,
crypt_attribute_get -> crypt_attributes.get
to consolidate crypt attribute sources
rework sse-s3 logic: sse-s3 can be specified entirely in the rest call,
so remove requirement that bucket has bucket encryption policy.
also avoid term "default encryption", prefer term "test key".

2. for make bucket key name configurable:
With this modification, sse-s3 key names default to being
the bucket id, but can be configured to instead consist
of the owners name, a fixed string, or variations thereof.

3. +rgw_remove_sse_s3_bucket_key
For sse-s3, keys are supposed to be managed entirely by s3.
This means when a bucket is removed, we should be removing its key,
which should no longer be in use for anything.  This is only safe
if the key was constructed using "%bucket_id", otherwise it might be
used in another bucket and we can never remove it automatically.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw/sse-s3: save sse attributes in req_state->crypt_attribute_map
Marcus Watts [Sat, 18 Dec 2021 04:09:56 +0000 (23:09 -0500)]
rgw/sse-s3: save sse attributes in req_state->crypt_attribute_map

req_state->crypt_attribute_map to save sse-s3 cryptographic attributes
this is not quite a duplicate of x_meta_map because I think some of
        of its uses conflict with sse-s3. (for instance, bucketencryption vs. signatures)

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agorgw: Address review comments, fix test cases for rgw_kms
Priya Sehgal [Fri, 30 Jul 2021 05:02:26 +0000 (10:32 +0530)]
rgw: Address review comments, fix test cases for rgw_kms

Addressed earlier review comments on having const class members.
Resolved the make check problem.

Signed-off-by: Priya Sehgal <priya.sehgal@flipkart.com>
(cherry picked from commit 38e8f63baa73be04b0e844df2b33620ea7ee669f)
[ merge conflict in src/rgw/rgw_crypt.cc -- will address separately... -mdw ]

3 years agorgw: Adding SSE-S3 support in GET and PUT paths (using Vault as KMS)
Priya Sehgal [Wed, 28 Jul 2021 13:48:59 +0000 (19:18 +0530)]
rgw: Adding SSE-S3 support in GET and PUT paths (using Vault as KMS)

Added the support to generate KEK based on bucket owner UID in
PutBucketEncryption. This is stored in bucket x-attrs. The KEK-ID is
later used in GET and PUT paths.
In the PUT path, we check if BucketEncryption is enabled for the bucket.
If yes, we detemine if the encryption type is AES256 (i.e., SSE-S3),
then we fetch the KEK-ID from the bucket x-attrs and use it to wrap the
data key. Thereafter, we call generate-data-key. We store the KEK-ID
and the wrapped data-key in the object x-attrs.
In the GET path, we simply pull out the KEK-ID from the object x-attr
and decrypt the object.

Signed-off-by: Priya Sehgal <priya.sehgal@flipkart.com>
3 years agorgw: sse-s3: Introducing SSE-S3 RGW options and using them
Marcus Watts [Sat, 12 Jun 2021 07:43:13 +0000 (03:43 -0400)]
rgw: sse-s3: Introducing SSE-S3 RGW options and using them

+configuration options
+kms support for sse-s3 operations.
+support to create and delete vault keys.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
3 years agoMerge pull request #45933 from ionutbalutoiu/qa-add-rbd-wnbd-tests
David Galloway [Tue, 19 Apr 2022 20:50:24 +0000 (16:50 -0400)]
Merge pull request #45933 from ionutbalutoiu/qa-add-rbd-wnbd-tests

qa: add basic Ceph on Windows integration test

3 years agoMerge pull request #45945 from vshankar/wip-54374
Venky Shankar [Tue, 19 Apr 2022 17:27:07 +0000 (22:57 +0530)]
Merge pull request #45945 from vshankar/wip-54374

mgr/snap_schedule: add time zone suffix to snapshot dir name

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45916 from tchaikov/wip-python3
David Galloway [Tue, 19 Apr 2022 15:55:35 +0000 (11:55 -0400)]
Merge pull request #45916 from tchaikov/wip-python3

cmake/modules: always use the python3 specified in command line

3 years agoMerge pull request #45864 from cyx1231st/wip-crimson-refactor-with-device-ut
Samuel Just [Tue, 19 Apr 2022 15:14:03 +0000 (08:14 -0700)]
Merge pull request #45864 from cyx1231st/wip-crimson-refactor-with-device-ut

test/crimson/.../test_transaction_manager: test multiple devices

Reviewed-by: Samuel Just <sjust@redhat.com>
3 years agoMerge pull request #45938 from liu-chunmei/seastore-omap-enlarge
Samuel Just [Tue, 19 Apr 2022 15:03:47 +0000 (08:03 -0700)]
Merge pull request #45938 from liu-chunmei/seastore-omap-enlarge

crimson/seastore: enlarge omap_leaf_node size

Reviewed-by: Samuel Just <sjust@redhat.com>
3 years agoqa: add basic Ceph on Windows integration test 45933/head
Ionut Balutoiu [Wed, 6 Apr 2022 18:21:39 +0000 (21:21 +0300)]
qa: add basic Ceph on Windows integration test

Due to lack of Windows support in the Teuthology, the test case adopts
the following workaround:

* Deploy baremetal machine with `ubuntu_latest.yaml` and
  configure it with libvirt KVM.
* Create a libvirt VM and provision it with Windows Server 2019, using
  the official ISO from Microsoft.
* Configure SSH in the Windows VM, and run the tests remotely via SSH.

The implementation of the test case consists of workunit scripts.

`qa/workunits/windows/test_rbd_wnbd.py` is the main Python script
to test Ceph on Windows basic functionality. This is executed in the
libvirt VM configured with Windows Server 2019.

Co-authored-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Co-authored-by: Daniel Vincze <dvincze@cloudbasesolutions.com>
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
3 years agoMerge pull request #45708 from votdev/issue_55133_improve_exception_handling
Ernesto Puerta [Tue, 19 Apr 2022 11:29:00 +0000 (13:29 +0200)]
Merge pull request #45708 from votdev/issue_55133_improve_exception_handling

mgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: sunilangadi2 <NOT@FOUND>
3 years agoMerge pull request #45603 from nmshelke/feature-54472
Venky Shankar [Tue, 19 Apr 2022 11:22:13 +0000 (16:52 +0530)]
Merge pull request #45603 from nmshelke/feature-54472

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

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45909 from soumyakoduri/wip-skoduri-dbstore-fixes
Soumya Koduri [Tue, 19 Apr 2022 11:04:32 +0000 (16:34 +0530)]
Merge pull request #45909 from soumyakoduri/wip-skoduri-dbstore-fixes

rgw/dbstore: Handle prefix/delim while listing objects

3 years agomgr/snap_schedule: add time zone suffix to snapshot dir name 45945/head
Milind Changire [Sat, 9 Apr 2022 03:03:22 +0000 (08:33 +0530)]
mgr/snap_schedule: add time zone suffix to snapshot dir name

Fixes: https://tracker.ceph.com/issues/54374
Signed-off-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
3 years agorgw/dbstore: Handle prefix/delim in Bucket::List op 45909/head
Soumya Koduri [Thu, 14 Apr 2022 19:51:17 +0000 (01:21 +0530)]
rgw/dbstore: Handle prefix/delim in Bucket::List op

Given a prefix, fetch only those objects matching the prefix.
In addition, skip the entries with "delim" and instead include
those entries in common_prefixes

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agorgw/dbstore: DBObject state initialization
Soumya Koduri [Mon, 11 Apr 2022 08:36:59 +0000 (14:06 +0530)]
rgw/dbstore: DBObject state initialization

Initialize & store 'state' part of DBObject to be
referenced by callers of 'get_obj_state'.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agoMerge pull request #45866 from liu-chunmei/crimson-longxattr
Liu-Chunmei [Tue, 19 Apr 2022 03:09:07 +0000 (20:09 -0700)]
Merge pull request #45866 from liu-chunmei/crimson-longxattr

crimson: check long attr name

Reviewed-by: Samuel Just <sjust@redhat.com>
Radoslaw Zarzynski <rzarzyns@redhat.com>

3 years agocrimson/seastore: enlarge omap_leaf_node size 45938/head
chunmei-liu [Fri, 15 Apr 2022 05:47:30 +0000 (22:47 -0700)]
crimson/seastore: enlarge omap_leaf_node size

to avoid double split when key size around 2K.

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
3 years agoMerge pull request #44784 from Gaoweinan/master-doc-InconsistentFormat-gaoweinan
Laura Flores [Mon, 18 Apr 2022 18:59:21 +0000 (13:59 -0500)]
Merge pull request #44784 from Gaoweinan/master-doc-InconsistentFormat-gaoweinan

doc:InconsistentFormat

3 years agoMerge pull request #45860 from adk3798/alertmanager-skip-verify
Adam King [Mon, 18 Apr 2022 12:57:14 +0000 (08:57 -0400)]
Merge pull request #45860 from adk3798/alertmanager-skip-verify

mgr/cephadm: allow setting insecure_skip_verify for alertmanager

Reviewed-by: Francesco Pantano <fpantano@redhat.com>
Reviewed-by: Patrick Seidensal <pseidensal@suse.com>
3 years agoMerge pull request #43879 from rishabh-d-dave/vr-clearer-msg
Venky Shankar [Mon, 18 Apr 2022 09:57:52 +0000 (15:27 +0530)]
Merge pull request #43879 from rishabh-d-dave/vr-clearer-msg

qa/vstart_runner: print "success" explicitly

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45924 from rishabh-d-dave/qa-cephfs-test_cephfs_shell
Venky Shankar [Mon, 18 Apr 2022 09:32:55 +0000 (15:02 +0530)]
Merge pull request #45924 from rishabh-d-dave/qa-cephfs-test_cephfs_shell

qa/cephfs: expand note for test_cephfs_shell.py

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45923 from rishabh-d-dave/doc-fix-note
Venky Shankar [Mon, 18 Apr 2022 07:58:46 +0000 (13:28 +0530)]
Merge pull request #45923 from rishabh-d-dave/doc-fix-note

doc/developer_guide: split a note point into two

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoqa/cephfs: expand note for test_cephfs_shell.py 45924/head
Rishabh Dave [Sun, 17 Apr 2022 17:28:10 +0000 (22:58 +0530)]
qa/cephfs: expand note for test_cephfs_shell.py

Signed-off-by: Rishabh Dave <ridave@redhat.com>
3 years agoqa/vstart_runner: print "success" explicitly 43879/head
Rishabh Dave [Thu, 21 Oct 2021 05:09:39 +0000 (10:39 +0530)]
qa/vstart_runner: print "success" explicitly

This makes it effortless for new vstart_runner.py users to spot that the
test passed.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
3 years agoMerge pull request #45816 from kotreshhr/clone-failure-status
Venky Shankar [Mon, 18 Apr 2022 04:13:40 +0000 (09:43 +0530)]
Merge pull request #45816 from kotreshhr/clone-failure-status

mgr/volumes: Show clone failure reason in clone status command

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agodoc/developer_guide: split a note point into two 45923/head
Rishabh Dave [Sun, 17 Apr 2022 17:23:09 +0000 (22:53 +0530)]
doc/developer_guide: split a note point into two

Since both the sentences in the note point aren't strictly related to
each other, it's better to split that note point into two.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
3 years agoMerge pull request #45114 from lxbsz/wip-54362
Venky Shankar [Sun, 17 Apr 2022 09:54:57 +0000 (15:24 +0530)]
Merge pull request #45114 from lxbsz/wip-54362

client: do not release the global snaprealm until unmounting

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45688 from lxbsz/fwd
Venky Shankar [Sun, 17 Apr 2022 09:53:15 +0000 (15:23 +0530)]
Merge pull request #45688 from lxbsz/fwd

client: stop forwarding the request when exceeding 256 times

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45107 from lxbsz/wip-54345
Venky Shankar [Sat, 16 Apr 2022 15:20:17 +0000 (20:50 +0530)]
Merge pull request #45107 from lxbsz/wip-54345

mds: reset heartbeat when fetching or committing dentries

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45915 from ljflores/wip-dashboard-cypress-password
Laura Flores [Sat, 16 Apr 2022 04:58:58 +0000 (23:58 -0500)]
Merge pull request #45915 from ljflores/wip-dashboard-cypress-password

3 years agocmake/modules: always use the python3 specified in command line 45916/head
Kefu Chai [Sat, 16 Apr 2022 01:10:20 +0000 (09:10 +0800)]
cmake/modules: always use the python3 specified in command line

if another python3 with higher version is found by
find_package(Python3), the cmake's install script would just
install the python modules/extensions into that python3's
dist-package directory, and the packaging script would fail
to find these artifacts when trying to package them.

so we need to ensure that the install directories for python
modeules/extensions are always "versioned" with WITH_PYTHON3
cmake option.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
3 years agomgr/dashboard/frontend: fix cypress env password 45915/head
Laura Flores [Thu, 14 Apr 2022 20:42:05 +0000 (20:42 +0000)]
mgr/dashboard/frontend: fix cypress env password

"LOGIN_PASSWORD" should be "LOGIN_PWD". Bug introduced
in e9128c4.

Fixes: https://tracker.ceph.com/issues/55323
Signed-off-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #45765 from m-ildefons/1196785-cephadm-status-trace
Adam King [Fri, 15 Apr 2022 15:05:05 +0000 (11:05 -0400)]
Merge pull request #45765 from m-ildefons/1196785-cephadm-status-trace

cephadm: avoid crashing on expected non-zero exit

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
3 years agoMerge pull request #45863 from adk3798/mgr-fail-retry
Adam King [Fri, 15 Apr 2022 15:02:55 +0000 (11:02 -0400)]
Merge pull request #45863 from adk3798/mgr-fail-retry

mgr/cephadm: retry mgr fail over in case of transient failure

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agoMerge pull request #45898 from idryomov/wip-resurrect-mutex-debug
Ilya Dryomov [Fri, 15 Apr 2022 09:09:42 +0000 (11:09 +0200)]
Merge pull request #45898 from idryomov/wip-resurrect-mutex-debug

cmake: resurrect mutex debugging in all Debug builds

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
3 years agocrimson/osd: check obj exists 45866/head
chunmei-liu [Tue, 12 Apr 2022 09:16:37 +0000 (02:16 -0700)]
crimson/osd: check obj exists

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
3 years agoclient: do not release the global snaprealm until unmounting 45114/head
Xiubo Li [Tue, 22 Feb 2022 03:46:44 +0000 (11:46 +0800)]
client: do not release the global snaprealm until unmounting

The global snaprealm would be created and then destroyed immediately
every time when updating it.

Fixes: https://tracker.ceph.com/issues/54362
Signed-off-by: Xiubo Li <xiubli@redhat.com>
3 years agomgr/cephadm: allow setting insecure_skip_verify for alertmanager 45860/head
Adam King [Wed, 6 Apr 2022 14:32:22 +0000 (10:32 -0400)]
mgr/cephadm: allow setting insecure_skip_verify for alertmanager

Add a "secure" parameter to alertmanager spec that will cause it
to deploy alertmanagers with insecure_skip_verify as true or false
depending on the value given for "secure".

NOTE: alertmanager must still be reconfigured after applying a yaml
with this option changed.

Fixes: https://tracker.ceph.com/issues/55272
Fixes: https://tracker.ceph.com/issues/55333
Signed-off-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #45394 from iqbalredkhan/amrojiqbal
Ali Maredia [Thu, 14 Apr 2022 13:35:00 +0000 (09:35 -0400)]
Merge pull request #45394 from iqbalredkhan/amrojiqbal

cls/rgw : Add missing classes in < #include "cls/rgw/cls_rgw_types.h">

Reviewed-by: Ali Maredia <amaredia@redhat.com>
3 years agoclient: stop forwarding the request when exceeding 256 times 45688/head
Xiubo Li [Tue, 29 Mar 2022 08:45:12 +0000 (16:45 +0800)]
client: stop forwarding the request when exceeding 256 times

The type of 'num_fwd' in ceph 'MClientRequestForward' is 'int32_t',
while in 'ceph_mds_request_head' the type is '__u8'. So in case
the request bounces between MDSes exceeding 256 times, the client
will get stuck.

In this case it's ususally a bug in MDS and continue bouncing the
request makes no sense.

Fixes: https://tracker.ceph.com/issues/55129
Signed-off-by: Xiubo Li <xiubli@redhat.com>
3 years agoMerge pull request #45549 from nmshelke/fuse-linux-only
Venky Shankar [Thu, 14 Apr 2022 12:08:20 +0000 (17:38 +0530)]
Merge pull request #45549 from nmshelke/fuse-linux-only

ceph-fuse: restrict already_fuse_mounted function only for linux

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45636 from joscollin/wip-B54971-rank0-stale-perf-stats-assertion...
Venky Shankar [Thu, 14 Apr 2022 12:06:42 +0000 (17:36 +0530)]
Merge pull request #45636 from joscollin/wip-B54971-rank0-stale-perf-stats-assertion-error

qa: make test_perf_stats_stale_metrics check only the clients created for the tests

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45663 from lxbsz/client_cleanup_dl
Venky Shankar [Thu, 14 Apr 2022 12:04:31 +0000 (17:34 +0530)]
Merge pull request #45663 from lxbsz/client_cleanup_dl

client: remove expect_null and cleanup the code get_or_create()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45683 from kotreshhr/subvolume-retainsnap-rm-fix
Venky Shankar [Thu, 14 Apr 2022 12:01:46 +0000 (17:31 +0530)]
Merge pull request #45683 from kotreshhr/subvolume-retainsnap-rm-fix

mgr/volumes: Fix idempotent subvolume rm

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #45897 from idryomov/wip-rbd-mirror-test-timer-lock
Ilya Dryomov [Thu, 14 Apr 2022 05:50:15 +0000 (07:50 +0200)]
Merge pull request #45897 from idryomov/wip-rbd-mirror-test-timer-lock

test/rbd_mirror: grab timer lock before calling add_event_after()

Reviewed-by: Christopher Hoffman <choffman@redhat.com>
3 years agoMerge pull request #45571 from rzarzynski/wip-doc-mempool-acct
Anthony D'Atri [Thu, 14 Apr 2022 02:18:26 +0000 (19:18 -0700)]
Merge pull request #45571 from rzarzynski/wip-doc-mempool-acct

doc/dev: Define what mempools we use in BlueStore

3 years agoMerge pull request #45884 from markhpc/wip-bs-avl-cursor-fix
Yuri Weinstein [Wed, 13 Apr 2022 23:18:47 +0000 (16:18 -0700)]
Merge pull request #45884 from markhpc/wip-bs-avl-cursor-fix

os/bluestore: Always update the cursor position in AVL near-fit search.

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@suse.com>
3 years agocrimson/osd: check big object size
chunmei-liu [Tue, 12 Apr 2022 08:49:08 +0000 (01:49 -0700)]
crimson/osd: check big object size

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
3 years agocrimson/osd: check CEPH_OSD_FLAG_PARALLELEXEC
chunmei-liu [Tue, 12 Apr 2022 08:08:30 +0000 (01:08 -0700)]
crimson/osd: check CEPH_OSD_FLAG_PARALLELEXEC

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
3 years agocrimson/osd: check long attr name
chunmei-liu [Tue, 12 Apr 2022 07:15:50 +0000 (00:15 -0700)]
crimson/osd: check long attr name

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
3 years agomgr/cephadm: retry mgr fail over in case of transient failure 45863/head
Adam King [Mon, 11 Apr 2022 20:57:51 +0000 (16:57 -0400)]
mgr/cephadm: retry mgr fail over in case of transient failure

Fixes: https://tracker.ceph.com/issues/55279
Signed-off-by: Adam King <adking@redhat.com>
3 years agodoc/dev: define what mempools we use in bluestore 45571/head
Anthony D'Atri [Wed, 13 Apr 2022 17:35:22 +0000 (10:35 -0700)]
doc/dev: define what mempools we use in bluestore

doc/dev: define what mempools we use in bluestore

Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #45851 from rkachach/fix_issue_53528
Adam King [Wed, 13 Apr 2022 18:34:41 +0000 (14:34 -0400)]
Merge pull request #45851 from rkachach/fix_issue_53528

mgr/cephadm: skip loopback devices when gathering facts

Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #45796 from asm0deuz/issue_54618_ssh_config
Adam King [Wed, 13 Apr 2022 18:34:06 +0000 (14:34 -0400)]
Merge pull request #45796 from asm0deuz/issue_54618_ssh_config

mgr/cephadm: ceph cephadm set-user does not reflect the user change in ssh-config

Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #45768 from rkachach/fix_issue_55174
Adam King [Wed, 13 Apr 2022 18:33:21 +0000 (14:33 -0400)]
Merge pull request #45768 from rkachach/fix_issue_55174

mgr/cephadm: Adding cephadm networking configuration checks + refactoring

Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #43796 from windgmbh/cephadm-sysctl-fhs-fix
Adam King [Wed, 13 Apr 2022 18:24:36 +0000 (14:24 -0400)]
Merge pull request #43796 from windgmbh/cephadm-sysctl-fhs-fix

cephadm: Fix sysctl.d location

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
3 years agocephadm: avoid crashing on expected non-zero exit 45765/head
Moritz Röhrich [Mon, 21 Mar 2022 16:32:25 +0000 (17:32 +0100)]
cephadm: avoid crashing on expected non-zero exit

- Avoid crashing when a call out to an external program expectedly does
  not return exit status zero.

There are programs that communicate other information than error/no
error through exit status. E.g. `systemctl status` will return different
exit codes depending on the actual status of the units in question.
In cases where this is expected crashing with a RuntimeError exception
is inappropriate and should be avoided.

Fixes: https://tracker.ceph.com/issues/55117
Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
3 years agocmake: resurrect mutex debugging in all Debug builds 45898/head
Ilya Dryomov [Wed, 13 Apr 2022 13:42:21 +0000 (15:42 +0200)]
cmake: resurrect mutex debugging in all Debug builds

Commit 403f1ec2888a ("cmake: make "WITH_CEPH_DEBUG_MUTEX" depend on
CMAKE_BUILD_TYPE") made WITH_CEPH_DEBUG_MUTEX depend on build type
being set to Debug, in CMakeLists.txt.  However, if CMAKE_BUILD_TYPE
isn't specified by the user, we may still set it to Debug later, in
src/CMakeLists.txt, and in that case WITH_CEPH_DEBUG_MUTEX doesn't
get enabled.  The result is that

  $ do_cmake.sh -DCMAKE_BUILD_TYPE=Debug ...

debug builds have mutex debugging enabled, while

  $ do_cmake.sh ...

builds, which are supposed to be the same, don't.  Jenkins builders
don't pass -DCMAKE_BUILD_TYPE=Debug so that commit effectively turned
off all ceph_mutex_is_locked* asserts in "make check".

Fixes: https://tracker.ceph.com/issues/55318
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
3 years agotest/rbd_mirror: grab timer lock before calling add_event_after() 45897/head
Ilya Dryomov [Wed, 13 Apr 2022 13:24:04 +0000 (15:24 +0200)]
test/rbd_mirror: grab timer lock before calling add_event_after()

add_event_after() expects an externally provided mutex to be held
for the call.  This was missed in commit 8965a0f2a6f7 ("rbd-mirror:
synchronize with in-flight stop in ImageReplayer::stop()").

Fixes: https://tracker.ceph.com/issues/55317
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
3 years agoMerge pull request #45859 from rhcs-dashboard/add-cypress-env
Ernesto Puerta [Wed, 13 Apr 2022 12:09:21 +0000 (14:09 +0200)]
Merge pull request #45859 from rhcs-dashboard/add-cypress-env

mgr/dashboard: Add cypress env for login credentials

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agomgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint 45708/head
Volker Theile [Wed, 30 Mar 2022 11:38:33 +0000 (13:38 +0200)]
mgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint

In case the validation of the Grafana URL fails, e.g. because of an invalid SSL certificate, a useless and not helping default error message is displayed in the UI.
This PR will re-raise the exception as a DashboardException which includes the detailed description of what happened. This will help to identify SSL cert issues much easier for example.

Fixes: https://tracker.ceph.com/issues/55133
Signed-off-by: Volker Theile <vtheile@suse.com>
3 years agoMerge pull request #44236 from CongMinYin/fix-pwl-cache-lose
Ilya Dryomov [Wed, 13 Apr 2022 10:12:51 +0000 (12:12 +0200)]
Merge pull request #44236 from CongMinYin/fix-pwl-cache-lose

rbd: add persistent-cache command group

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
3 years agodoc: Document the clone failure status 45816/head
Kotresh HR [Wed, 6 Apr 2022 07:21:54 +0000 (12:51 +0530)]
doc: Document the clone failure status

Fixes: https://tracker.ceph.com/issues/55190
Signed-off-by: Kotresh HR <khiremat@redhat.com>
3 years agomgr/volumes: Fix clone hang issue
Kotresh HR [Thu, 7 Apr 2022 13:28:28 +0000 (18:58 +0530)]
mgr/volumes: Fix clone hang issue

Following sequence of operation lead to deadlock

1. Created subvolume
2. Written some I/O on the subvolume
3. Create snapshot of the subvolume
4. Create clone of the snapshot
5. Delete snapshot from back end (don't use subvolume interface) before
   clone completes
6. Delete clone with force
7. Delete subvolume
8. Delete fs and associated pools
9. Created new fs
10 Created new subvolume,
11. Written some I/O on the subvolume
12. Create snapshot of the subvolume
13. Create clone of the snapshot <---------------THIS OPERATION HANGS -----------------

Root Cause:
Since the snapshot is deleted from the back end, the clone fails. But it
also fails to remove the clone index at '/volumes/_index/clone'. The
cloner thread goes to infinite loop of starting the clone and failing.
This involves taking 'self.async_job.lock()' and reads the clone index
to get the job and registers the above job.

While the 'cloner thread' is in above loop, the fs is destroyed. The
cloner threads which lives till the mgr/volumes is enabled in mgr, takes
the 'self.async_job.lock()' and hangs while reading the clone index.

Any further clone operations which also requires above lock hangs.

Fix:
Remove the clone index even though snapshot is not present.

Fixes: https://tracker.ceph.com/issues/55217
Signed-off-by: Kotresh HR <khiremat@redhat.com>
3 years agoqa: Add test for clone failure status
Kotresh HR [Sat, 22 Jan 2022 06:38:15 +0000 (12:08 +0530)]
qa: Add test for clone failure status

Fixes: https://tracker.ceph.com/issues/55190
Signed-off-by: Kotresh HR <khiremat@redhat.com>
3 years agomgr/volumes: Add clone failure reason in clone status
Kotresh HR [Wed, 6 Apr 2022 07:16:01 +0000 (12:46 +0530)]
mgr/volumes: Add clone failure reason in clone status

Add the clone failure reason in the clone status.
The sample output is as below:

$ ceph fs clone status cephfs clone_0
{
  "status": {
    "state": "failed",
    "source": {
      "volume": "cephfs",
      "subvolume": "subvolume_0",
      "snapshot": "snapshot_0",
      "size": "52428800"
    },
    "failure": {
      "errno": "2",
      "error_msg": "snapshot 'snapshot_0' does not exist"
    }
  }
}

Fixes: https://tracker.ceph.com/issues/55190
Signed-off-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #45059 from ceph/wip-merge_message_browser-master
Ernesto Puerta [Wed, 13 Apr 2022 08:37:30 +0000 (10:37 +0200)]
Merge pull request #45059 from ceph/wip-merge_message_browser-master

doc: browser extension for merge message

Reviewed-by: Nizamudeen A <nia@redhat.com>
3 years agoMerge pull request #45081 from ceph/epuertat-patch-2
Ernesto Puerta [Wed, 13 Apr 2022 08:37:18 +0000 (10:37 +0200)]
Merge pull request #45081 from ceph/epuertat-patch-2

doc: fix format issues

Reviewed-by: anthonyeleven <NOT@FOUND>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agoMerge pull request #45083 from ceph/epuertat-patch-4
Ernesto Puerta [Wed, 13 Apr 2022 08:37:01 +0000 (10:37 +0200)]
Merge pull request #45083 from ceph/epuertat-patch-4

doc: fix config option links

Reviewed-by: anthonyeleven <NOT@FOUND>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agocrimson/os/seastore: fix segment_id_t::device_id() always return 0 45864/head
Yingxin Cheng [Mon, 11 Apr 2022 15:43:55 +0000 (23:43 +0800)]
crimson/os/seastore: fix segment_id_t::device_id() always return 0

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore: minor debugging improvements
Yingxin Cheng [Mon, 11 Apr 2022 15:42:47 +0000 (23:42 +0800)]
crimson/os/seastore: minor debugging improvements

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agotest/crimson/.../test_transaction_manager: test multiple devices
Yingxin Cheng [Mon, 11 Apr 2022 15:41:46 +0000 (23:41 +0800)]
test/crimson/.../test_transaction_manager: test multiple devices

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agotest/crimson: support multiple EphemeralSegmentManagers
Yingxin Cheng [Mon, 11 Apr 2022 12:40:03 +0000 (20:40 +0800)]
test/crimson: support multiple EphemeralSegmentManagers

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore: cleanup, reuse device_spec/config_t
Yingxin Cheng [Fri, 8 Apr 2022 03:50:10 +0000 (11:50 +0800)]
crimson/os/seastore: cleanup, reuse device_spec/config_t

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agoMerge pull request #45574 from cyx1231st/wip-crimson-refactor-with-device
Samuel Just [Wed, 13 Apr 2022 05:05:43 +0000 (22:05 -0700)]
Merge pull request #45574 from cyx1231st/wip-crimson-refactor-with-device

crimson/os/seastore: introduce the generic Device class

Reviewed-by: Samuel Just <sjust@redhat.com>
3 years agoMerge pull request #45775 from liu-chunmei/seastore-zero
Samuel Just [Wed, 13 Apr 2022 03:20:54 +0000 (20:20 -0700)]
Merge pull request #45775 from liu-chunmei/seastore-zero

crimson: seastore add OP_ZERO support

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
3 years agoos/bluestore: Always update the cursor position in AVL near-fit search. 45884/head
Mark Nelson [Wed, 13 Apr 2022 00:53:56 +0000 (00:53 +0000)]
os/bluestore: Always update the cursor position in AVL near-fit search.

Signed-off-by: Mark Nelson <mnelson@redhat.com>
3 years agocrimson: Implement ObjectDataHandler::zero using hole punching 45775/head
Samuel Just [Thu, 7 Apr 2022 21:30:32 +0000 (21:30 +0000)]
crimson: Implement ObjectDataHandler::zero using hole punching

Trim already treats Reserved regions as zero, let's use that
for zero as well.

Signed-off-by: Samuel Just <sjust@redhat.com>
3 years agocrimson/os/seastore/object_data_handler: don't return empty buffers from split_pin*
Samuel Just [Fri, 8 Apr 2022 09:20:49 +0000 (02:20 -0700)]
crimson/os/seastore/object_data_handler: don't return empty buffers from split_pin*

Always return std::nullopt rather than an empty buffer -- this way users
can rely on this as an invariant.

Signed-off-by: Samuel Just <sjust@redhat.com>
3 years agotest/crimson/seastore: improve test_seastore zero() coverage
Samuel Just [Thu, 7 Apr 2022 20:48:38 +0000 (20:48 +0000)]
test/crimson/seastore: improve test_seastore zero() coverage

Signed-off-by: Samuel Just <sjust@redhat.com>
3 years agocrimson: add seastore::zero unit test
chunmei-liu [Wed, 6 Apr 2022 23:37:23 +0000 (16:37 -0700)]
crimson: add seastore::zero unit test

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
3 years agocrimson: seastore add OP_ZERO support
chunmei-liu [Sat, 2 Apr 2022 03:39:15 +0000 (20:39 -0700)]
crimson: seastore add OP_ZERO support

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
3 years agoMerge pull request #45756 from rzarzynski/wip-common-no-cpp17-second_round
Yuri Weinstein [Tue, 12 Apr 2022 20:51:58 +0000 (13:51 -0700)]
Merge pull request #45756 from rzarzynski/wip-common-no-cpp17-second_round

common/bl: fix FTBFS on C++11 due to C++17's if-with-initializer

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #45819 from ljflores/wip-anonymize-telemetry-host-names
Yuri Weinstein [Tue, 12 Apr 2022 19:12:26 +0000 (12:12 -0700)]
Merge pull request #45819 from ljflores/wip-anonymize-telemetry-host-names

mgr/telemetry: anonymize daemons in telemetry `perf_counters`

Reviewed-by: Yaarit Hatuka <yaarithatuka@gmail.com>
3 years agoMerge pull request #45802 from ljflores/wip-config-dump-yaml
Yuri Weinstein [Tue, 12 Apr 2022 19:10:48 +0000 (12:10 -0700)]
Merge pull request #45802 from ljflores/wip-config-dump-yaml

ceph.in: clarify the usage of `--format` in the ceph command

Reviewed-by: Vikhyat Umrao <vikhyat@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>