Bug 1001480 - Extra info "cron scheduling service is already disabled" show when restart an already stopped cron in app.
Summary: Extra info "cron scheduling service is already disabled" show when restart an...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-27 06:56 UTC by Liang Xia
Modified: 2015-05-15 02:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:48:29 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Liang Xia 2013-08-27 06:56:35 UTC
Description of problem:
Given an cron in an app already stopped, try to restart it, extra info "cron scheduling service is already disabled" show as below:
# rhc cartridge restart cron-1.4 --app jbossews20T08271359
Restarting cron-1.4 ... done
cron scheduling service is already disabled
This will confuse user that the cron is restarted, then disabled.

Version-Release number of selected component (if applicable):
devenv_3711
rhc 1.14.0

How reproducible:
always

Steps to Reproduce:
1.create an app with cron-1.4 embedded.
2.stop cartridge cron.
3.stop cartridge cron again.
4.restart cartridge cron.
5.start cartridge cron.

Actual results:
Step 3 show:
# rhc cartridge stop cron-1.4 --app jbossews20T08271359
Stopping cron-1.4 ... done
cron scheduling service is already disabled
Step 4 show:
# rhc cartridge restart cron-1.4 --app jbossews20T08271359
Restarting cron-1.4 ... done
cron scheduling service is already disabled
Step 5 show:
# rhc cartridge start cron-1.4 --app jbossews20T08271359
Starting cron-1.4 ... done
cron scheduling service is already enabled

Expected results:
Only show "Stopping/Restarting/Starting cron-1.4 ... done".

Additional info:

Comment 1 Marek Mahut 2013-08-29 13:57:52 UTC
Created a pull request for this bug, https://github.com/openshift/origin-server/pull/3517

Can you please try if this is working for you?

Comment 2 Liang Xia 2013-08-30 02:50:02 UTC
Tested on devenv_3726, when restarting an stopped cron, message "Restarting cron-1.4 ... done" show as expected, and no unnecessary messages.

But when starting an started cron or stopping an stopped cron, still showing "cron scheduling service is already enabled/disabled" which is unnecessary. Hoping this also get fixed to consistent with the behavior of restart. so just move it back to assigned.

Steps and results:
# rhc cartridge status cron-1.4 --app jbossews20TM08301001
RESULT:
cron scheduling service is enabled

# rhc cartridge start cron-1.4 --app jbossews20TM08301001
Starting cron-1.4 ... done
cron scheduling service is already enabled           <===========

# rhc cartridge status cron-1.4 --app jbossews20TM08301001
RESULT:
cron scheduling service is enabled

# rhc cartridge stop cron-1.4 --app jbossews20TM08301001
Stopping cron-1.4 ... done

# rhc cartridge stop cron-1.4 --app jbossews20TM08301001
Stopping cron-1.4 ... done
cron scheduling service is already disabled          <===========

# rhc cartridge status cron-1.4 --app jbossews20TM08301001
RESULT:
cron scheduling service is disabled

# rhc cartridge restart cron-1.4 --app jbossews20TM08301001
Restarting cron-1.4 ... done

# rhc cartridge restart cron-1.4 --app jbossews20TM08301001
Restarting cron-1.4 ... done

# rhc cartridge status cron-1.4 --app jbossews20TM08301001
RESULT:
cron scheduling service is enabled

# rhc cartridge reload cron-1.4 --app jbossews20TM08301001
Reloading cron-1.4 ... done

# rhc cartridge reload cron-1.4 --app jbossews20TM08301001
Reloading cron-1.4 ... done

# rhc cartridge status cron-1.4 --app jbossews20TM08301001
RESULT:
cron scheduling service is enabled

Comment 3 Marek Mahut 2013-08-30 08:54:38 UTC
I think this is an expected message. It communicates to the end user that the requested action did not happen.

If the service is started, we try to start it but we did not as it is already running. Same, if the service is stopped and the user requests to stop it again, we tell him there is no action to be done.

I think this is important to distinguish as the user can have a false impression that he started a stopped application even if the application was already running and no action happened.

What I did fix with my commit is a situation when we try to stop an already stopped service, which is unnecessary.

Does it makes sense?

Comment 4 Liang Xia 2013-08-30 10:56:57 UTC
Yes, I agree it is acceptable to leave the messages here. Why moving it back to assigned as I just want it to be consitent with restart and other cartridges' behaviour. I'll move it to verified once it is on-qa if you persist that the messages should be there.

List several other cartridges' behavior for your reference:
==========================================================
rhc cartridge status mongodb-2.2 --app jbossews20TM08301559
RESULT:
MongoDB is running

rhc cartridge start mongodb-2.2 --app jbossews20TM08301559
Starting mongodb-2.2 ... done

