Bug 1292206 - oo-idler-stats crashes when there is idled gear in the app
Summary: oo-idler-stats crashes when there is idled gear in the app
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Vu Dinh
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-16 18:04 UTC by Vu Dinh
Modified: 2017-05-31 18:22 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-31 18:22:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vu Dinh 2015-12-16 18:04:40 UTC
Description of problem:
oo-idler-stats is currently broken (crashes with ValueError) if there is an idled gear in the application.

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


How reproducible:
Create an scalable application (with at least 2 gears). Then, use 'oo-admin-ctl-gears idlegear' command to idle one of the gears. Run 
'oo-idler-stats' command.

Steps to Reproduce:
1. rhc app create app1 python-3.3 -s
2. rhc cartridge scale python-3.3  -a app1 --min 2
3. oo-admin-ctl-gears idlegear <gear_uuid>
4. oo-idler-stats

Actual results:
Traceback (most recent call last):
  File "/usr/sbin/oo-idler-stats", line 253, in <module>
    if is_idled(users[uid]):
  File "/usr/sbin/oo-idler-stats", line 82, in is_idled
    all_idled_apps.remove('')
ValueError: list.remove(x): x not in list

Expected results:
Should successfully execute the command with any errors.

Additional info:

Comment 1 openshift-github-bot 2015-12-16 19:38:41 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/57bea26c4db1041c324b55cb3753e1d4e4043134
Bug 1292206 - oo-idler-stats crashes when there is idled gear in the app

The oo-idler-stats command is currently broken as it crashes with ValueError
if there is idled gear in the application.

This issue is due to PR 6324 on origin-server has removed the unwanted empty
item ('') on the list which is returned by run() method. However, is_idled()
method has not been fixed and still attempts to remove that unwanted item
manually from the list which causes ValueError due to the fact that item is
no longer existed. This commit removes the unnecessary code that attempts
to remove non-exist item from the list in is_idled() method to avoid the
ValueError issue.

Bug 1292206
Link <https://bugzilla.redhat.com/show_bug.cgi?id=1292206>

Signed-off-by: Vu Dinh <vdinh>

Comment 2 Wei Sun 2015-12-25 02:57:45 UTC
Verified against devenv_5745

Result:
# oo-idler-stats
1 running, 1 idled, 0 half-idled for a total 2 of 2 (100.00 %)

Comment 3 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.


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