Skip to content
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

Conversation

ncharles
Copy link
Member

Copy link
Member

@amousset amousset left a 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

# @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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing . at the end


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
Copy link
Member

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
Copy link
Member

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"

@ncharles ncharles force-pushed the bug_15459/add_a_rudder_agent_command_to_force_unforce_audit_mode branch from fe5fb95 to 267fa8f Compare August 13, 2019 15:29
@ncharles
Copy link
Member Author

Commit modified

@Normation-Quality-Assistant

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 267fa8f into Normation:master Aug 13, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants