Bug 852139 - update_yaml cron job outputs which sends an e-mail to root user
Summary: update_yaml cron job outputs which sends an e-mail to root user
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Mrunal Patel
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-27 17:18 UTC by Thomas Wiest
Modified: 2015-05-14 22:58 UTC (History)
3 users (show)

Fixed In Version: devenv_2086+
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-17 21:28:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Thomas Wiest 2012-08-27 17:18:15 UTC
Description of problem:
The update_yaml minutely cron job sends e-mails to the root user when update_yaml is currently running.

The reason that the e-mail is sent is because the cron job is outputing.

The fix would be to either:
1) not have update_yaml.rb output when another instance is running
2) Change the cron job to redirect output to /dev/null


The e-mails to root look like this:

/etc/cron.minutely/stickshift-facts:

Script /usr/libexec/mcollective/update_yaml.rb is already running



Version-Release number of selected component (if applicable):
stickshift-mcollective-agent-0.2.2-1.el6_3.noarch


How reproducible:
Very


Steps to Reproduce:
1. Start update_yaml at the same time that the minutely cron job will run
2. Notice an e-mail like the above is sent to the root account on the box
  

Actual results:
e-mail is sent


Expected results:
The script should silently ignore that fact

Comment 1 Mrunal Patel 2012-08-28 00:07:54 UTC
https://github.com/openshift/crankcase/pull/440

Comment 2 Jianwei Hou 2012-08-28 07:09:27 UTC
Verified on devenv_2086
stickshift-mcollective-agent-0.3.1-1.git.29.5260a15.el6.noarch

Steps:
1. Launch a devenv instance
2. ssh into instance, check mcollective is running
   /etc/init.d/mcollective status
3. Stay logged in, when /etc/cron.minutely/stickshift-facts is running, root should not receive emails from this cron jbos

Result:
root receives no emails sent from cron job


Note You need to log in before you can comment on or make changes to this bug.