-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
---
-
---
-
pause_mcp()
{
oc patch --type=merge --patch='{"spec":{"paused": true}}' $(oc get mcp -o name)
}
- Resume master and worker MCP.
resume_mcp()
{
oc patch --type=merge --patch='{"spec":{"paused": false}}' $(oc get mcp -o name)
}
wait_mcp_for_updated()
{
local attempts=${1:-60} i
local mcp_updated="false"
local mcp_stat_file="$(mktemp "${TMDIR:-/tmp}"/mcp-stat.XXXXX)"
sleep 30
for ((i=1; i<=attempts; i++)); do
echo_debug "Attempt ${i}/${attempts}"
sleep 30
if oc wait mcp --all --for condition=updated --timeout=1m; then
echo "MCP is Updated"
mcp_updated="true"
break
fi
done
rm -f "${mcp_stat_file}"
if [[ "${mcp_updated}" == "false" ]]; then
ech "Error: MCP didn't get Updated!!"
exit 1
fi
}