Bug 990090

Summary: Can not idle all gears with 'oo-admin-ctl-gears idleall'
Product: OpenShift Online Reporter: Jianwei Hou <jhou>
Component: ContainersAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers
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-08-07 18:58:19 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jianwei Hou 2013-07-30 07:16:35 EDT
Description of problem:
Create several apps and idle all of them with 'oo-admin-ctl-gears idleall', none of the gears are idled.

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

How reproducible:
Always

Steps to Reproduce:
1. Create several apps
2. On instance, oo-admin-ctl-gears idleall
3. check idle status, oo-idler-stats

Actual results:
[root@ip-10-137-58-35 openshift]# oo-admin-ctl-gears idleall
(no output after this command)
[root@ip-10-137-58-35 openshift]# oo-idler-stats 
2 running, 0 idled, 0 half-idled for a total 2 of 3 (66.67 %)

Could idle a specific gear with uuid
[root@ip-10-137-58-35 openshift]# oo-admin-ctl-gears idlegear f43b6e26f90311e283df22000a893a23
Idling gear f43b6e26f90311e283df22000a893a23... [ OK ]
[root@ip-10-137-58-35 openshift]# oo-idler-stats 
1 running, 1 idled, 0 half-idled for a total 2 of 3 (66.67 %)
 

Expected results:
Should idle all the gears

Additional info:
Comment 1 Dan McPherson 2013-07-30 12:43:38 EDT
I just removed idleall and unidleall.  They were exactly the same implementation as idlegear and unidlegear (both take a list of gears).  But idlegear and unidlegear will error if you don't pass in an arg.
Comment 2 Dan McPherson 2013-07-30 12:52:20 EDT
https://github.com/openshift/origin-server/pull/3224
Comment 4 Jianwei Hou 2013-07-30 22:04:07 EDT
Verified on devenv_3588

The idleall/unidleall argruments have been removed, now we can use idlegear/unidlegear to change the app's status.

[root@ip-10-191-41-74 ~]# oo-admin-ctl-gears --help
Usage: /usr/sbin/oo-admin-ctl-gears {startall|stopall|status|restartall|condrestartall|startgear [uuid]|stopgear [uuid]|restartgear [uuid]|idlegear [gear]|unidlegear [gear]|list|listidle}
[root@ip-10-191-41-74 ~]# oo-admin-ctl-gears idlegear 33cf33fcf98511e28217123139401dc0 51f86f7453d8ec08f3000001
Idling gear 33cf33fcf98511e28217123139401dc0... [ OK ]
Idling gear 51f86f7453d8ec08f3000001... [ OK ]
[root@ip-10-191-41-74 ~]# oo-idler-stats 
0 running, 2 idled, 0 half-idled for a total 2 of 2 (100.00 %)
[root@ip-10-191-41-74 ~]# oo-admin-ctl-gears unidlegear 33cf33fcf98511e28217123139401dc0 51f86f7453d8ec08f3000001
Unidling gear 33cf33fcf98511e28217123139401dc0... [ OK ]
Unidling gear 51f86f7453d8ec08f3000001... [ OK ]
[root@ip-10-191-41-74 ~]# oo-idler-stats 
2 running, 0 idled, 0 half-idled for a total 2 of 2 (100.00 %)