summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeela Venkaiah G <lgangava@redhat.com>2021-01-18 15:12:48 +0530
committerArthy Loganathan <aloganat@redhat.com>2021-01-20 06:28:34 +0000
commit9c8fe5af5a00bf0eb24d4b586426260ce0be5fd3 (patch)
treeb3e96c852c5203cade0d20ac20f100d46aff33fa
parent7ee0919ea7f0acdd0dc74d037663d68b1ca5d194 (diff)
[ToolFix] Loop over outer index for server countHEADmaster
Issue: In a nested loop, anchor is picking inner loop index 1 always Solution: Store outer loop index and use it while lopping over server list and create correct anchor Change-Id: Ib3aaed2f0153b567ea9dd5cd8f4ef20ecf604dd8 Signed-off-by: Leela Venkaiah G <lgangava@redhat.com>
-rw-r--r--tools/generate_glusto_config/glusto_config_template.jinja3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/generate_glusto_config/glusto_config_template.jinja b/tools/generate_glusto_config/glusto_config_template.jinja
index 79a3d57..3146586 100644
--- a/tools/generate_glusto_config/glusto_config_template.jinja
+++ b/tools/generate_glusto_config/glusto_config_template.jinja
@@ -17,8 +17,9 @@ clients:{% for client in clients %}
# Note: Use the same Hostname/IP used in the above 'servers' section.
servers_info:{% for server_item in servers %}
+ {% set outer_loop = loop %}
{% for server, value in server_item.items() %}
- {{server}}: &server{{ loop.index }}
+ {{server}}: &server{{ outer_loop.index }}
host: {{server}}
devices: {{ value["devices"] }}
brick_root: {{ value["brick_root"] }}{% endfor %}{% endfor %}