123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- # Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ---
- # Testcase OMNIA_USP_US_VFSP_TC_003
- # Execute slurm_manager role in manager node with os installed centos 7.9
- - name: OMNIA_USP_US_VFSP_TC_003
- hosts: manager
- vars_files:
- - test_vars/test_slurm_manager_vars.yml
- - ../appliance/roles/common/vars/main.yml
- tasks:
- - block:
- - name: Call cluster_validation role
- include_role:
- name: ../roles/cluster_validation
- tasks_from: fetch_password
- tags: TC_003
- - name: Call slurm manager role
- include_role:
- name: ../roles/slurm_manager
- tags: TC_003
- - name: Fetch slurm packages installed
- package_facts:
- manager: auto
- tags: TC_003,VERIFY_003
- - name: Start and enable firewalld
- service:
- name: firewalld
- state: started
- enabled: yes
- tags: TC_003, VERIFY_003
- - name: Checking firewalld tcp/udp ports on manager node
- command: firewall-cmd --list-ports
- register: manager_firewalld_ports
- when: "'manager' in group_names"
- tags: TC_003, VERIFY_003
- - name: Checking mariadb service status
- systemd:
- name: mariadb
- register: mariadb_service
- tags: TC_003, VERIFY_003
- - name: Validating tcp/udp ports on manager node
- assert:
- that:
- - "'6817/tcp' in manager_firewalld_ports.stdout"
- - "'6817/udp' in manager_firewalld_ports.stdout"
- - "'6818/tcp' in manager_firewalld_ports.stdout"
- - "'6818/udp' in manager_firewalld_ports.stdout"
- - "'6819/tcp' in manager_firewalld_ports.stdout"
- - "'6819/udp' in manager_firewalld_ports.stdout"
- fail_msg: "{{ manager_ports_status_fail_msg }}"
- success_msg: "{{ manager_ports_status_success_msg }}"
- when: "'manager' in group_names"
- tags: TC_003, VERIFY_003
- - name: Verify all slurm packages are installed
- assert:
- that: "'{{ item }}' in ansible_facts.packages"
- success_msg: "{{ slurm_packages_status_success_msg }}"
- fail_msg: "{{ slurm_packages_status_fail_msg }}"
- with_items:
- - "{{ slurm_packages }}"
- - "{{ dev_tools }}"
- tags: TC_003, VERIFY_003
- - name: Validating mariadb service status
- assert:
- that:
- - mariadb_service.status.ActiveState == 'active'
- fail_msg: "{{ mariadb_service_fail_msg }}"
- success_msg: "{{ mariadb_service_success_msg }}"
- tags: TC_003, VERIFY_003
- # Testcase OMNIA_USP_US_VFSP_TC_004
- # Execute slurm_manager role in manager node with slurm packages already installed
- - name: OMNIA_USP_US_VFSP_TC_004
- hosts: manager
- vars_files:
- - test_vars/test_slurm_manager_vars.yml
- - ../appliance/roles/common/vars/main.yml
- tasks:
- - block:
- - name: Call cluster_validation role
- include_role:
- name: ../roles/cluster_validation
- tasks_from: fetch_password
- tags: TC_004
- - name: Call slurm manager role
- include_role:
- name: ../roles/slurm_manager
- tags: TC_004
- - name: Fetch slurm packages installed
- package_facts:
- manager: auto
- tags: TC_004,VERIFY_004
- - name: Start and enable firewalld
- service:
- name: firewalld
- state: started
- enabled: yes
- tags: TC_004, VERIFY_004
- - name: Checking firewalld tcp/udp ports on manager node
- command: firewall-cmd --list-ports
- register: manager_firewalld_ports
- when: "'manager' in group_names"
- tags: TC_004, VERIFY_004
- - name: Checking mariadb service status
- systemd:
- name: mariadb
- register: mariadb_service
- tags: TC_004, VERIFY_004
- - name: Validating tcp/udp ports on manager node
- assert:
- that:
- - "'6817/tcp' in manager_firewalld_ports.stdout"
- - "'6817/udp' in manager_firewalld_ports.stdout"
- - "'6818/tcp' in manager_firewalld_ports.stdout"
- - "'6818/udp' in manager_firewalld_ports.stdout"
- - "'6819/tcp' in manager_firewalld_ports.stdout"
- - "'6819/udp' in manager_firewalld_ports.stdout"
- fail_msg: "{{ manager_ports_status_fail_msg }}"
- success_msg: "{{ manager_ports_status_success_msg }}"
- when: "'manager' in group_names"
- tags: TC_004, VERIFY_004
- - name: Verify all slurm packages are installed
- assert:
- that: "'{{ item }}' in ansible_facts.packages"
- success_msg: "{{ slurm_packages_status_success_msg }}"
- fail_msg: "{{ slurm_packages_status_fail_msg }}"
- with_items:
- - "{{ slurm_packages }}"
- - "{{ dev_tools }}"
- tags: TC_004, VERIFY_004
- - name: Validating mariadb service status
- assert:
- that:
- - mariadb_service.status.ActiveState == 'active'
- fail_msg: "{{ mariadb_service_fail_msg }}"
- success_msg: "{{ mariadb_service_success_msg }}"
- tags: TC_004, VERIFY_004
|