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 #5190: Redirect the output of Rudder crontab to dev null #596

Conversation

Kegeruneku
Copy link

Ticket: http://www.rudder-project.org/redmine/issues/5190

To be merged in 2.10

Will require manual adjustment to 3.0

@Kegeruneku
Copy link
Author

See #597 too

@@ -152,5 +158,7 @@ bundle edit_line cron_cleanup
"0,5,10,15,20,25,30,35,40,45,50,55 \* \* \* \* root if \[ ! -e /opt/rudder/etc/disable-agent -a \`ps -efww \| grep -E \"\(cf-execd\|cf-agent\)\" \| grep -E \"/var/rudder/cfengine-community/bin/\(cf-execd\|cf-agent\)\" \| grep -v grep \| wc -l\` -eq 0 ]; then /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf \&\& /var/rudder/cfengine-community/bin/cf-agent; fi";
# Remove entry with wrong escapements from /etc/crontab
"0,5,10,15,20,25,30,35,40,45,50,55 \* \* \* \* root if \[ ! -e /opt/rudder/etc/disable-agent -a \`ps -efww \| grep -E \"\(cf-execd\|cf-agent\)\" \| grep -E \"/var/rudder/cfengine-community/bin/\(cf-execd\|cf-agent\)\" \| grep -v grep \| wc -l\` -eq 0 ]; then /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf \\\&\\\& /var/rudder/cfengine-community/bin/cf-agent; fi";
# Remove old AIX entry
"0,5,10,15,20,25,30,35,40,45,50,55 \* \* \* \* if \[ -x /opt/rudder/bin/check-rudder-agent \]; then /opt/rudder/bin/check-rudder-agent; fi";
Copy link
Member

Choose a reason for hiding this comment

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

The bundle you've added this in is an old, deprecated bundle. See the comment above it:

 # This is to cleanup /etc/crontab from pre-2.5 usage
 # and initial promises before 2.7

We should therefore remove it in Rudder 3.0. And therefore, I don't think it's a good place to set the cleanup for AIX... Could you move it? You can probably just use a standard bundle edit_line delete_lines_matching(regex) (from the CFEngine stdlib).

@Kegeruneku Kegeruneku force-pushed the bug_5190/dev/5190_redirect_output_of_crontab_to_dev_null branch from 5c9423c to a0a97f0 Compare December 5, 2014 10:59
@Kegeruneku
Copy link
Author

Updated

jooooooon added a commit that referenced this pull request Dec 5, 2014
…tput_of_crontab_to_dev_null

Fixes #5190: Redirect the output of Rudder crontab to dev null
@jooooooon jooooooon merged commit 4f7903e into Normation:branches/rudder/2.10 Dec 5, 2014
amousset pushed a commit to amousset/rudder-techniques that referenced this pull request Dec 8, 2015
…ent_code_is_a_bashism

Fixes #6169: Error management code is a bashism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants