Bug 1412558 - Check compliance of last known configuration crash
Summary: Check compliance of last known configuration crash
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.8.0
Assignee: Erez Freiberger
QA Contact: Dmitry Misharov
URL:
Whiteboard: control:compliance:ui:error
Depends On:
Blocks: 1413621
TreeView+ depends on / blocked
 
Reported: 2017-01-12 09:52 UTC by Gilad Shefer
Modified: 2017-06-12 16:47 UTC (History)
11 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1413621 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:47:37 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:


Attachments (Terms of Use)
Error Screenshot (82.14 KB, image/png)
2017-01-12 09:52 UTC, Gilad Shefer
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1383241 0 high CLOSED undefined method `id' for nil:NilClass when clicked on "check compliance of last known configuration" of an archived in... 2021-02-22 00:41:40 UTC

Internal Links: 1383241

Description Gilad Shefer 2017-01-12 09:52:20 UTC
Created attachment 1239836 [details]
Error Screenshot

Description of problem:
Check compliance of last known configuration in provider page crash

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

How reproducible:
100%

Steps to Reproduce:
1. Create a compliance policy, policy profile, enable this profile in the provider page
2. Compute -> Containers -> Providers -> provider summary page
3. Policy -> Check compliance of last known configuration

Actual results:
Unexpected error encountered
Error text:
undefined method `split' for #<Class:0x0000000c49d8b8> Did you mean? split_id [ems_container/button]

Expected results:
Check compliance of last known configuration

Additional info:

Comment 2 Mooli Tayer 2017-01-12 11:07:12 UTC
Gilad is there no stack trace in one of the logs?

Comment 4 Harpreet Kataria 2017-01-12 22:52:12 UTC
Federico,

I have looked into this issue, it seems like "Check Compliance of last known Configuration" button is broken for all provider types, commit 129d85dc28f515c18800b9ab55490825a055c4ef(https://github.com/ManageIQ/manageiq/pull/11002) by Alon Goldboim seems to have introduced the issue. 

I was able to fix the issue if i changed line https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/ems_common.rb#L576 from add_flash(_("No %{record} were selected for %{task}") % {model => ui_lookup(:models => model),
:task => "Compliance Check"}, :error) to add_flash(_("No %{record} were selected for %{task}") % {model => ui_lookup(:models => model.to_s),
:task => "Compliance Check"}, :error)
After this change issue was fixed when pressing button from list view, but it still throws an error when pressing same button from Summary screen with error:
[----] F, [2017-01-12T17:38:33.844707 #17235:4e3c3a4] FATAL -- : Error caught: [ArgumentError] wrong number of arguments (given 1, expected 3..4)
/home/hkataria/dev/manageiq-ui-classic/app/controllers/ems_common.rb:150:in `view_setup_helper'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/ems_common.rb:113:in `show_entities'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/ems_common.rb:136:in `show'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/ems_common.rb:581:in `check_compliance'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/ems_common.rb:481:in `button'


Can you please have someone look into this, feel free to ping me if you need help.

Thanks,
~Harpreet

Comment 5 Federico Simoncelli 2017-01-13 08:38:37 UTC
Erez can you check if this is a duplicate of bug 1402349 that you just fixed?

Comment 6 Erez Freiberger 2017-01-15 09:10:48 UTC
This seems a similar problem to https://bugzilla.redhat.com/show_bug.cgi?id=1402349 but different place. we need a new fix as Harpreet mentioned.

Comment 8 Erez Freiberger 2017-01-16 11:18:39 UTC
The classic ui PR was merged. we should make a clone for zstream.

Comment 10 Erez Freiberger 2017-01-16 14:45:02 UTC
current fix is still lacking

Comment 11 Erez Freiberger 2017-01-17 14:34:34 UTC
Another master PR to finally fix this: https://github.com/ManageIQ/manageiq-ui-classic/pull/172

Comment 12 Dmitry Misharov 2017-03-02 08:36:08 UTC
Verified in 5.8.0.3.20170301174324_1e2e0c4, "Check Compliance of last known Configuration" works without errors.


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