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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>