Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1197873 - Cron time out should be configurable.
Cron time out should be configurable.
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
2.2.0
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Jason DeTiberus
libra bugs
: FutureFeature, UpcomingRelease
Depends On: 1154696
Blocks: 1201055
  Show dependency treegraph
 
Reported: 2015-03-02 15:27 EST by Miheer Salunke
Modified: 2015-04-06 13:06 EDT (History)
16 users (show)

See Also:
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.
Story Points: ---
Clone Of: 1154696
: 1201055 (view as bug list)
Environment:
Last Closed: 2015-04-06 13:06:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0779 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.5 bug fix and enhancement update 2015-04-06 17:05:45 EDT

  None (edit)
Comment 1 Miheer Salunke 2015-03-02 16:07:57 EST
Submitted a PR to make cronjob timeout customizable-

https://github.com/openshift/origin-server/pull/6089
Comment 12 Ben Parees 2015-03-11 13:02:05 EDT
Bilhar, how do you want to handle the docs update for this?
Comment 18 Ben Parees 2015-03-13 09:27:47 EDT
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 13:40:19 EDT
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-15 20:45:36 EDT
Wait for the new puddle.
Comment 23 Ma xiaoqiang 2015-03-16 21:25:09 EDT
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 13:06:19 EDT
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.