Disable clone action when RBD snapshot is not protected
and clone format version is 1.
Fixes: https://tracker.ceph.com/issues/37873
Signed-off-by: Tiago Melo <tmelo@suse.com>
The API call is a task and the response status is determined by whether
the call is completed within a pre-defined duration (2 seconds) or not.
We should also allow the status when the call takes longer.
Fixes: https://tracker.ceph.com/issues/46812
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
Add support for RBD Image Format v1:
- This format lacks ID field, required for dashboard. Instead,
RBD image `block_name_prefix` is used as unique ID (together with pool
id and namespace)
- Additionally, `image_format` is now exposed.
- In the front-end side:
- Copy action on a v1 image will cause the image to be copied to v2
format.
- List doesn't allow Move to Trash on v1 images,
- Details section now shows `image_format` for images,
- Edit Form disables flags not supported for v1 (`deep-flatten`,
`layering`, `exclusive-lock`).
- Protect does not work on v1 images or v2 images created from v1
ones.
Fixes: https://tracker.ceph.com/issues/36354
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
this change partially reverts #34139
using relative import helps with readability and ease the pain to write
down the full parent module name
in #34139, all relative imports were replaced with full path, because we
were using following code to verify if the code is python3 compatible:
```
mod_spec = importlib.util.spec_from_file_location(mod_name, path)
mod = importlib.util.module_from_spec(mod_spec)
mod_spec.loader.exec_module(mod)
```
but this does not work with submodule which can import using relative
import without specifying the name of the package and its parent module.
Signed-off-by: Kefu Chai <kchai@redhat.com>
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.
Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
This commit fixes a problem caused by changes to the error
descriptions in the RBD python bindings introduced in:
a66b06cc76
Signed-off-by: Ricardo Dias <rdias@suse.com>
Now object-map and fast-diff features are interlocked. Allow
enabling/disabling these two features together without raising an already
enabled/disabled error.
Fixes: http://tracker.ceph.com/issues/39933
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
Created a decorator and pipe to help encode special URI components in the
frontend.
Modified the backend request handler to decode all the string args.
fixes: http://tracker.ceph.com/issues/24621
Signed-off-by: Tiago Melo <tmelo@suse.com>
mgr/dashboard: Convert the RBD feature names to a list of strings
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Until now the API returns the features provided by an RBD as one comma
separated string. It's more usable for the frontend to receive a list
of strings instead.
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
Skip the test case 'test_create_rbd_in_data_pool' only if the cluster
does not support bluestore, otherwise run the test. The Ceph mgr
provides the information if the cluster supports bluestore or not, so
the test will be skipped depending on the current cluster.
Signed-off-by: Tatjana Dehler <tdehler@suse.com>