Bug 1293374

Summary: When worker killer is invoked, you get undefined method sort!
Product: Red Hat CloudForms Management Engine Reporter: Chris Pelland <cpelland>
Component: ApplianceAssignee: Jason Frey <jfrey>
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.5.0CC: abellott, dajohnso, gtanzill, jfrey, jhardy, jprause, mfeifer, nachandr, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.5.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.2.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1293370 Environment:
Last Closed: 2016-02-10 15:29:53 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:
Bug Depends On: 1293370    
Bug Blocks:    

Comment 2 CFME Bot 2016-01-11 22:32:24 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=e0890cc2bf3f9a977ebbb1f230dd9c2de3aa5556

commit e0890cc2bf3f9a977ebbb1f230dd9c2de3aa5556
Merge: 43e8378 a2a8c9b
Author:     Oleg Barenboim <obarenbo>
AuthorDate: Mon Jan 11 17:05:28 2016 -0500
Commit:     Oleg Barenboim <obarenbo>
CommitDate: Mon Jan 11 17:05:28 2016 -0500

    Merge branch 'fix_system_limit_killer-ds' into '5.5.z'
    
    Fix issue where sort! was called on an ActiveRecord::Relation.
    
    The MiqServer#do_system_limit_exceeded method was calling sort! on an
    ActiveRecord::Relation.  The specs were added to verify, but then it
    was also revealed that the sorting method was not sufficient anyway.
    This fix removes the sort! and also fixes the sorting logic.
    
    This issue was missed because it didn't have specs, but also because it
    is rarely called, only happening when workers need to be killed due to
    low system resources.
    
    This was a clean cherry-pick from Jason's PR https://github.com/ManageIQ/manageiq/pull/5916
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1293374
    
    See merge request !700

 app/models/miq_server/worker_management/monitor.rb |  7 ++----
 spec/factories/miq_worker.rb                       |  5 +++-
 spec/models/miq_server/worker_monitor_spec.rb      | 27 +++++++++++++++++++++-
 3 files changed, 32 insertions(+), 7 deletions(-)

Comment 5 Milan Falešník 2016-01-21 17:07:36 UTC
Ok, it appears to be working on 5.5.2.1

Comment 6 errata-xmlrpc 2016-02-10 15:29:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:0159