New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #14833: Use rudder agent check at postinst and factory reset to avoid duplacing code #215
Conversation
share/commands/agent-check
Outdated
rudder agent reset | ||
fi | ||
echo " Done" | ||
[ "$QUIET" = false ] && printf "INFO: Promises absent restoring initial version, and updating ..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Policies absent, restoring"...
share/commands/agent-check
Outdated
fi | ||
if ! ${CFE_DIR}/bin/cf-promises -f failsafe.cf > /dev/null || ! ${CFE_DIR}/bin/cf-promises > /dev/null | ||
then | ||
[ "$QUIET" = false ] && printf "${YELLOW}WARNING${NORMAL}: Promises invalid, reseting to initial promises and updating..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Promises -> Policies
Commit modified |
share/commands/agent-check
Outdated
@@ -113,9 +127,9 @@ check_and_fix_cfengine_processes() { | |||
CF_EXECD_RUNNING=`${PS_COMMAND} | grep "${CFE_DIR}/bin/cf-execd" | sed -e '/grep/d' | cat` | |||
NB_CF_EXECD_RUNNING=`echo "${CF_EXECD_RUNNING}" | sed -e '/^$/d' | wc -l` | |||
if [ ${NB_CF_EXECD_RUNNING} -gt 1 ]; then | |||
printf "WARNING: Too many instance of CFEngine cf-execd processes running. Killing them..." | |||
[ "$QUIET" = false ] && printf "${YELLOW}WARNING${NORMAL}: Too many instance of CFEngine cf-execd processes running. Killing them..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CFEngine cf-execd -> Rudder cf-execd
share/commands/agent-check
Outdated
fi | ||
|
||
# Check for anomalous number of CFEngine processes | ||
# If there are more than 6 agent/executor processes, we should kill them, and purge the lock database | ||
# 6 means 1 cf-execd + 5 cf-agent | ||
if [ "${NB_CF_PROCESS_RUNNING}" -gt 6 ]; then | ||
printf "WARNING: Too many instance of CFEngine processes running. Killing them, and purging the CFEngine lock database..." | ||
[ "$QUIET" = false ] && printf "${YELLOW}WARNING${NORMAL}: Too many instance of CFEngine processes running. Killing them, and purging the CFEngine lock database..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CFEngine processes -> Agent processes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CFengine lock -> agent lock
echo "********************************************************************************" | ||
echo "rudder-agent has been installed (not started). This host can be a Rudder node." | ||
echo "To get started, configure your Rudder server's hostname and continue the process:" | ||
echo "# echo 'rudder.server' > ${CFE_DIR}/policy_server.dat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should display /opt/rudder/etc instead here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the lase place that should be changed since if the symlink was not created this will fail
Commit modified |
OK, squash merging this PR |
… avoid duplacing code
a9ce466
to
517e0a6
Compare
https://issues.rudder.io/issues/14833