Bug 1120464 - Show cron status in app which is created from django quickstart will show "Missing .openshift/cron/ directory"
Summary: Show cron status in app which is created from django quickstart will show "Mi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Templates
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-17 02:57 UTC by Liang Xia
Modified: 2015-05-15 02:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-10 00:48:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liang Xia 2014-07-17 02:57:25 UTC
Description of problem:
Given a app is created from django quickstart with cron added, checking status of cron will show:
Missing .openshift/cron/ directory

While app created from kitchensink quickstart does NOT have this error.

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

How reproducible:
always

Steps to Reproduce:
1.Create an app with django quickstart.
$ rhc create-app appname python-2.6 --from-code git://github.com/openshift/django-example.git --no-git
2.Add cron to the app.
$ rhc add-cartridge cron-1.4 -a appname
3.Check cron status
$ rhc status-cartridge cron-1.4 -a appname

Actual results:
$ rhc cartridge-status cron-1.4 -a appname
RESULT:
Application has no scheduled jobs for gear 53c7328edbd93cad78000c2c
   - Missing .openshift/cron/ directory.
cron scheduling service is enabled for gear 53c7328edbd93cad78000c2c

Expected results:
.openshift/cron directory is created when cron is added.
And no this error when checking cron status.

Additional info:
No this error for kitchensink.

Comment 1 Ben Parees 2014-07-18 03:20:43 UTC
I'm not sure this is something we want to fix for every quickstart (if you want to use the cron cartridge, you need to add the cron directory to your repository), but i've added it to the repo for this quickstart so you will not hit this issue anymore.

https://github.com/openshift/django-example/pull/36

Comment 2 Liang Xia 2014-07-23 03:08:32 UTC
Verified on devenv_4996 with following steps, the issue has been fixed (the error described in #comment 0 has gone away).

$ rhc create-app appname python-2.6 --from-code git://github.com/openshift/django-example.git --no-git
Application Options
-------------------
Domain:      lxia
Cartridges:  python-2.6
Source Code: git://github.com/openshift/django-example.git
Gear Size:   default
Scaling:     no

Creating application 'appname' ... done


Waiting for your DNS name to be available ... done

Your application 'appname' is now available.

  URL:        http://appname-lxia.dev.rhcloud.com/
  SSH to:     53cf5d1d4d319bf9cc000009.rhcloud.com
  Git remote: ssh://53cf5d1d4d319bf9cc000009.rhcloud.com/~/git/appname.git/

Run 'rhc show-app appname' for more details about your app.


$ rhc add-cartridge cron-1.4 -a appname
Adding cron-1.4 to application 'appname' ... done

cron-1.4 (Cron 1.4)
-------------------
  Gears: Located with python-2.6

To schedule your scripts to run on a periodic basis, add the scripts to 
your application's .openshift/cron/{minutely,hourly,daily,weekly,monthly}/
directories (and commit and redeploy your application).

Example: A script .openshift/cron/hourly/crony added to your application
         will be executed once every hour.
         Similarly, a script .openshift/cron/weekly/chronograph added
         to your application will be executed once every week.


$  rhc status-cartridge cron-1.4 -a appname
RESULT:
cron scheduling service is enabled for gear 53cf5d1d4d319bf9cc000009


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