Skip to content

Commit

Permalink
update-node-resolver.sh: Check for errors from >>
Browse files Browse the repository at this point in the history
Check for errors when appending entries to /etc/hosts.tmp in the
update-node-resolver.sh script.

Follow-up to commit 18d3e18.

This commit is related to OCPBUGS-4359.

https://issues.redhat.com/browse/OCPBUGS-4359

* assets/node-resolver/update-node-resolver.sh: Check for failures when
appending entries to /etc/hosts.tmp.
* pkg/manifests/bindata.go: Regenerate.
  • Loading branch information
Miciah authored and openshift-cherrypick-robot committed Oct 9, 2023
1 parent d65d051 commit b4a4521
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion assets/node-resolver/update-node-resolver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,17 @@ while true; do
fi

# Append resolver entries for services
rc=0
for svc in "${!svc_ips[@]}"; do
for ip in ${svc_ips[${svc}]}; do
echo "${ip} ${svc} ${svc}.${CLUSTER_DOMAIN} # ${OPENSHIFT_MARKER}" >> "${TEMP_FILE}"
echo "${ip} ${svc} ${svc}.${CLUSTER_DOMAIN} # ${OPENSHIFT_MARKER}" >> "${TEMP_FILE}" || rc=$?
done
done
if [[ $rc -ne 0 ]]; then
sleep 60 & wait
continue
fi


# TODO: Update /etc/hosts atomically to avoid any inconsistent behavior
# Replace /etc/hosts with our modified version if needed
Expand Down
8 changes: 4 additions & 4 deletions pkg/manifests/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b4a4521

Please sign in to comment.