From: Nizamudeen A Date: Sun, 17 Jul 2022 18:38:13 +0000 (+0530) Subject: mgr/dashboard: fix dashboard cephadm e2e errors X-Git-Tag: v18.0.0~470^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad6831c0f3647ef3286dd5e77d6ab80918b9da96;p=ceph.git mgr/dashboard: fix dashboard cephadm e2e errors https://tracker.ceph.com/issues/56079 Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/controllers/osd.py b/src/pybind/mgr/dashboard/controllers/osd.py index dd3e80261acf..d89ef0f287d2 100644 --- a/src/pybind/mgr/dashboard/controllers/osd.py +++ b/src/pybind/mgr/dashboard/controllers/osd.py @@ -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): diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/06-cluster-check.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/06-cluster-check.e2e-spec.ts index 589cbaa904c2..a58db9041740 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/06-cluster-check.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/06-cluster-check.e2e-spec.ts @@ -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]); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.html index d4b6d9faea10..531bae257394 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.html @@ -41,7 +41,7 @@ [id]="'label_' + optionName" [for]="optionName" i18n>{{ deploymentOptions?.options[optionName].title }} - {{ deploymentOptions.recommended_option === optionName ? "(Recommended)" : "" }} + {{ deploymentOptions?.recommended_option === optionName ? "(Recommended)" : "" }} {{ deploymentOptions?.options[optionName].desc }}