]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix wrong pg status processing 45360/head
authorErnesto Puerta <epuertat@redhat.com>
Fri, 11 Mar 2022 16:29:07 +0000 (17:29 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Fri, 11 Mar 2022 16:37:38 +0000 (17:37 +0100)
Fixes: https://tracker.ceph.com/issues/54481
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts

index 302c3e202c6f32378d147d9a48a81db0b88816d3..2b3e2975c4f87bd5f13da936830de47df1009893 100644 (file)
@@ -35,6 +35,7 @@ describe('PgCategoryService', () => {
 
     it(PgCategory.CATEGORY_WORKING, () => {
       testMethod('clean+scrubbing', PgCategory.CATEGORY_WORKING);
+      testMethod('active+clean+snaptrim_wait', PgCategory.CATEGORY_WORKING);
       testMethod(
         '  8 active+clean+scrubbing+deep, 255 active+clean  ',
         PgCategory.CATEGORY_WORKING
index d9c90e8b24e9066425ee0cc1c41351ba0dd13973..ae178ded2769d31692f3c6ef537f55223905287f 100644 (file)
@@ -54,7 +54,7 @@ export class PgCategoryService {
 
   private getPgStatesFromText(pgStatesText: string) {
     const pgStates = pgStatesText
-      .replace(/[^a-z]+/g, ' ')
+      .replace(/[^a-z_]+/g, ' ')
       .trim()
       .split(' ');