Bug 1404280 - Suspending role in diagnostics Error caught: [ActiveRecord::RecordNotFound] Couldn't find MiqServer with 'id'=0
Summary: Suspending role in diagnostics Error caught: [ActiveRecord::RecordNotFound] C...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.8.0
Assignee: Harpreet Kataria
QA Contact: Parthvi Vala
URL:
Whiteboard: configuration:appliance
Depends On:
Blocks: 1414887
TreeView+ depends on / blocked
 
Reported: 2016-12-13 14:19 UTC by Matouš Mojžíš
Modified: 2019-07-18 10:32 UTC (History)
7 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1414887 (view as bug list)
Environment:
Last Closed: 2018-02-28 15:26:04 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
production.log (8.75 KB, text/plain)
2016-12-13 14:19 UTC, Matouš Mojžíš
no flags Details

Description Matouš Mojžíš 2016-12-13 14:19:44 UTC
Created attachment 1231231 [details]
production.log

Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
1.Go to Settings -> Configuration -> Diagnostics -> CFME Region
2.Select Roles by Servers or Servers by Roles
3. Select a role and suspend it by clicking on configuration -> suspend in toolbar

Actual results:
Error in production.log added in attachment

Expected results:


Additional info:

Comment 2 Joe Rafaniello 2016-12-15 16:41:10 UTC
It looks like ops_controller/diagnostics.rb is calling MiqServer.find with 0 as an argument:

        @selected_server = kls.find(from_cid(x_node.split("-").last))

Comment 3 Harpreet Kataria 2016-12-18 19:30:57 UTC
https://github.com/ManageIQ/manageiq/pull/13234

Comment 4 CFME Bot 2016-12-19 15:01:21 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7c008ee357c9f0ae91d15754656bb6f2805fe3bc

commit 7c008ee357c9f0ae91d15754656bb6f2805fe3bc
Author:     Harpreet Kataria <hkataria>
AuthorDate: Sun Dec 18 14:29:33 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Sun Dec 18 14:36:07 2016 -0500

    Fixed code that sets selected_server record to be used by view.
    
    Use existing parent record to set @selected_server variable that should point to the record selected in the diagnostics tree on the left.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1404280

 app/controllers/ops_controller/diagnostics.rb      |  3 +-
 .../controllers/ops_controller/diagnostics_spec.rb | 34 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 2 deletions(-)

Comment 7 Matouš Mojžíš 2017-06-29 14:14:01 UTC
Verified in 5.8.1.0. Active roles can be suspended without any errors.


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