-
Notifications
You must be signed in to change notification settings - Fork 20
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 #15459: add a rudder agent command to force/unforce audit mode #239
Fixes #15459: add a rudder agent command to force/unforce audit mode #239
Conversation
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 also need to mention the state of this in info output
share/commands/agent-set-force-audit
Outdated
# @description forbid rudder-agent to be run in non audit mode | ||
# @man This is useful when you want to ensure that the agent check compliance only, | ||
# @man and won't be doing any modification to your system. If agent is run in non | ||
# @man audit, it will be automatically stopped |
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.
Missing . at the end
share/commands/agent-set-force-audit
Outdated
|
||
touch /opt/rudder/etc/force-audit-agent | ||
|
||
[ $? -ne 0 ] && printf "${RED}error${NORMAL}: Rudder agent could not be be forced in compliance only.\n" && exit 1 |
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.
Compliance only?
|
||
rm -f /opt/rudder/etc/force-audit-agent | ||
|
||
[ $? -ne 0 ] && printf "${RED}error${NORMAL}: Rudder force audit mode flag could not be removed.\n" && exit 1 |
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.
The user does not have to know it is implemented using a flag file. We could only say something like "Rudder force audit mode could not be disabled"
fe5fb95
to
267fa8f
Compare
Commit modified |
OK, merging this PR |
https://issues.rudder.io/issues/15459