Bug 988652 - oo-admin-ctl-gears condrestartall will restart stopped gears as well
Summary: oo-admin-ctl-gears condrestartall will restart stopped gears as well
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2013-07-26 04:54 UTC by Liang Xia
Modified: 2015-05-14 23:24 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2013-07-26 15:30:15 UTC

Attachments (Terms of Use)

Description Liang Xia 2013-07-26 04:54:47 UTC
Description of problem:
oo-admin-ctl-gears condrestartall will restart stopped gears as well.

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

How reproducible:

Steps to Reproduce:
1.create serveral apps.
2.stop some gears using oo-admin-ctl-gears stopgear
3.idle some gears using oo-admin-ctl-gears idlegear
4.oo-admin-ctl-gears condrestartall 

Actual results:
Started and stopped gears were restarted. Idled gears still idle.

Expected results:
Only started gears should be restarted.

Additional info:

Comment 1 Jhon Honce 2013-07-26 15:30:15 UTC
I believe you are confusing gears stopped by the system with gears stopped by the user.

If the user used rhc app store the gear remains stopped until the user starts the application through some action.

If the system stops a gear using oo-admin-ctrl-gears stopgear, it is expected the system would restart said gear.

Comment 2 Liang Xia 2013-07-29 05:55:43 UTC
Tested in following steps. Agree to be not a bug.

[root@ip-10-179-14-31 ~]# rhc app show app1 --state
Cartridge php-5.3 is started
[root@ip-10-179-14-31 ~]# rhc app show app2 --state
Cartridge jbossews-2.0 is started
[root@ip-10-179-14-31 ~]# rhc app stop app1
app1 stopped
[root@ip-10-179-14-31 ~]# rhc app show app1 --state
Cartridge php-5.3 is stopped
[root@ip-10-179-14-31 ~]# oo-admin-ctl-gears list
[root@ip-10-179-14-31 ~]# oo-admin-ctl-gears condrestartall
Restarting gear 756336227430956351356928... [ OK ]
[root@ip-10-179-14-31 ~]# oo-admin-ctl-gears status
Checking OpenShift Services: 

Checking application app2 (756336227430956351356928) status:
Cartridge: jbossews...
The jbossews cartridge is running.

Checking application app1 (8c3b7c6af81011e2b09122000ab30e1f) status:
Cartridge: php...
Application is either stopped or inaccessible

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