Commit Graph

115517 Commits

Author SHA1 Message Date
Ali Maredia
6607cd8538
Merge pull request #35986 from TRYTOBE8TME/wip-rgw-sts-new
STS Testing Files
2020-09-16 01:38:50 -04:00
Kefu Chai
8016ba885c
Merge pull request #37172 from tchaikov/wip-crimson-object-context-lock
crimson/common/tri_mutex: update the class comment

Reviewed-by: Samuel Just <sjust@redhat.com>
2020-09-16 12:42:39 +08:00
Kefu Chai
0a5fb96b10 crimson/osd/object_context: s/rwlock/lock/
so it's less confusing.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-16 10:28:58 +08:00
Brad Hubbard
926e06caf5 qa: Enable debug_client for mgr tests
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-09-16 12:16:23 +10:00
Kefu Chai
441360dbb0 crimson/common/tri_mutex: update the class comment
to explain the reason why we have tri_mutex, and how it is related to
pipelined read / write. and the mutual exclusion between read, write
and rmw operations.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-16 09:10:14 +08:00
Kefu Chai
03d5b5d9dc
Merge pull request #37131 from tchaikov/wip-47311
crimson/object_context: make obc interruptible

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2020-09-16 09:01:32 +08:00
Ernesto Puerta
39768459f6
ceph: ignore BrokenPipeError when printing help
ignore BrokenPipeError which is thrown when piping the output of ceph
CLI to a tool which might close its stdin before ceph CLI sends the
whole help message.

Follow approach suggested by Kefu: 7b0ed43af5
This doesn't manage the clean-up/exit logic, as that's deferred to the
last part of the __main__ code.

Fixes: https://tracker.ceph.com/issues/47400
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-09-15 20:20:43 +02:00
Adam C. Emerson
01f706ca0f common/ceph_time: Don't define public things in time_detail
Defining things in a detail section and then using them outside turned
out to not be the best idea.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-15 13:58:30 -04:00
Neha Ojha
e7eddec5a0 qa/tasks/ceph_manager.py: remove redundant check in raw_cluster_cmd_result
Fixes 530982129e. The check for cephadm is no
longer needed since it was moved to run_cluster_cmd.

Fixes: https://tracker.ceph.com/issues/47239
Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-09-15 17:56:33 +00:00
Kefu Chai
38556993af mgr/dashboard: replace assertDictContainsSubset() with assertLessEqual()
to silence the warnings like

tests/test_access_control.py::AccessControlTest::test_show_all_users
  /usr/lib/python3.6/unittest/case.py:1126: DeprecationWarning: assertDictContainsSubset is deprecated
    DeprecationWarning)

as assertDictContainsSubset() method was deprecated, see also
https://dev.rbcafe.com/python/python-3.5.1/whatsnew/3.2.html#unittest

Signed-off-by: Volker Theile <vtheile@suse.com>
2020-09-16 00:09:48 +08:00
Pritha Srivastava
57afbeed2f rgw/sts: adding documentation for a shadow user created for
a user that authenticates with oidc provider.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2020-09-15 21:39:00 +05:30
Pritha Srivastava
94f1b974c5 rgw/sts: adding code for federated user as owner in case of STS.
A new user under the namespace 'oidc' is created for every federated
user in case of AssumeRoleWithWebIdentity.

In case of AssumeRole, the user that needs cross account access becomes
the owner.

In both cases buckets are created in the tenant that the role belongs to.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2020-09-15 21:39:00 +05:30
Pritha Srivastava
d6af250bff rgw/sts: adding error log messages to STS code.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2020-09-15 21:37:01 +05:30
Nizamudeen
f6e1ed6571 mgr/dashboard: Custom Directive for verifying if user is read_only
This commit introduces two new Custom Directives: `FormInputDisableDirective` and `FormScopeDirective`.
By using the `cdFormScope` attribute of the directive we can customize the behaviour of the modal components.

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-09-15 20:56:40 +05:30
Adam C. Emerson
d94f2268a3 common/ceph_time: Don't indent under namespaces
This is a violation of our guidelines and since I'm making a larger
change anyway.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-09-15 11:16:53 -04:00
Guillaume Abrioux
3ed3cff0d0 cephadm: support multiple mounts when running shell
This commit adds the multiple mounts support when running the
interactive shell.

