`terminal.warning()` excepts a `str`.
Passing `e` means we pass a type `exceptions.RuntimeError`
Changing to `terminal.warning(e.message)` fixes the issue.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1877672
Resolves: rhbz#1877672
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
In iSCSI scenario (via tcmu-runner), after a client has acquired exclusive
lock on an image, users will no longer be able to set metadata on the image.
This commit try to fix it by forward the request to the lock owner.
Steps to reproduce:
1. Client A:
```
>>> import rbd, rados;client=rados.Rados(conffile='');client.connect();ioctx=client.open_ioctx('rbd');rbd_inst=rbd.RBD();image=rbd.Image(ioctx, 'img1')
>>> from rbd import RBD_LOCK_MODE_EXCLUSIVE
>>> image.lock_acquire(RBD_LOCK_MODE_EXCLUSIVE)
>>>
```
2. Client B:
```
$ rbd image-meta set img1 conf_rbd_qos_iops_limit 10000
2020-09-12T15:19:58.325+0800 7f161affd700 -1 librbd::ManagedLock: 0x7f15f4001d48 handle_acquire_lock: failed to acquire exclusive lock:(30) Read-only file system
failed to set metadata conf_rbd_qos_iops_limit of image : (30) Read-only file system
rbd: setting metadata failed: (30) Read-only file system
$
```
Signed-off-by: songweibin <song.weibin@zte.com.cn>
This commit adds the first CryptoInterface implementation
which translates bufferlist encryption to the standard api of crypto libraries,
i.e. using block ciphers operating on C-style arrays.
It defines an abstract DataCryptor interface to allow different crypto libraries implementations.
With this commit, we add an OpenSSL based implementation.
Lastly, we implement a context-pool wrapper implementation to optimize performance.
Signed-off-by: Or Ozeri <oro@il.ibm.com>
it turns out `len` is longer than the length of demangled symbol,
let's rely on the `\0` sentry in the returned char* string instead.
in this change, use `status` to tell if the demangle is successful or
not.
Fixes: https://tracker.ceph.com/issues/47552
Signed-off-by: Kefu Chai <kchai@redhat.com>
instead of assuming that the function passed to finally() returns an
erroratorized future, in this change:
* s/safe_then/then_wrapped/ to handle the exception thrown by
the finally function.
* specialize for the case where the finally function does not return
a future, and just call it. note, in seastar's implementation of
finally, `finally_body` is used for specializing these two cases.
* rename "future" to "result", for better readability.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Replaced the content of `HACKING.rst` in the dashboard source code
directory with a pointer to the new location in the developer guide.
Updated references in `README.rst` to also point to the online versions
of these files.
Fixes: tracker.ceph.com/issues/47396
Signed-off-by: Lenz Grimmer <lgrimmer@suse.com>
mds_cluster.mds_fail() runs command "mds fail" not "fs fail". The reason
for failure was PR #32581 which accidentally changed the return code
from 0 to EINVAL. Since this was reversed in PR #37159, the change
introduced by 04ed58f is not only incorrect but also redundant.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
mgr/dashboard: Disabling the form inputs for the read_only modals
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
Added a separate endpoint for osd/histogram - api/osd/{svc_id}/histogram
Fixes:https://tracker.ceph.com/issues/46898
Signed-off-by: Aashish Sharma <aasharma@redhat.com>