From 87b23be6c87699f8384a9fbf8a85dcbd688c3e73 Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Tue, 26 Sep 2023 17:57:39 +0530 Subject: [PATCH] mgr/dashboard: show a message to restart the rgw daemons after moving from single-site to multi-site Fixes: https://tracker.ceph.com/issues/62984 Signed-off-by: Aashish Sharma (cherry picked from commit ab06466aa2bb7ddc97ccc33acb3aa6ce35582f05) --- .../rgw-multisite-details.component.html | 8 ++++++++ .../rgw-multisite-details.component.ts | 12 ++++++++++++ .../rgw-multisite-migrate.component.ts | 1 - .../rgw-sync-data-info.component.html | 2 +- src/pybind/mgr/dashboard/services/cluster.py | 6 +++--- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html index 8523727bb0a..3efdf7bbbdd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html @@ -9,6 +9,14 @@ (click)="enableRgwModule()"> Enable RGW Module + Please restart all Ceph Object Gateway instances in all zones to ensure consistent multisite configuration updates. + + Cluster->Services + { + const realmName = data.map((item: { [x: string]: any }) => item['realm_name']); + if ( + this.defaultRealmId != '' && + this.defaultZonegroupId != '' && + this.defaultZoneId != '' && + realmName.includes('') + ) { + this.restartGatewayMessage = true; + } + }); return allNodes; } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.ts index 4ede615a2e4..725cd52f5c0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.ts @@ -183,7 +183,6 @@ export class RgwMultisiteMigrateComponent implements OnInit { NotificationType.success, $localize`${this.actionLabels.MIGRATE} done successfully` ); - this.notificationService.show(NotificationType.success, `Daemon restart scheduled`); this.submitAction.emit(); this.activeModal.close(); }, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html index 03f079c9c85..e8c7f9fe47b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html @@ -4,7 +4,7 @@
  • - {{ status.split(':')[0] | titlecase }}:{{ status.split(':')[1] | titlecase}} + {{ status.split(': ')[0] | titlecase }}:{{ status.split(': ')[1] | titlecase}} {{ status | titlecase }} diff --git a/src/pybind/mgr/dashboard/services/cluster.py b/src/pybind/mgr/dashboard/services/cluster.py index f5df9bc0d9f..9caaf196336 100644 --- a/src/pybind/mgr/dashboard/services/cluster.py +++ b/src/pybind/mgr/dashboard/services/cluster.py @@ -56,10 +56,10 @@ class ClusterModel: for pool in df['pools']: pool_name = str(pool['name']) if pool_name in rgw_pools_data: - objects = pool['stats']['objects'] - pool_bytes_used = pool['stats']['bytes_used'] - total_pool_bytes_used += pool_bytes_used if pool_name.endswith('.data'): + objects = pool['stats']['objects'] + pool_bytes_used = pool['stats']['bytes_used'] + total_pool_bytes_used += pool_bytes_used total_data_pool_objects += objects replica = rgw_pools_data[pool_name] total_data_pool_bytes_used += pool_bytes_used / replica -- 2.39.5