ie:
```
--mount /foo /bar:/bar:z
```

Keeping default destination `/mnt` when no destination is passed for
backward compatibility. In the above example `/foo` will be mounted in
`/mnt/foo` and `/bar` in `/bar`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2020-09-15 16:44:47 +02:00
Mahati Chamarthy
aa81db8392 librbd/cache: Rename namespaces and move files
Signed-off-by: Lisa Li <xiaoyan.li@intel.com>
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
2020-09-15 14:24:34 +05:30
Mahati Chamarthy
ae4bcd906f librbd/cache: Establish the framework to integrate RWL and SSD
- Create WriteLogCache class
- Rename ReplicatedWriteLog files to AbstractWriteLog and
  modify the I/O method names
- fix the test
- Modify CMakeLists.txt to add newly created classes

Signed-off-by: Lisa Li <xiaoyan.li@intel.com>
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
2020-09-15 14:24:05 +05:30
Kefu Chai
ce658a6aa7 crimson/osd: replace "ceph_abort_msg()" with assert()
these are programming errors, and are easy to detect. also assert() does
not return, so compiler won't complain at seeing a branch does not
return value in a function that returns value.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-15 16:48:27 +08:00
Xuehan Xu
aeb20dd2f5 crimson/object_context: make obc interruptible
* add tri_mutex::abort() to pass given exception to all waiters
* add ObjectContext::interrupt() to abort all pending consumers
  of current object context

Fixes: https://tracker.ceph.com/issues/47311
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-15 16:48:27 +08:00
Kefu Chai
ef72fc736d crimson: use tri_mutex for guarding ObjectContext
before this change, a seastar::shared_mutex, a RWState and a
shared_promise are used for tracking the consumers of ObjectContext.
and all of the consumers are put into writers if the predicate function
evaluates to "false", and is awaken if the predicate function evaluates
to "true" afterwards in a polling loop waiting on the shared_promise,
which is in turn fulfilled once the last consumer of the given category
relinquishes the lock.

this approach has couple issues:

* it is heavy weighted. seastar::shared_mutex already tracks each of
  the waiters' continuation using separate promise<>, and it does try
  to reschedule them once a given consumer releases the last lock.
  so it's like a design of a customized shared_mutex over a
  shared_mutex.
* it is complicated. 3 variables for tracking the different
  consumers of ObjectContext.

in this change,

* `tri_mutex` is introduced as a variant of the original
  `seastar::shared_mutex` to track two different shared users in
  addition to an exclusive user.
* replace `shared_mutex` with `tri_mutex` in `ObjectContext`, to
  simplify the design.
* move recovery_read_marker into `ObjectContext`. assuming all
  pending actions will be added as a waiter for the related
  object context before they acquire the lock.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-15 16:48:27 +08:00
Kefu Chai
111a145371 crimson/osd: add ObjectContext::wait_recovery_read()
instead of reusing ObjectContext::get_recovery_read() for both
sync call and async call. just add a new method for the async call
for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-15 16:45:48 +08:00
Mykola Golub
ebdb8e56e5
Merge pull request #37113 from dillaman/wip-47390
librbd: ensure local site is included in mirror image global status

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-09-15 10:29:47 +03:00
Kalpesh Pandya
60904c907e qa : STS Testing Files (AssumeRole and GetSessionToken)
Added required files for testing of AssumeRole and GetSessionToken API's and modified s3tests.py to handle the same.

(cherry picked from commit c2c90eaf52)

Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
2020-09-15 11:58:59 +05:30
Greg Farnum
9506d09e3b Merge remote-tracking branch 'origin/master' into wip-stretch-mode
Conflicts:
	src/include/ceph_features.h

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2020-09-15 02:25:07 +00:00
Greg Farnum
f4375d1d02 features: change STRETCH_MODE feature to avoid a conflict
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2020-09-15 02:24:20 +00:00
Kefu Chai
6f1dc2994c
Merge pull request #37126 from tchaikov/wip-crimson-test
test/crimson: cleanups