rhc cartridge start mongodb-2.2 --app jbossews20TM08301559
Starting mongodb-2.2 ... done

rhc cartridge status mongodb-2.2 --app jbossews20TM08301559
RESULT:
MongoDB is running

rhc cartridge stop mongodb-2.2 --app jbossews20TM08301559
Stopping mongodb-2.2 ... done

rhc cartridge stop mongodb-2.2 --app jbossews20TM08301559
Stopping mongodb-2.2 ... done

rhc cartridge status mongodb-2.2 --app jbossews20TM08301559
RESULT:
MongoDB is stopped

rhc cartridge restart mongodb-2.2 --app jbossews20TM08301559
Restarting mongodb-2.2 ... done

rhc cartridge restart mongodb-2.2 --app jbossews20TM08301559
Restarting mongodb-2.2 ... done

rhc cartridge status mongodb-2.2 --app jbossews20TM08301559
RESULT:
MongoDB is running

rhc cartridge reload mongodb-2.2 --app jbossews20TM08301559
Reloading mongodb-2.2 ... done

rhc cartridge reload mongodb-2.2 --app jbossews20TM08301559
Reloading mongodb-2.2 ... done

rhc cartridge status mongodb-2.2 --app jbossews20TM08301559
RESULT:
MongoDB is running
==========================================================
rhc cartridge status mysql-5.1 --app jbossews20TM08301559
RESULT:
MySQL is running

rhc cartridge start mysql-5.1 --app jbossews20TM08301559
Starting mysql-5.1 ... done

rhc cartridge start mysql-5.1 --app jbossews20TM08301559
Starting mysql-5.1 ... done

rhc cartridge status mysql-5.1 --app jbossews20TM08301559
RESULT:
MySQL is running

rhc cartridge stop mysql-5.1 --app jbossews20TM08301559
Stopping mysql-5.1 ... done

rhc cartridge stop mysql-5.1 --app jbossews20TM08301559
Stopping mysql-5.1 ... done

rhc cartridge status mysql-5.1 --app jbossews20TM08301559
RESULT:
MySQL is stopped

rhc cartridge restart mysql-5.1 --app jbossews20TM08301559
Restarting mysql-5.1 ... done

rhc cartridge restart mysql-5.1 --app jbossews20TM08301559
Restarting mysql-5.1 ... done

rhc cartridge status mysql-5.1 --app jbossews20TM08301559
RESULT:
MySQL is running

rhc cartridge reload mysql-5.1 --app jbossews20TM08301559
Reloading mysql-5.1 ... done

rhc cartridge reload mysql-5.1 --app jbossews20TM08301559
Reloading mysql-5.1 ... done

rhc cartridge status mysql-5.1 --app jbossews20TM08301559
RESULT:
MySQL is running
=============================================================
rhc cartridge status phpmyadmin-4 --app jbossews20TM08301559
RESULT:
PHPMyAdmin is running

rhc cartridge start phpmyadmin-4 --app jbossews20TM08301559
Starting phpmyadmin-4 ... done

rhc cartridge start phpmyadmin-4 --app jbossews20TM08301559
Starting phpmyadmin-4 ... done

rhc cartridge status phpmyadmin-4 --app jbossews20TM08301559
RESULT:
PHPMyAdmin is running

rhc cartridge stop phpmyadmin-4 --app jbossews20TM08301559
Stopping phpmyadmin-4 ... done

rhc cartridge stop phpmyadmin-4 --app jbossews20TM08301559
Stopping phpmyadmin-4 ... done

rhc cartridge status phpmyadmin-4 --app jbossews20TM08301559
RESULT:
PHPMyAdmin is either stopped or inaccessible

rhc cartridge restart phpmyadmin-4 --app jbossews20TM08301559
Restarting phpmyadmin-4 ... done

rhc cartridge restart phpmyadmin-4 --app jbossews20TM08301559
Restarting phpmyadmin-4 ... done

rhc cartridge status phpmyadmin-4 --app jbossews20TM08301559
RESULT:
PHPMyAdmin is running

rhc cartridge reload phpmyadmin-4 --app jbossews20TM08301559
Reloading phpmyadmin-4 ... done

rhc cartridge reload phpmyadmin-4 --app jbossews20TM08301559
Reloading phpmyadmin-4 ... done

rhc cartridge status phpmyadmin-4 --app jbossews20TM08301559
RESULT:
PHPMyAdmin is running

Comment 5 Fabiano Franz 2013-12-13 20:19:25 UTC
As per comment 3 the current behavior is acceptable. Please verify.

(In reply to Marek Mahut from comment #3)
> I think this is an expected message. It communicates to the end user that
> the requested action did not happen.

Comment 6 Liang Xia 2013-12-16 06:53:37 UTC
Move to verified per comment #3, #4.


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