Bug 1197873 - Cron time out should be configurable.
Summary: Cron time out should be configurable.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1154696
Blocks: 1201055
TreeView+ depends on / blocked
 
Reported: 2015-03-02 20:27 UTC by Miheer Salunke
Modified: 2019-05-20 11:33 UTC (History)
16 users (show)

Fixed In Version: openshift-origin-cartridge-cron-1.24.1.2-1
Doc Type: Enhancement
Doc Text:
For applications using the Cron cartridge, cron jobs have a default timeout of 20 minutes. This enhancement adds the ability for administrators to configure this global timeout value. Administrators can configure this by creating a /etc/openshift/cron/limits file on each node, and setting a MAX_RUN_TIME parameter in that file to the desired value, such as "10m" for ten minutes. The format of the value must be in a format acceptable to the timeout command: use "s" for seconds, "m" for minutes, "h" for hours, or "d" for days. After applying this update, a cartridge upgrade is required.
Clone Of: 1154696
: 1201055 (view as bug list)
Environment:
Last Closed: 2015-04-06 17:06:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0779 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.5 bug fix and enhancement update 2015-04-06 21:05:45 UTC

Comment 1 Miheer Salunke 2015-03-02 21:07:57 UTC
Submitted a PR to make cronjob timeout customizable-

https://github.com/openshift/origin-server/pull/6089

Comment 12 Ben Parees 2015-03-11 17:02:05 UTC
Bilhar, how do you want to handle the docs update for this?

Comment 18 Ben Parees 2015-03-13 13:27:47 UTC
Sorry, I put this to ON_QA after tagging the PR merge, but it looks like the merge queue is broken so it never merged.

Comment 19 openshift-github-bot 2015-03-13 17:40:19 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/d5698ee4b33139944958b6662cf1d64a7f21d0c2
Bug 1197873
Bugzilla Link - https://bugzilla.redhat.com/show_bug.cgi?id=1197873
Using this fix a user a can have a cronjob timeout limit customizable

Comment 20 Ma xiaoqiang 2015-03-16 00:45:36 UTC
Wait for the new puddle.

Comment 23 Ma xiaoqiang 2015-03-17 01:25:09 UTC
Check on puddle [2.2.z/2015-03-16.1]

1.create an app with cron cartridge
#rhc app create xiaom1 php-5.4 cron
2. add cron job
# vim .openshift/cron/minutely/test.sh 
sleep 15
#chmod +x test.sh
3.deploy the app
#git commit -amx && git push
4.check the log
No warning message is given out

5.create  /etc/openshift/cron/limits file on the node
# vim /etc/openshift/cron/limits
MAX_RUN_TIME=10s

6. check the log
> tailf  app-root/logs/cron_minutely.log  
__________________________________________________________________________
/var/lib/openshift/xiaom-xiaom1-1/cron/bin/cron_runjobs.sh: line 114: 13377 Killed                  $executor "$SCRIPTS_DIR"
Warning: minutely cron run terminated as it exceeded max run time
__________________________________________________________________________


The configuration file take effect

Comment 25 errata-xmlrpc 2015-04-06 17:06:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0779.html


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