Reviewed-by: Samuel Just <sjust@redhat.com>
2020-09-15 09:21:57 +08:00
Ilya Dryomov
67b7fa318a mds: add " (blacklisted)" to session reject error string
Commit dfd01d7653 ("blacklist -> blocklist") introduced a
regression for recover_session=clean mode of the kernel client.
Unfortunately, one of the ways it detects blocklisting is by
parsing the error string in the session reject message:

3320                 if (err_str && strnstr(*p, "blacklisted", len))
3321                         *blacklisted = true;

Add a suitable substring to restore the functionality.  ceph-fuse
doesn't care, as it just logs this string.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-09-14 23:14:04 +02:00
Casey Bodley
fde62037dc
Merge pull request #35167 from BryceCao/wip-inspect-zonegroup-when-create-existing-bucket
rgw : add check for zonegroup when create existing bucket

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2020-09-14 17:11:08 -04:00
Casey Bodley
7b587a05e9
Merge pull request #36978 from cbodley/wip-47028
rgw: add check for ACL when create existing bucket

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2020-09-14 17:09:59 -04:00
Patrick Donnelly
9fcc49fae7
Merge PR #36125 into master
* refs/pull/36125/head:
	doc: cephfs/fs-nfs-exports: more cleanups
	doc: cephfs/fs-nfs-exports: command requires enabled orch module
	doc: cephfs/fs-nfs-exports.rst: write "RADOS" in ALL-CAPS
	doc: cephfs/fs-nfs-exports: use "NFS Ganesha" everywhere
	doc: cephfs: clarify that pseudo root path must be absolute
	doc: cephfs: fix misleading "ceph fs volume create" command
	doc: cephfs: fix misleading "ceph nfs create" command

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zac Dover <zac.dover@gmail.com>
2020-09-14 13:49:50 -07:00
David Zafman
5b0ba0e5a8 test: Modify test to check new feature might_have_unfound added to list_unfound
Signed-off-by: David Zafman <dzafman@redhat.com>
2020-09-14 13:06:29 -07:00
David Zafman
12b495b370 test: Test list_unfound with asserts to check for new fields
Signed-off-by: David Zafman <dzafman@redhat.com>
2020-09-14 13:06:29 -07:00
David Zafman
4a655868a2 test: Fix typos in descriptions
Signed-off-by: David Zafman <dzafman@redhat.com>
2020-09-14 13:06:29 -07:00
David Zafman
a787148ed2 osd: Feature to add might_have_unfound info to list_unfound requests
fixes: https://tracker.ceph.com/issues/39012

Signed-off-by: David Zafman <dzafman@redhat.com>
2020-09-14 13:06:29 -07:00
David Zafman
3f4e9a4526 Fix to raise BOOST_MPL_LIMIT_LIST_SIZE from 20 to 30
Signed-off-by: David Zafman <dzafman@redhat.com>
2020-09-14 13:06:29 -07:00
Patrick Donnelly
ad4b2a0cb5
mds/FSMap: do not set legacy_client_fscid after filtering
Various code expects that there is only one file system if this field is
set. This is not meant to be set except as a stop-gap when upgrading
Ceph with "legacy" file systems.

Fixes: 811e48d6ff
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-09-14 12:27:50 -07:00
Patrick Donnelly
492e2de251
mds/FSMap: check parse_role return before filtering
If parse_role fails, then the fscid value is invalid.

