bhouse-nexthop commented on code in PR #14773:
URL: https://github.com/apache/cloudstack/pull/14773#discussion_r4683666582
##########
plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node:
##########
@@ -36,10 +36,16 @@ else
done
fi
+if [[ $(cat /proc/sys/net/ipv4/ip_forward 2>/dev/null) != "1" ]]; then
+ echo "net.ipv4.ip_forward is not set to 1 on the node"
+ IP_FORWARD_DISABLED=1
+fi
+
echo ${#MISSING_PACKAGES[@]}
if (( ${#MISSING_PACKAGES[@]} )); then
echo "Following packages are missing in the node template:
${MISSING_PACKAGES[@]}"
exit 1
else
echo 0
+ exit ${IP_FORWARD_DISABLED:-0}
Review Comment:
Good point, changed in b92a9d1f3f:
- each check adds its message to a `FAILURES` array;
- the end of the script prints them all and exits 1 if there are any.
So a new check is one more `if ...; then FAILURES+=("..."); fi` block, and
the exit logic stays as it is. The missing-package check goes through the same
list. Since the reason may now be something other than a package, I also
changed the caller's log line from "does not have the following dependencies"
to "failed validation".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]