Bug 1292206 - oo-idler-stats crashes when there is idled gear in the app
oo-idler-stats crashes when there is idled gear in the app
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Vu Dinh
Wei Sun
Depends On:
  Show dependency treegraph
Reported: 2015-12-16 13:04 EST by Vu Dinh
Modified: 2017-05-31 14:22 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-05-31 14:22:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vu Dinh 2015-12-16 13:04:40 EST
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
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 14:38:41 EST
Commit pushed to master at https://github.com/openshift/origin-server

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@redhat.com>
Comment 2 Wei Sun 2015-12-24 21:57:45 EST
Verified against devenv_5745

# 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 14:22:11 EDT
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.