From: Francesco Torchia Date: Fri, 26 Aug 2022 15:39:43 +0000 (+0200) Subject: mgr/dashboard: Add details to the modal which displays the `safe-to-destroy` result X-Git-Tag: v18.0.0~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0d6100bbf99ffa8da0e099343ede050f1cca509c;p=ceph.git mgr/dashboard: Add details to the modal which displays the `safe-to-destroy` result - Add warnings type information in the case of the OSDs are not safe to destroy - Add info type information in the case of the OSDs are safe to destroy Fixes: https://tracker.ceph.com/issues/37327 Signed-off-by: Francesco Torchia --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html index afec81d9d197..5322ddea8872 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html @@ -64,13 +64,50 @@
- The {selection.hasSingleSelection, select, true {OSD is} other {OSDs are}} not safe to be - {{ actionDescription }}! {{ message }} + class="danger mb-3"> + + + The {selection.hasSingleSelection, select, true {OSD is} other {OSDs are}} not safe to be + {{ actionDescription }}! + +
+
    +
  • + {selection.hasSingleSelection, select, true {} other {{{ active | join }} : }} + Some PGs are currently mapped to + {active.length === 1, select, true {it} other {them}}. +
  • +
  • + {selection.hasSingleSelection, select, true {} other {{{ missingStats | join }} : }} + There are no reported stats and not all PGs are active and clean. +
  • +
  • + {selection.hasSingleSelection, select, true {OSD} other {{{ storedPgs | join }} : OSDs }} + still store some PG data and not all PGs are active and clean. +
  • +
  • + {{ message }} +
  • +
+
+
+
+ + + The {selection.hasSingleSelection, select, true {OSD is} other {OSDs are}} + safe to destroy without reducing data durability. + +
OSD {{ osdIds | join }} will be {{ actionDescription }} if you proceed. diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts index 9f418e0e3426..ec8268d8b040 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts @@ -580,6 +580,9 @@ export class OsdListComponent extends ListWithDetails implements OnInit { bodyContext: { safeToPerform: result[checkKey], message: result.message, + active: result.active, + missingStats: result.missing_stats, + storedPgs: result.stored_pgs, actionDescription: templateItemDescription, osdIds: this.getSelectedOsdIds() }, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts index 10a0cf47f088..34461bf63149 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts @@ -165,6 +165,9 @@ export class OsdService { safeToDestroy(ids: string) { interface SafeToDestroyResponse { + active: number[]; + missing_stats: number[]; + stored_pgs: number[]; is_safe_to_destroy: boolean; message?: string; }