From 94f99be1ddd263506231ec5b72b576a6c63d82c6 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 18 Feb 2019 15:38:07 +0100 Subject: [fuel] Skip baremetal cmp cfg if scenario lacks it Some upcoming scenarios do not define any compute nodes, so skip adding the nodes to MaaS machine list too. Change-Id: I895d8c7cb54783a57667d20f672b8ff870105cfc Signed-off-by: Alexandru Avadanii --- config/installers/fuel/pod_config.yml.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/installers/fuel/pod_config.yml.j2') diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2 index edb63eec..7f53b59c 100644 --- a/config/installers/fuel/pod_config.yml.j2 +++ b/config/installers/fuel/pod_config.yml.j2 @@ -13,9 +13,10 @@ parameters: region: machines: {%- set ctl_roles = 3 if 'virtual' not in conf else conf.virtual.nodes.control | length %} + {%- set has_cmp = True if 'virtual' not in conf else 'compute' in conf.virtual.nodes %} {%- for node in conf.nodes %} {%- if (node.node.type == 'baremetal' and ( - loop.index > nm.cmp001.idx or loop.index0 < ctl_roles)) %} + (has_cmp and loop.index > nm.cmp001.idx) or loop.index0 < ctl_roles)) %} {%- if loop.index > nm.cmp001.idx %} cmp{{ '%03d' | format(loop.index - nm.cmp001.idx) }}: {%- elif 'virtual' not in conf %} {#- strictly for Pharos verify job #} -- cgit 1.2.3-korg