Bug 1433435

Summary: Policy to exclude a VM from analysis shows as false but scanning is still happening
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ControlAssignee: Lucy Fu <lufu>
Status: CLOSED ERRATA QA Contact: Dmitry Misharov <dmisharo>
Severity: urgent Docs Contact:
Priority: high    
Version: 5.7.0CC: cpelland, gmccullo, jhardy, myoder, obarenbo, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.7.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: control:policy
Fixed In Version: 5.7.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1433084 Environment:
Last Closed: 2017-04-12 14:45:11 UTC Type: ---
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: 1433084    
Bug Blocks:    
Attachments:
Description Flags
hot fix none

Comment 2 CFME Bot 2017-03-17 16:26:23 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/22250ed7e91811e580603f6b5bf9d045a6d7e429

commit 22250ed7e91811e580603f6b5bf9d045a6d7e429
Author:     Greg McCullough <gmccullo>
AuthorDate: Fri Mar 17 12:00:48 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Fri Mar 17 12:22:27 2017 -0400

    Merge pull request #14370 from lfu/prevent_request_vm_scan_1433084
    
    Add the logic to allow a policy to prevent request_vm_scan.
    (cherry picked from commit 83a1785facb87e8d108c1033b8591530b1bbfd18)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1433435

 app/models/vm_or_template/scanning.rb              | 28 +++++++----------
 .../job_proxy_dispatcher_embedded_scan_spec.rb     |  2 +-
 ...dispatcher_get_eligible_proxies_for_job_spec.rb |  2 +-
 spec/models/job_proxy_dispatcher_spec.rb           | 16 +++++-----
 .../job_proxy_dispatcher_vm_proxies4job_spec.rb    |  2 +-
 spec/models/job_spec.rb                            |  4 +--
 spec/models/vm_scan_spec.rb                        | 17 +++++++++--
 spec/models/vm_spec.rb                             | 35 ++++++++++++++++++++++
 8 files changed, 73 insertions(+), 33 deletions(-)

Comment 3 Lucy Fu 2017-03-17 16:40:19 UTC
Created attachment 1264212 [details]
hot fix

Comment 4 Dmitry Misharov 2017-03-23 09:45:57 UTC
Verified in 5.7.2.0.20170321181409_349f1b1. I created policy which prevents analysis of any VM that is tagged as Do Not Analyze. It works correctly for a vm which was tagged "Do Not Analyze".

Comment 5 errata-xmlrpc 2017-04-12 14:45:11 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/RHSA-2017:0898