]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: show a message to restart the rgw daemons after moving from single... 53673/head
authorAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Tue, 26 Sep 2023 12:27:39 +0000 (17:57 +0530)
committerAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Tue, 3 Oct 2023 10:03:44 +0000 (15:33 +0530)
Fixes: https://tracker.ceph.com/issues/62984
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html
src/pybind/mgr/dashboard/services/cluster.py

index 8523727bb0afcb3ed196fadea095420e20cdf3c6..3efdf7bbbddc7bf7a8e665f6b6a23144f1d0de80 100644 (file)
@@ -9,6 +9,14 @@
            (click)="enableRgwModule()">
            Enable RGW Module</a>
       </cd-alert-panel>
+      <cd-alert-panel   *ngIf="restartGatewayMessage"
+                        type="warning"
+                        spacingClass="mb-3"
+                        i18n>Please restart all Ceph Object Gateway instances in all zones to ensure consistent multisite configuration updates.
+        <a class="text-decoration-underline"
+           routerLink="/services">
+           Cluster->Services</a>
+      </cd-alert-panel>
       <cd-table-actions class="btn-group mb-4 me-2"
                         [permission]="permission"
                         [selection]="selection"
index 5a667cbe41f5986d5f8542878e9e190e18dcb159..d424d1c428c6e9e1872bc544d7a5c63100b2e5ef 100644 (file)
@@ -97,6 +97,7 @@ export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit {
   deleteTitle: string = 'Delete';
   disableExport = true;
   rgwModuleStatus: boolean;
+  restartGatewayMessage = false;
   rgwModuleData: string | any[] = [];
 
   constructor(
@@ -386,6 +387,17 @@ export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit {
     this.realmIds = [];
     this.zoneIds = [];
     this.getDisableMigrate();
+    this.rgwDaemonService.list().subscribe((data: any) => {
+      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;
   }
 
index df121a4a5b4bad5aa4c9f0837043217b4f1aab0c..4c2f53b6af1fa11471db850d83072507cfd26938 100644 (file)
@@ -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();
       },
index 03f079c9c85dfd2a214b13a4961f8b278569c4ff..e8c7f9fe47b0a43f01add779f9821dede2ca0be2 100644 (file)
@@ -4,7 +4,7 @@
     <li *ngFor="let status of zone.fullSyncStatus">
       <span *ngIf="!status?.includes(zone.name) && !status?.includes(zone.syncstatus) && !status?.includes('failed') && !status?.includes('error')">
         <span *ngIf="status?.includes(':')">
-          <b>{{ status.split(':')[0] | titlecase }}</b>:{{ status.split(':')[1] | titlecase}}
+          <b>{{ status.split(': ')[0] | titlecase }}</b>:{{ status.split(': ')[1] | titlecase}}
         </span>
         <span *ngIf="!status?.includes(':')">
           <b>{{ status | titlecase }}</b>
index f5df9bc0d9f41f81b7fd2a54a0432daf6ed1f34a..9caaf1963366b978b5ed7e3236500c8363e559d9 100644 (file)
@@ -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