Bug 988652

Summary: oo-admin-ctl-gears condrestartall will restart stopped gears as well
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: ContainersAssignee: Rob Millner <rmillner>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: lxia, mfisher
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-26 15:30:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
devenv_3563

How reproducible:
always

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
RESULT:
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
8c3b7c6af81011e2b09122000ab30e1f
756336227430956351356928
[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