]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix dashboard cephadm e2e errors 47137/head
authorNizamudeen A <nia@redhat.com>
Sun, 17 Jul 2022 18:38:13 +0000 (00:08 +0530)
committerNizamudeen A <nia@redhat.com>
Sun, 17 Jul 2022 18:55:28 +0000 (00:25 +0530)
https://tracker.ceph.com/issues/56079
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/controllers/osd.py
src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/06-cluster-check.e2e-spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.html

index dd3e80261acf69f257afe6afb5361a7cb93c61cc..d89ef0f287d2519e38070d4b235b6ee547bea85d 100644 (file)
@@ -371,7 +371,7 @@ class Osd(RESTController):
                     option]['encrypted'] = data[0]['encrypted']
                 orch.osds.create([DriveGroupSpec.from_json(
                     predefined_drive_groups[option])])
-            except (ValueError, TypeError, DriveGroupValidationError) as e:
+            except (ValueError, TypeError, KeyError, DriveGroupValidationError) as e:
                 raise DashboardException(e, component='osd')
 
     def _create_bare(self, data):
index 589cbaa904c23ddc7f6e93ed2a3ea5b789775ca0..a58db904174047405d44fc028bce039d3ec35b28 100644 (file)
@@ -32,35 +32,45 @@ describe('when cluster creation is completed', () => {
       hosts.navigateTo();
     });
 
-    it('should check if monitoring stacks are running on the root host', () => {
-      const monitoringStack = ['alertmanager', 'grafana', 'node-exporter', 'prometheus'];
-      hosts.clickTab('cd-host-details', 'ceph-node-00', 'Daemons');
-      for (const daemon of monitoringStack) {
-        cy.get('cd-host-details').within(() => {
-          services.checkServiceStatus(daemon);
-        });
-      }
-    });
-
-    // avoid creating node-exporter on the newly added host
-    // to favour the host draining process
-    it('should reduce the count for node-exporter', () => {
-      services.editService('node-exporter', '3');
-    });
-
     // grafana ip address is set to the fqdn by default.
     // kcli is not working with that, so setting the IP manually.
-    it('should change ip address of grafana', { retries: 2 }, () => {
+    it('should change ip address of grafana, prometheus and alertmanager', () => {
       const dashboardArr: Input[] = [
         {
           id: 'GRAFANA_API_URL',
           newValue: 'https://192.168.100.100:3000',
           oldValue: ''
+        },
+        {
+          id: 'PROMETHEUS_API_HOST',
+          newValue: 'http://192.168.100.100:9095',
+          oldValue: ''
+        },
+        {
+          id: 'ALERTMANAGER_API_HOST',
+          newValue: 'http://192.168.100.100:9093',
+          oldValue: ''
         }
       ];
       mgrmodules.editMgrModule('dashboard', dashboardArr);
     });
 
+    // avoid creating node-exporter on the newly added host
+    // to favour the host draining process
+    it('should reduce the count for node-exporter', { retries: 2 }, () => {
+      services.editService('node-exporter', '3');
+    });
+
+    it('should check if monitoring stacks are running on the root host', { retries: 2 }, () => {
+      const monitoringStack = ['alertmanager', 'grafana', 'node-exporter', 'prometheus'];
+      hosts.clickTab('cd-host-details', 'ceph-node-00', 'Daemons');
+      for (const daemon of monitoringStack) {
+        cy.get('cd-host-details').within(() => {
+          services.checkServiceStatus(daemon);
+        });
+      }
+    });
+
     it('should add one more host', () => {
       hosts.navigateTo('add');
       hosts.add(hostnames[3]);
index d4b6d9faea1099d2ce677d218a838d4d35035081..531bae2573941d9388f56206b2f3f2eae2111367 100644 (file)
@@ -41,7 +41,7 @@
                        [id]="'label_' + optionName"
                        [for]="optionName"
                        i18n>{{ deploymentOptions?.options[optionName].title }}
-                       {{ deploymentOptions.recommended_option === optionName ? "(Recommended)" : "" }}
+                       {{ deploymentOptions?.recommended_option === optionName ? "(Recommended)" : "" }}
                   <cd-helper>
                     <span>{{ deploymentOptions?.options[optionName].desc }}</span>
                   </cd-helper>