From 3c58cd6e801cd5774cf55f21cef343f8516702e7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Wed, 23 Sep 2020 11:16:44 +0200 Subject: [PATCH] mgr/dashboard: Add clay plugin support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The erasure code plugin "clay" is now supported by the dashboard. Now a clay based profile can be created in the ec profile creation modal dialog which can be found in the pool form. The defaults of the plugin are calculated or preselected and shown in the dashboard, therefore things are made mandatory even if they are not on the cli, but as they automatically set the user doesn't have to set them, but sees the defaults instantly before creating the profile. (This is the same behavior that is used for all other supported plugins.) Fixes: https://tracker.ceph.com/issues/44433 Signed-off-by: Stephan Müller (cherry picked from commit b3fd05bbc568cb775d25032ce87ea8dbb5106b3a) Conflicts: src/pybind/mgr/dashboard/frontend/src/app/shared/api/erasure-code-profile.service.ts Fixed conflicts because https://github.com/ceph/ceph/pull/34696 has not been backported to octopus. --- doc/rados/operations/erasure-code-clay.rst | 2 +- .../controllers/erasure_code_profile.py | 4 +- ...ure-code-profile-form-modal.component.html | 73 +++++- ...-code-profile-form-modal.component.spec.ts | 219 ++++++++++++++++-- ...asure-code-profile-form-modal.component.ts | 146 ++++++++++-- .../api/erasure-code-profile.service.ts | 17 +- .../app/shared/models/erasure-code-profile.ts | 2 + 7 files changed, 414 insertions(+), 49 deletions(-) diff --git a/doc/rados/operations/erasure-code-clay.rst b/doc/rados/operations/erasure-code-clay.rst index ccf3b309c39c..3c09314236be 100644 --- a/doc/rados/operations/erasure-code-clay.rst +++ b/doc/rados/operations/erasure-code-clay.rst @@ -88,7 +88,7 @@ Where: :Description: Number of OSDs requested to send data during recovery of a single chunk. *d* needs to be chosen such that - k+1 <= d <= k+m-1. Larger the *d*, the better the savings. + k+1 <= d <= k+m-1. The larger the *d*, the better the savings. :Type: Integer :Required: No. diff --git a/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py b/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py index 3c8ba61f9f8a..6842943c193e 100644 --- a/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py +++ b/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py @@ -47,8 +47,8 @@ class ErasureCodeProfileUi(ErasureCodeProfile): """ config = mgr.get('config') return { - # Because 'shec' is experimental it's not included - 'plugins': config['osd_erasure_code_plugins'].split() + ['shec'], + # Because 'shec' and 'clay' are experimental they're not included + 'plugins': config['osd_erasure_code_plugins'].split() + ['shec', 'clay'], 'directory': config['erasure_code_dir'], 'nodes': mgr.get('osd_map_tree')['nodes'], 'names': [name for name, _ in diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html index cbdeb36b1b4a..a6510eccf0f3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html @@ -147,6 +147,56 @@ +
+ +
+
+ + + + +
+ D is automatically updated on k and m changes + + D can be set from {{getDMin()}} to {{getDMax()}} + D can only be set to {{getDMax()}} + + D has to be greater than k ({{getDMin()}}). + D has to be lower than k + m ({{getDMax()}}). +
+
+