This was caught in testing cephtool. Funnily enough, the command
rmfailed normally fails:

    2020-09-06T00:05:51.020 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:35: expect_false:  set -x
    2020-09-06T00:05:51.020 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:36: expect_false:  ceph mds rmfailed 0
    2020-09-06T00:05:51.318 INFO:tasks.workunit.client.0.smithi036.stderr:Error EPERM: WARNING: this can make your filesystem inaccessible! Add --yes-i-really-mean-it if you are sure you wish to continue.
    2020-09-06T00:05:51.321 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:36: expect_false:  return 0
    2020-09-06T00:05:51.322 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:989: test_mon_mds:  ceph mds rmfailed 0 --yes-i-really-mean-it
    2020-09-06T00:05:51.631 INFO:tasks.workunit.client.0.smithi036.stderr:Error EINVAL: Rank '0' not foundinvalid role '0'
    2020-09-06T00:05:51.634 INFO:tasks.workunit.client.0.smithi036.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephtool/test.sh:990: test_mon_mds:  set -e

From: /ceph/teuthology-archive/teuthology-2020-09-14_07:01:01-rados-master-distro-basic-smithi/5434134/teuthology.log

The change in 811e48d6ff causes an abort because
this failure is not caught in the parse_role hook.

Fixes: https://tracker.ceph.com/issues/47444
Fixes: 811e48d6ff
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-09-14 12:21:10 -07:00
Jason Dillaman
9929eff533
Merge pull request #37086 from trociny/wip-qa-rbd-nbd-unmap
qa/workunits/rbd: yet another attempt to improve rbd-nbd unmap

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-09-14 14:32:30 -04:00
Jason Dillaman
c5325306ed
Merge pull request #37038 from trociny/wip-rbd-nbd-quiesce-error
rbd-nbd: return quiesce hook exit code

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-09-14 14:31:58 -04:00
David Zafman
d09c87bf84 osd: Move scrubber info out of recovery_state and add fields to scrubber::dump()
Add scrubber::dump() function which is a more obvious place when adding fields
Indicate that the scrubber info in recovery_state is deprecated

Signed-off-by: David Zafman <dzafman@redhat.com>
2020-09-14 09:36:09 -07:00
lixiaoy1
c6919f7b03 rbd: add DIRTY_CACHE in IMPLICIT_ENABLE
Add DIRTY_CACHE IN RBD_FEATURES_IMPLICIT_ENABLE, so that when creating
images, it won't create an image with the DIRTY_CACHE feature.

Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
2020-09-14 12:12:40 -04:00
Mykola Golub
0d844728e9
Merge pull request #37107 from dillaman/wip-47405
qa/workunits/mon: fixed excessively large pool PG count

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-09-14 18:13:28 +03:00
Sebastian Wagner
bf9fef96c1
Merge pull request #37115 from sebastian-philipp/cephadm-refactor-cephamservice-create
mgr/cephadm: CephadmService.create -> CephadmService.prepare_create

Reviewed-by: Stephan Müller <smueller@suse.com>
2020-09-14 16:43:45 +02:00
Sebastian Wagner
209afa4869
Merge pull request #35945 from jschmid1/osdspec_limit_fixes
mgr/cephadm: allow to map existing daemons to osdspecs

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-09-14 16:41:57 +02:00
Dan van der Ster
48503413a2 ceph.in: ignore failures to flush stdout
Catch an IOError exception when flushing ceph stdout.

Fixes: https://tracker.ceph.com/issues/47442
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2020-09-14 16:32:52 +02:00
Casey Bodley
b15dadac70
Merge pull request #36997 from linuxbox2/wip-rgwlc-mtime
rgwlc:  fix (post-parallel) non-current expiration

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2020-09-14 10:19:25 -04:00
Casey Bodley
461f4a5f78
Merge pull request #37125 from tchaikov/wip-rgw-const-char
rgw: convert string constant to string_view

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2020-09-14 10:15:31 -04:00
Sebastian Wagner
0bcd29a247 mgr/cephadm: fix RemoveUtil.load_from_store()
* Run `json.loads` only once
* `nodename` -> `hostname`
* Remove network calls from `repr(OSD(...)`

Fixes: https://tracker.ceph.com/issues/47438

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-09-14 15:25:14 +02:00
Jason Dillaman
2fa9442dcc qa/workunits/mon: fixed excessively large pool PG count
Fixes: https://tracker.ceph.com/issues/47405
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-14 08:58:52 -04:00