Skip to content

Commit 353b561

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[CI] Slim down Masakari job" into stable/wallaby
2 parents c49876a + cab226e commit 353b561

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed

tests/templates/inventory.j2

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
# These initial groups are the only groups required to be modified. The
22
# additional groups are for more control of the environment.
3+
4+
# NOTE(yoctozepto): In CI we want to test Masakari HA but not of other services,
5+
# to conserve the resources. Hence, we set Masakari groups to use both
6+
# primary and secondary while the parent group (control) uses only primary.
7+
38
[control]
4-
{% if scenario == 'monasca' %}
9+
{% if scenario == 'masakari' %}
10+
{% for host in hostvars if host in ['primary'] %}
11+
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
12+
{% endfor %}
13+
{% elif scenario == 'monasca' %}
514
{% for host in hostvars if host in ['primary', 'secondary1', 'secondary2'] %}
615
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
716
{% endfor %}
@@ -11,20 +20,25 @@
1120
{% endfor %}
1221
{% endif %}
1322

14-
{% if scenario == 'monasca' %}
1523
[network:children]
1624
control
17-
{% else %}
18-
[network]
19-
{% for host in hostvars %}
20-
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
21-
{% endfor %}
22-
{% endif %}
25+
26+
# NOTE(yoctozepto): Until we are able to isolate network namespaces in k-a,
27+
# we are forced to separate Pacemaker remotes from full members.
28+
# This is not as bad as it sounds, because it would be enforced in
29+
# non-containerised environments anyway.
30+
# In CI we want Pacemaker remotes to run on ternaries (to test multiple remotes).
2331

2432
[compute]
33+
{% if scenario == 'masakari' %}
34+
{% for host in hostvars if host in ['ternary1', 'ternary2'] %}
35+
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
36+
{% endfor %}
37+
{% else %}
2538
{% for host in hostvars %}
2639
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
2740
{% endfor %}
41+
{% endif %}
2842

2943
[storage]
3044
{% for host in hostvars %}
@@ -126,30 +140,20 @@ storage
126140
control
127141

128142
# NOTE(yoctozepto): Until we are able to isolate network namespaces in k-a,
129-
# we are forced to separate remotes from full members.
143+
# we are forced to separate Pacemaker remotes from full members.
130144
# This is not as bad as it sounds, because it would be enforced in
131145
# non-containerised environments anyway.
132-
#[hacluster:children]
133-
#control
146+
# In CI we want Pacemaker to run on primary and secondary (to test with HA).
147+
134148
[hacluster]
135149
{% for host in hostvars %}
136-
{% if 'ternary' not in host %}
150+
{% if host in ['primary', 'secondary'] %}
137151
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
138152
{% endif %}
139153
{% endfor %}
140154

141-
# NOTE(yoctozepto): Until we are able to isolate network namespaces in k-a,
142-
# we are forced to separate remotes from full members.
143-
# This is not as bad as it sounds, because it would be enforced in
144-
# non-containerised environments anyway.
145-
#[hacluster-remote:children]
146-
#compute
147-
[hacluster-remote]
148-
{% for host in hostvars %}
149-
{% if 'ternary' in host %}
150-
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
151-
{% endif %}
152-
{% endfor %}
155+
[hacluster-remote:children]
156+
compute
153157

154158
[haproxy:children]
155159
network
@@ -796,14 +800,18 @@ elasticsearch
796800
[prometheus-blackbox-exporter:children]
797801
monitoring
798802

803+
# NOTE(yoctozepto): In CI we want to test Masakari HA but not of other services,
804+
# to conserve the resources. Hence, we set Masakari groups to use both
805+
# primary and secondary while the parent group (control) uses only primary.
806+
799807
[masakari-api:children]
800-
control
808+
hacluster
801809

802810
[masakari-engine:children]
803-
control
811+
hacluster
804812

805813
[masakari-hostmonitor:children]
806-
control
814+
hacluster
807815

808816
[masakari-instancemonitor:children]
809817
compute

0 commit comments

Comments
 (0)