Bug 1006712 - Show duplicate message when using "rhc cartridge status" to check Cron-1.4 status with scaling app
Show duplicate message when using "rhc cartridge status" to check Cron-1.4 st...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Marek Mahut
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-11 03:28 EDT by Yan Du
Modified: 2015-05-14 19:28 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 09:28:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yan Du 2013-09-11 03:28:57 EDT
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 05:34:27 EDT
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 08:16:52 EDT
Moving this to Marek, since he seems to have clue why this is not a bug :-)
Comment 3 Marek Mahut 2013-09-17 13:01:30 EDT
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 03:13:01 EDT
Merged into upstream.
Comment 5 Yan Du 2013-09-22 04:19:42 EDT
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.