Skip to content

Commit 41cd770

Browse files
authored
fix: re-order how we populate nodes (#1815)
Fix when adding workers to arbiter deployments, the arbiter nodes are created between masters and workers in the array, updating logic to correctly ingest those positions Update extra workers var to include arbiter count Signed-off-by: ehila <[email protected]>
1 parent f883654 commit 41cd770

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

02_configure_host.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ if [ ${NUM_EXTRA_WORKERS} -ne 0 ]; then
165165
ORIG_NODES_FILE="${NODES_FILE}.orig"
166166
cp -f ${NODES_FILE} ${ORIG_NODES_FILE}
167167
sudo chown -R $USER:$GROUP ${NODES_FILE}
168-
jq "{nodes: .nodes[:$((NUM_MASTERS + NUM_WORKERS))]}" ${ORIG_NODES_FILE} | tee ${NODES_FILE}
168+
jq "{nodes: .nodes[:$((NUM_MASTERS + NUM_ARBITERS + NUM_WORKERS))]}" ${ORIG_NODES_FILE} | tee ${NODES_FILE}
169169
jq "{nodes: .nodes[-${NUM_EXTRA_WORKERS}:]}" ${ORIG_NODES_FILE} | tee ${EXTRA_NODES_FILE}
170170
fi
171171

ocp_install_env.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,13 @@ EOF
401401
if [ -z "${HOSTS_SWAP_DEFINITION:-}" ]; then
402402
cat >> "${outdir}/install-config.yaml" << EOF
403403
$(node_map_to_install_config_hosts $NUM_MASTERS 0 master)
404-
$(node_map_to_install_config_hosts $NUM_WORKERS $NUM_MASTERS worker)
405-
$(node_map_to_install_config_hosts $NUM_ARBITERS $(( NUM_MASTERS + NUM_WORKERS )) arbiter)
404+
$(node_map_to_install_config_hosts $NUM_ARBITERS $NUM_MASTERS arbiter)
405+
$(node_map_to_install_config_hosts $NUM_WORKERS $(( NUM_MASTERS + NUM_ARBITERS )) worker)
406406
EOF
407407
else
408408
cat >> "${outdir}/install-config.yaml" << EOF
409-
$(node_map_to_install_config_hosts $NUM_ARBITERS $(( NUM_MASTERS + NUM_WORKERS )) arbiter)
410-
$(node_map_to_install_config_hosts $NUM_WORKERS $NUM_MASTERS worker)
409+
$(node_map_to_install_config_hosts $NUM_WORKERS $(( NUM_MASTERS + NUM_ARBITERS )) worker)
410+
$(node_map_to_install_config_hosts $NUM_ARBITERS $NUM_MASTERS arbiter)
411411
$(node_map_to_install_config_hosts $NUM_MASTERS 0 master)
412412
EOF
413413
fi

0 commit comments

Comments
 (0)