diff options
| author | Zuul <zuul@review.opendev.org> | 2026-04-25 13:25:54 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2026-04-25 13:25:54 +0000 |
| commit | 6c0e560ae6398a97df9242fe9e2836e3c2144a71 (patch) | |
| tree | c26764c49f5da5ba019c6eb2a464896e6c89d035 /tests | |
| parent | 700f0db544a2d1c6f465d8d2dc74a2da07e22248 (diff) | |
| parent | 0f4c8544d8b822bd0d97da75b47b1244d147bef3 (diff) | |
| download | kolla-ansible-6c0e560ae6398a97df9242fe9e2836e3c2144a71.tar.gz kolla-ansible-6c0e560ae6398a97df9242fe9e2836e3c2144a71.zip | |
Merge "Support multiple Nova Compute Ironic instances"
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.yml | 11 | ||||
| -rw-r--r-- | tests/templates/globals-default.j2 | 16 | ||||
| -rw-r--r-- | tests/templates/inventory.j2 | 19 | ||||
| -rw-r--r-- | tests/templates/ironic-overrides.j2 | 10 |
4 files changed, 50 insertions, 6 deletions
diff --git a/tests/run.yml b/tests/run.yml index 8dd6c62c6..efa817e24 100644 --- a/tests/run.yml +++ b/tests/run.yml @@ -208,10 +208,10 @@ # ironic.conf - src: "tests/templates/ironic-overrides.j2" dest: /etc/kolla/config/ironic.conf - when: "{{ scenario == 'ironic' }}" + when: "{{ scenario == 'ironic' or scenario == 'multi-compute-ironic' }}" - src: "tests/templates/tenks-deploy-config.yml.j2" dest: "{{ ansible_env.HOME }}/tenks.yml" - when: "{{ scenario == 'ironic' }}" + when: "{{ scenario == 'ironic' or scenario == 'multi-compute-ironic' }}" # keystone-federation config - src: "tests/templates/keystone-federation/idp.example.org%2Frealms%2Fexample.conf.j2" dest: "/etc/kolla/config/keystone-httpd/federation/oidc/metadata/idp.example.org%2Frealms%2Fexample.conf" @@ -243,7 +243,7 @@ dest: ironic-agent.initramfs - src: "ipa-centos9-{{ zuul.branch | replace('/', '-') }}.kernel" dest: ironic-agent.kernel - when: scenario == "ironic" + when: scenario == "ironic" or scenario == "multi-compute-ironic" - block: - name: Slurp requirements.yml @@ -427,7 +427,7 @@ EXT_NET_GATEWAY: "{{ neutron_external_network_prefix }}1" EXT_NET_DEMO_ROUTER_ADDR: "{{ neutron_external_network_prefix }}10" SCENARIO: "{{ scenario }}" - when: openstack_core_tested or scenario in ['ironic', 'magnum', 'nfv', 'zun', 'octavia'] + when: openstack_core_tested or scenario in ['ironic', 'multi-compute-ironic' ,'magnum', 'nfv', 'zun', 'octavia'] - name: Test OVN VPNaaS import_role: @@ -494,7 +494,8 @@ chdir: "{{ kolla_ansible_src_dir }}" environment: TLS_ENABLED: "{{ tls_enabled }}" - when: scenario == "ironic" + MULTI_COMPUTE_IRONIC: "{{ scenario == 'multi-compute-ironic' }}" + when: scenario == "ironic" or scenario == "multi-compute-ironic" - name: Run test-magnum.sh script script: diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index f5f005acd..ca2ad562e 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -138,6 +138,22 @@ enable_proxysql: "yes" enable_prometheus_proxysql_exporter: "yes" {% endif %} +{% if scenario == "multi-compute-ironic" %} +nova_multi_compute_ironic_config: + - {} + - "shard_key": "shard_1" + "conductor_group": "location_1" + - "shard_key": "shard_2" + "conductor_group": "location_1" + - "conductor_group": "location_2" + +enable_ironic: "yes" +enable_ironic_pxe_filter: "yes" +ironic_dnsmasq_dhcp_ranges: + - range: "10.42.0.2,10.42.0.254,255.255.255.0" +ironic_internal_endpoint: http://192.0.2.1:6385 +{% endif %} + {% if scenario == "mariadb" %} enable_fluentd: "yes" enable_mariadb: "yes" diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2 index 2991518ce..a3bea7213 100644 --- a/tests/templates/inventory.j2 +++ b/tests/templates/inventory.j2 @@ -6,7 +6,7 @@ # primary and secondary while the parent group (control) uses only primary. [control] -{% if scenario == 'masakari' %} +{% if scenario in ['masakari', 'multi-compute-ironic'] %} {% for host in hostvars if host in ['primary'] %} {{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} {% endfor %} @@ -299,8 +299,25 @@ nova [nova-spicehtml5proxy:children] nova +{% if scenario == 'multi-compute-ironic' %} +[nova-compute-ironic-1] +primary +[nova-compute-ironic-2] +secondary1 +[nova-compute-ironic-3] +secondary2 +[nova-compute-ironic-4] +secondary2 + +[nova-compute-ironic:children] +nova-compute-ironic-1 +nova-compute-ironic-2 +nova-compute-ironic-3 +nova-compute-ironic-4 +{% else %} [nova-compute-ironic:children] nova +{% endif %} [nova-serialproxy:children] nova diff --git a/tests/templates/ironic-overrides.j2 b/tests/templates/ironic-overrides.j2 index be944b307..9603d6b2c 100644 --- a/tests/templates/ironic-overrides.j2 +++ b/tests/templates/ironic-overrides.j2 @@ -2,6 +2,16 @@ enabled_inspect_interfaces = no-inspect, agent default_inspect_interface = agent +{% if scenario == "multi-compute-ironic" %} +{% raw %} +{% set cg = 'location_1' if inventory_hostname == 'secondary1' else 'location_2' if inventory_hostname == 'secondary2' %} +{% if cg %} +[conductor] +conductor_group = {{ cg }} +{% endif %} +{% endraw %} +{% endif %} + [neutron] cleaning_network = public1 inspection_network = public1 |
