Red Hat Bugzilla – Bug 837130
cron jobs symlink is invalid/not updated on gear move
Last modified: 2015-05-14 18:56:13 EDT
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):
Steps to Reproduce:
1. Create an app and add the cron cartridge to the app.
2. Move the gear to another district.
cron jobs are not executed.
cron jobs should run.
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.
Fixed with git commits: 701b303247ec177d6f259c9ff4f79f1f0c6bbc34 and 6c8f6617535ca77af338fcbc3d856fbc1fd24e42
Updates to cron cartridge + migrate script.
See also associated bug 837424.
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