PROMETHEUS_RUNNING_COUNT=$(kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq -r '.[] | .status.running')
done
+# grafana ip address is set to the fqdn by default.
+# kcli is not working with that, so setting the IP manually.
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-alertmanager-api-host http://192.168.100.100:9093"'
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-prometheus-api-host http://192.168.100.100:9095"'
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-grafana-api-url https://192.168.100.100:3000"'
+kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch apply node-exporter --placement 'count:2'"'
+
cypress_run ["orchestrator/workflow/*.feature, orchestrator/workflow/*-spec.ts"]
cypress_run "orchestrator/grafana/*.feature"
echo "Starting cleanup..."
kcli delete plan -y ceph || true
kcli delete network ceph-dashboard -y
+ kcli delete pool ceph-dashboard -y
+ rm -rf ${HOME}/.kcli
docker container prune -f
echo "Cleanup completed."
fi
this.clickActionButton('start-drain');
this.checkLabelExists(hostname, ['_no_schedule'], true);
- // unselect it to avoid colliding with any other selection
- // in different steps
- this.getTableCell(this.columnIndex.hostname, hostname).click();
-
this.clickTab('cd-host-details', hostname, 'Daemons');
cy.get('cd-host-details').within(() => {
cy.wait(20000);
addService(
serviceType: string,
exist?: boolean,
- count = '1',
+ count = 1,
snmpVersion?: string,
snmpPrivProtocol?: boolean,
unmanaged = false
switch (serviceType) {
case 'rgw':
cy.get('#service_id').type('foo');
- unmanaged ? cy.get('label[for=unmanaged]').click() : cy.get('#count').type(count);
+ unmanaged ? cy.get('label[for=unmanaged]').click() : cy.get('#count').type(String(count));
break;
case 'ingress':
case 'nfs':
cy.get('#service_id').type('testnfs');
- unmanaged ? cy.get('label[for=unmanaged]').click() : cy.get('#count').type(count);
+ unmanaged ? cy.get('label[for=unmanaged]').click() : cy.get('#count').type(String(count));
break;
case 'snmp-gateway':
default:
cy.get('#service_id').type('test');
- unmanaged ? cy.get('label[for=unmanaged]').click() : cy.get('#count').type(count);
+ unmanaged ? cy.get('label[for=unmanaged]').click() : cy.get('#count').type(String(count));
break;
}
if (serviceType === 'snmp-gateway') {
And('I go to the {string} tab', (names: string) => {
for (const name of names.split(', ')) {
- cy.contains('.nav.nav-tabs li', name).click();
+ cy.contains('.nav.nav-tabs a', name).click();
}
});
When I click on "Add" button
And enter "hostname" "<hostname>"
And select options "<labels>"
- And I click on submit button
- Then I should see a row with "<hostname>"
+ And I click on "Add Host" button
+ Then I should not see the modal
+ And I should see a row with "<hostname>"
And I should see row "<hostname>" have "<labels>"
Examples:
Given I am on the "Add Hosts" section
When I click on "Add" button
And enter "hostname" "ceph-node-[01-02]"
- And I click on submit button
- Then I should see rows with following entries
+ And I click on "Add Host" button
+ Then I should not see the modal
+ And I should see rows with following entries
| hostname |
| ceph-node-01 |
| ceph-node-02 |
When I select a row "<hostname>"
And I click on "Edit" button from the table actions
And "add" option "<labels>"
- And I click on submit button
+ And I click on "Edit Host" button
Then I should see row "<hostname>" have "<labels>"
When I select a row "<hostname>"
And I click on "Edit" button from the table actions
And "remove" option "<labels>"
- And I click on submit button
+ And I click on "Edit Host" button
Then I should see row "<hostname>" does not have "<labels>"
Examples:
const createCluster = new CreateClusterWizardHelper();
const createClusterServicePage = new CreateClusterServicePageHelper();
- const createService = (serviceType: string, serviceName: string, count = '1') => {
+ const createService = (serviceType: string, serviceName: string, count = 1) => {
cy.get('[aria-label=Create]').first().click();
createClusterServicePage.addService(serviceType, false, count);
createClusterServicePage.checkExist(serviceName, true);
const serviceName = 'mds.test';
it('should create an mds service', () => {
- createService('mds', serviceName, '1');
+ createService('mds', serviceName);
});
it('should edit a service', () => {
describe('when Orchestrator is available', () => {
it('should create OSDs', () => {
- const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02'];
+ const hostnames = ['ceph-node-00', 'ceph-node-01'];
for (const hostname of hostnames) {
osds.create('hdd', hostname, true);
/* tslint:disable*/
-import { Input, ManagerModulesPageHelper } from '../../cluster/mgr-modules.po';
import { CreateClusterWizardHelper } from '../../cluster/create-cluster.po';
import { HostsPageHelper } from '../../cluster/hosts.po';
import { ServicesPageHelper } from '../../cluster/services.po';
const createCluster = new CreateClusterWizardHelper();
const services = new ServicesPageHelper();
const hosts = new HostsPageHelper();
- const mgrmodules = new ManagerModulesPageHelper();
const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
hosts.navigateTo();
});
- // 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, 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 add one more host', () => {
+ hosts.navigateTo('add');
+ hosts.add(hostnames[3]);
+ hosts.checkExist(hostnames[3], true);
});
it('should check if monitoring stacks are running on the root host', { retries: 2 }, () => {
}
});
- it('should add one more host', () => {
- hosts.navigateTo('add');
- hosts.add(hostnames[3]);
- hosts.checkExist(hostnames[3], true);
- });
-
it('should have removed "_no_schedule" label', () => {
for (const hostname of hostnames) {
hosts.checkLabelExists(hostname, ['_no_schedule'], false);
// rgw is needed for testing the force maintenance
it('should create rgw services', () => {
services.navigateTo('create');
- services.addService('rgw', false, '4');
+ services.addService('rgw', false, 4);
services.checkExist('rgw.foo', true);
});
it('should create and delete snmp-gateway service with version V2c', () => {
services.navigateTo('create');
- services.addService('snmp-gateway', false, '1', 'V2c');
+ services.addService('snmp-gateway', false, 1, 'V2c');
services.checkExist('snmp-gateway', true);
services.clickServiceTab('snmp-gateway', 'Details');
it('should create and delete snmp-gateway service with version V3', () => {
services.navigateTo('create');
- services.addService('snmp-gateway', false, '1', 'V3', true);
+ services.addService('snmp-gateway', false, 1, 'V3', true);
services.checkExist('snmp-gateway', true);
services.clickServiceTab('snmp-gateway', 'Details');
it('should create and delete snmp-gateway service with version V3 and w/o privacy protocol', () => {
services.navigateTo('create');
- services.addService('snmp-gateway', false, '1', 'V3', false);
+ services.addService('snmp-gateway', false, 1, 'V3', false);
services.checkExist('snmp-gateway', true);
services.clickServiceTab('snmp-gateway', 'Details');
import {
AfterViewInit,
+ ChangeDetectorRef,
Component,
Input,
OnChanges,
public actionLabels: ActionLabelsI18n,
private authStorageService: AuthStorageService,
private daemonService: DaemonService,
- private notificationService: NotificationService
+ private notificationService: NotificationService,
+ private cdRef: ChangeDetectorRef
) {}
ngOnInit() {
this.columns = this.columns.filter((col: any) => {
return !this.hiddenColumns.includes(col.prop);
});
+
+ setTimeout(() => {
+ this.cdRef.detectChanges();
+ }, 1000);
}
ngOnChanges() {