Skip to content

Commit c82a0da

Browse files
[ci_gen_kustomize_values] Fix bmo01 scenario
bmo01 scneario template generates duplicate YAML keys when processing multi-ppart inventory hostnames, causing Nodeset deployment timeout. This bug casues data loss (first host) when adding a misnamed node (duplicate key survivor) This PR tries to fix. fixes: OSPRH-32215 Signed-off-by: Abhishek Bongale <abhishekbongale@outlook.com>
1 parent 98e89db commit c82a0da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • roles/ci_gen_kustomize_values/templates/bmo01/nodeset-values

roles/ci_gen_kustomize_values/templates/bmo01/nodeset-values/values.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data:
1616
rhos-release {{ cifmw_repo_setup_rhos_release_args }}
1717
nodes:
1818
{% for host in cifmw_networking_env_definition.instances.keys() if host is match('^leaf0-.*') %}
19-
{% set idx = host.split('-')[1] %}
19+
{% set idx = host.split('-')[-1] %}
2020
{% set compute_name = 'edpm-compute-0-' ~ idx %}
2121
{% set ip = cifmw_networking_env_definition.instances[host].networks.ctlplane1.ip_v4 %}
2222
{% set ctlplane_ip = cifmw_networking_env_definition.instances[host].networks.ctlplane.ip_v4 | default(ip) %}
@@ -56,7 +56,7 @@ data:
5656
rhos-release {{ cifmw_repo_setup_rhos_release_args }}
5757
nodes:
5858
{% for host in cifmw_networking_env_definition.instances.keys() if host is match('^leaf1-.*') %}
59-
{% set idx = host.split('-')[1] %}
59+
{% set idx = host.split('-')[-1] %}
6060
{% set compute_name = 'edpm-compute-1-' ~ idx %}
6161
{% set ip = cifmw_networking_env_definition.instances[host].networks.ctlplane2.ip_v4 %}
6262
{% set ctlplane_ip = cifmw_networking_env_definition.instances[host].networks.ctlplane.ip_v4 | default(ip) %}

0 commit comments

Comments
 (0)