File: bootstrap_firewalld.feature

package info (click to toggle)
crmsh 5.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,980 kB
  • sloc: python: 50,399; sh: 1,207; makefile: 255; xml: 243; exp: 234; awk: 22
file content (72 lines) | stat: -rw-r--r-- 4,151 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@bootstrap
Feature: Test deployment of high-availability firewalld service

  Need nodes: hanode1 hanode2 qnetd-node

  Scenario: The high-availability service is available
    Given   The "high-availability" firewalld service is available on "hanode1"
    And     The "high-availability" firewalld service is available on "hanode2"

  Scenario: The high-availability service is added after setup cluster while firewalld is offline
    Given   Cluster service is "stopped" on "hanode1"
    And     Cluster service is "stopped" on "hanode2"
    And     Service "firewalld" is "stopped" on "hanode1"
    And     Service "firewalld" is "stopped" on "hanode2"
    And     The "high-availability" firewalld service is not added on "hanode1"
    And     The "high-availability" firewalld service is not added on "hanode2"

    When    Run "crm cluster init -y" on "hanode1"
    Then    Cluster service is "started" on "hanode1"
    Then    The "high-availability" firewalld service is added on "hanode1"
    When    Run "crm cluster join -c hanode1 -y" on "hanode2"
    Then    Cluster service is "started" on "hanode2"
    Then    The "high-availability" firewalld service is added on "hanode2"

    When    Run "crm cluster remove hanode2 -y" on "hanode1"
    Then    Cluster service is "stopped" on "hanode2"
    Then    The "high-availability" firewalld service is not added on "hanode2"
    When    Run "crm cluster remove hanode1 -y --force" on "hanode1"
    Then    Cluster service is "stopped" on "hanode1"
    Then    The "high-availability" firewalld service is not added on "hanode1"

  Scenario: The high-availability service is added after setup cluster while firewalld is running
    Given   Cluster service is "stopped" on "hanode1"
    And     Cluster service is "stopped" on "hanode2"
    And     Service "firewalld" is "stopped" on "hanode1"
    And     Service "firewalld" is "stopped" on "hanode2"
    And     The "high-availability" firewalld service is not added on "hanode1"
    And     The "high-availability" firewalld service is not added on "hanode2"
    # open behave agent port
    When    Run "firewall-offline-cmd --add-port=1122/tcp" on "hanode1"
    When    Run "firewall-offline-cmd --add-port=1122/tcp" on "hanode2"
    When    Run "systemctl start firewalld" on "hanode2"
    When    Run "systemctl start firewalld" on "hanode1"
    Then    Service "firewalld" is "started" on "hanode2"
    Then    Service "firewalld" is "started" on "hanode1"

    When    Run "crm cluster init -y -N hanode2" on "hanode1"
    Then    Cluster service is "started" on "hanode1"
    Then    Cluster service is "started" on "hanode2"
    Then    The "high-availability" firewalld service is added on "hanode1"
    Then    The "high-availability" firewalld service is added on "hanode2"

    When    Run "firewall-cmd --permanent --remove-service=high-availability; firewall-cmd --reload" on "hanode1"
    Then    The "high-availability" firewalld service is not added on "hanode1"
    When    Run "firewall-cmd --permanent --remove-service=high-availability; firewall-cmd --reload" on "hanode2"
    Then    The "high-availability" firewalld service is not added on "hanode2"
    When    Run "crm cluster init firewalld -y" on "hanode1"
    Then    The "high-availability" firewalld service is added on "hanode1"
    Then    The "high-availability" firewalld service is added on "hanode2"

  Scenario: Verify qnetd server port
    Given   Cluster service is "started" on "hanode1"
    And     Cluster service is "started" on "hanode2"
    And     Service "firewalld" is "stopped" on "qnetd-node"
    When    Run "firewall-offline-cmd --add-port=1122/tcp" on "qnetd-node"
    When    Run "systemctl start firewalld" on "qnetd-node"
    Then    Service "firewalld" is "started" on "qnetd-node"
    When    Run "crm cluster init qdevice --qnetd-hostname=qnetd-node -y" on "hanode1"
    Then    Service "corosync-qdevice" is "started" on "hanode1"
    Then    Service "corosync-qdevice" is "started" on "hanode2"
    Then    Service "corosync-qnetd" is "started" on "qnetd-node"
    Then    Port "5403" protocol "tcp" is opened on "qnetd-node"