Bug 837130 - cron jobs symlink is invalid/not updated on gear move
Summary: cron jobs symlink is invalid/not updated on gear move
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Ram Ranganathan
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-02 21:40 UTC by Ram Ranganathan
Modified: 2015-05-14 22:56 UTC (History)
2 users (show)

Fixed In Version: > cartridge-cron-1.4-0.8.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-13 23:43:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ram Ranganathan 2012-07-02 21:40:37 UTC
Description of problem:
The cron jobs directory is symlinked with a full path, when a gear is moved across districts, the uuid may change which results in the symlink being invalid.

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

How reproducible:
Always

Steps to Reproduce:
1.  Create an app and add the cron cartridge to the app.
2.  Move the gear to another district.
3.
  
Actual results:
cron jobs are not executed.

Expected results:
cron jobs should run. 

Additional info:

The best fix is to use relative sym links which ensures that the links would still be valid even after a gear moves across districts. Plus need to migrate any existing gears using cron on prod.

Comment 1 Ram Ranganathan 2012-07-02 23:35:12 UTC
Fixed with git commits: 701b303247ec177d6f259c9ff4f79f1f0c6bbc34 and 6c8f6617535ca77af338fcbc3d856fbc1fd24e42 

Updates to cron cartridge + migrate script.

Comment 2 Ram Ranganathan 2012-07-03 22:23:08 UTC
See also associated bug 837424.

Comment 3 Rony Gong 🔥 2012-07-10 11:45:53 UTC
Verified on devenv_1882
prepare multi node district and create 2 dists
1.create php and embemd cron caridge

2.$ echo 'date >> $OPENSHIFT_REPO_DIR/php/date.txt' > .openshift/cron/minutely/date.sh

3.check the date.txt by ssh
after move,the time record could added minutely
[q1php-qgong9.dev.rhcloud.com ~]\> cat ./app-root/runtime/repo/php/date.txt
Tue Jul 10 07:40:02 EDT 2012
Tue Jul 10 07:41:02 EDT 2012
Tue Jul 10 07:42:01 EDT 2012
Tue Jul 10 07:43:02 EDT 2012
Tue Jul 10 07:44:02 EDT 2012
Tue Jul 10 07:45:01 EDT 2012


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