From 25b98b2ce322a6fa04c3709597a341b7cd1a0c3d Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 17 Oct 2019 14:43:18 +0200 Subject: [PATCH] tests: add multimds coverage This commit makes the all_daemons scenario deploying 3 mds in order to cover the multimds case. Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/rolling_update.yml | 9 +++++++++ tests/functional/all_daemons/container/group_vars/all | 3 ++- tests/functional/all_daemons/container/hosts | 2 ++ tests/functional/all_daemons/container/hosts-ubuntu | 2 ++ .../all_daemons/container/vagrant_variables.yml | 2 +- tests/functional/all_daemons/group_vars/all | 1 + tests/functional/all_daemons/hosts | 2 ++ tests/functional/all_daemons/hosts-switch-to-containers | 2 ++ tests/functional/all_daemons/hosts-ubuntu | 2 ++ tests/functional/all_daemons/vagrant_variables.yml | 2 +- 10 files changed, 24 insertions(+), 3 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index e971de817..4d42e5afd 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -588,6 +588,15 @@ name: ceph-mds@{{ hostvars[item]['ansible_hostname'] }} state: stopped enabled: no + delegate_to: "{{ item }}" + with_items: "{{ groups['standby_mdss'] }}" + when: groups['standby_mdss'] | default([]) | length > 0 + + # dedicated task for masking systemd unit + # somehow, having a single task doesn't work in containerized context + - name: mask systemd units for standby ceph mds + systemd: + name: ceph-mds@{{ hostvars[item]['ansible_hostname'] }} masked: yes delegate_to: "{{ item }}" with_items: "{{ groups['standby_mdss'] }}" diff --git a/tests/functional/all_daemons/container/group_vars/all b/tests/functional/all_daemons/container/group_vars/all index d1eb1b582..96da0ed86 100644 --- a/tests/functional/all_daemons/container/group_vars/all +++ b/tests/functional/all_daemons/container/group_vars/all @@ -39,4 +39,5 @@ openstack_pools: - "{{ openstack_cinder_pool }}" docker_pull_timeout: 600s handler_health_mon_check_delay: 10 -handler_health_osd_check_delay: 10 \ No newline at end of file +handler_health_osd_check_delay: 10 +mds_max_mds: 3 \ No newline at end of file diff --git a/tests/functional/all_daemons/container/hosts b/tests/functional/all_daemons/container/hosts index d3b73e10f..06596f081 100644 --- a/tests/functional/all_daemons/container/hosts +++ b/tests/functional/all_daemons/container/hosts @@ -12,6 +12,8 @@ osd1 osd_crush_location="{ 'root': 'default', 'host': 'osd1' }" [mdss] mds0 +mds1 +mds2 [rgws] rgw0 diff --git a/tests/functional/all_daemons/container/hosts-ubuntu b/tests/functional/all_daemons/container/hosts-ubuntu index 7a8fc4092..5e22f90e3 100644 --- a/tests/functional/all_daemons/container/hosts-ubuntu +++ b/tests/functional/all_daemons/container/hosts-ubuntu @@ -12,6 +12,8 @@ osd1 osd_crush_location="{ 'root': 'default', 'host': 'osd1' }" [mdss] mds0 +mds1 +mds2 [rgws] rgw0 diff --git a/tests/functional/all_daemons/container/vagrant_variables.yml b/tests/functional/all_daemons/container/vagrant_variables.yml index e1f0e01c1..c49adaf90 100644 --- a/tests/functional/all_daemons/container/vagrant_variables.yml +++ b/tests/functional/all_daemons/container/vagrant_variables.yml @@ -6,7 +6,7 @@ docker: True # DEFINE THE NUMBER OF VMS TO RUN mon_vms: 3 osd_vms: 2 -mds_vms: 1 +mds_vms: 3 rgw_vms: 1 nfs_vms: 1 grafana_server_vms: 0 diff --git a/tests/functional/all_daemons/group_vars/all b/tests/functional/all_daemons/group_vars/all index 7a79329a3..f91c8b10f 100644 --- a/tests/functional/all_daemons/group_vars/all +++ b/tests/functional/all_daemons/group_vars/all @@ -33,3 +33,4 @@ openstack_pools: - "{{ openstack_cinder_pool }}" handler_health_mon_check_delay: 10 handler_health_osd_check_delay: 10 +mds_max_mds: 3 diff --git a/tests/functional/all_daemons/hosts b/tests/functional/all_daemons/hosts index 29f84c79b..44e193083 100644 --- a/tests/functional/all_daemons/hosts +++ b/tests/functional/all_daemons/hosts @@ -12,6 +12,8 @@ osd1 osd_crush_location="{ 'root': 'default', 'host': 'osd1' }" [mdss] mds0 +mds1 +mds2 [rgws] rgw0 diff --git a/tests/functional/all_daemons/hosts-switch-to-containers b/tests/functional/all_daemons/hosts-switch-to-containers index 4c8af9000..8c3aed16a 100644 --- a/tests/functional/all_daemons/hosts-switch-to-containers +++ b/tests/functional/all_daemons/hosts-switch-to-containers @@ -14,6 +14,8 @@ osd0 [mdss] mds0 +mds1 +mds2 [rgws] rgw0 diff --git a/tests/functional/all_daemons/hosts-ubuntu b/tests/functional/all_daemons/hosts-ubuntu index 550130871..1d84070a0 100644 --- a/tests/functional/all_daemons/hosts-ubuntu +++ b/tests/functional/all_daemons/hosts-ubuntu @@ -12,6 +12,8 @@ osd1 osd_crush_location="{ 'root': 'default', 'host': 'osd1' }" [mdss] mds0 +mds1 +mds2 [rgws] rgw0 diff --git a/tests/functional/all_daemons/vagrant_variables.yml b/tests/functional/all_daemons/vagrant_variables.yml index 31c5c040a..0062ac71e 100644 --- a/tests/functional/all_daemons/vagrant_variables.yml +++ b/tests/functional/all_daemons/vagrant_variables.yml @@ -6,7 +6,7 @@ docker: false # DEFINE THE NUMBER OF VMS TO RUN mon_vms: 3 osd_vms: 2 -mds_vms: 1 +mds_vms: 3 rgw_vms: 1 nfs_vms: 1 grafana_server_vms: 0