Bug 865358

Summary: Can't start/trigger the cron job for cron-1.4 embed application
Product: OKD Reporter: Rony Gong 🔥 <qgong>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: dmace, jhonce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-06 18:50:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rony Gong 🔥 2012-10-11 09:44:22 UTC
Description of problem:
the cron job script can't be executed in cron-1.4 embed application

Version-Release number of selected component (if applicable):
devenv_2304

How reproducible:
always

Steps to Reproduce:
1.Create a app and embed cron-1.4
2.New file $app/.openshift/cron/minutely/date.sh
with: echo 'date  >> $OPENSHIFT_REPO_DIR/php/date123.txt'
3.git push,wait 2 minutes
  
Actual results:
[qgong@localhost dev]$ curl http://qphp-qgong2.dev.rhcloud.com/date123.txt
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /date123.txt was not found on this server.</p>
<hr>
<address>Apache/2.2.17 (Red Hat Enterprise Web Server) Server at qphp-qgong2.dev.rhcloud.com Port 80</address>
</body></html>



Expected results:
date123.txt created and access curl http://qphp-qgong2.dev.rhcloud.com/date123.txt could get the time


Additional info:

Comment 1 Jhon Honce 2012-10-11 16:13:35 UTC
The job symlinks have the prefix openshift-origin while the actual files have the prefix of openshift.

For example,

openshift-origin-cron-minutely -> /usr/libexec/openshift/cartridges/embedded/cron-1.4/jobs/openshift-origin-cron-minutely

For file named, openshift-cron-minutely

Comment 2 Jhon Honce 2012-10-11 16:34:42 UTC
Fixed in https://github.com/openshift/origin-server/pull/647

Comment 3 Rony Gong 🔥 2012-10-12 01:58:36 UTC
Verified on devenv_2317
Steps:
1.Create a app and embed cron-1.4
2.New file $app/.openshift/cron/minutely/date.sh
with:  date  >> $OPENSHIFT_REPO_DIR/php/date123.txt
3.git push,wait 2 minutes
[qgong@localhost dev]$ curl http://qphp-qgong9.dev.rhcloud.com/date.txt
Thu Oct 11 21:50:02 EDT 2012
Thu Oct 11 21:51:02 EDT 2012
Thu Oct 11 21:52:02 EDT 2012
Thu Oct 11 21:53:02 EDT 2012
Thu Oct 11 21:54:01 EDT 2012
Thu Oct 11 21:55:02 EDT 2012