Bug 1006712 - Show duplicate message when using "rhc cartridge status" to check Cron-1.4 status with scaling app
Summary: Show duplicate message when using "rhc cartridge status" to check Cron-1.4 st...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Marek Mahut
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-11 07:28 UTC by Yan Du
Modified: 2015-05-14 23:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:28:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yan Du 2013-09-11 07:28:57 UTC
Description of problem:

[root@dhcp-10-143 test]# rhc cartridge status -a nd10 -c cron-1.4
RESULT:
cron scheduling service is enabled
cron scheduling service is enabled

if scale the app to 3 gears, will show 3 messages.

issue only can be reoroduced with Cron cartridge, it's not consistent with other cartridges,
eg. in the same app to control mysql, the message is correct as below:
[root@dhcp-10-143 test]# rhc cartridge status -a nd10 -c mysql-5.1
RESULT:
MySQL is running


Version-Release number of selected component (if applicable):
INT(devnev_3769)
rhc 1.14.5


How reproducible:
Always


Steps to Reproduce:
1. Create a scaling app
2. Embed cron cartridge to the app
3. scale up
4. control cron cartridge and show the status
   rhc cartridge status -a nd10 -c cron-1.4


Actual results:
[root@dhcp-10-143 test]# rhc cartridge status -a nd10 -c cron-1.4

RESULT:
cron scheduling service is enabled
cron scheduling service is enabled


Expected results:
should not show duplicate message


Additional info:

Comment 1 Meng Bo 2013-09-11 09:34:27 UTC
The duplicate message also appears when adding cron to a scalable app with multiple gears.

Adding cron-1.4 to application 'jbeap1s' ... done

cron-1.4 (Cron 1.4)
-------------------
  Scaling: x2 (minimum: 2, maximum: available) on small gears

Use 'rhc env --help' to manage environment variable(s) on this cartridge and application.


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.


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.

Comment 2 Michal Fojtik 2013-09-16 12:16:52 UTC
Moving this to Marek, since he seems to have clue why this is not a bug :-)

Comment 3 Marek Mahut 2013-09-17 17:01:30 UTC
Proposed pull request https://github.com/openshift/origin-server/pull/3644

The duplicate status message cannot be easily fixed, given we want to report status of each gear and this can be different. However, I've added the gear uuid for the status message to not confuse the end-user and make it easy to find what gear is affected if needed.

The duplicate messages at installation of cron are fixed by checking if we're the web_proxy gear and if so, showing the message.

Once this is merged, I will put it ON_QA.

Comment 4 Marek Mahut 2013-09-19 07:13:01 UTC
Merged into upstream.

Comment 5 Yan Du 2013-09-22 08:19:42 UTC
test on devenv_3810

[root@Daphne test]# rhc cartridge add -a j7s -c cron
Using cron-1.4 (Cron 1.4) for 'cron'
Adding cron-1.4 to application 'j7s' ... done

cron-1.4 (Cron 1.4)
-------------------
  Scaling: x2 (minimum: 2, maximum: available) on small gears

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.


[root@Daphne test]# rhc cartridge status -a j7s -c cron-1.4
RESULT:
cron scheduling service is enabled for gear 523e8cdaae4b85c30d00008e
cron scheduling service is enabled for gear 320656102067919214608384

according to #comment3, move to verified.


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