Bug 1478949 - Control policy doesn't mark an item as Non-Compliant
Summary: Control policy doesn't mark an item as Non-Compliant
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Control
Version: 5.8.0
Hardware: All
OS: All
medium
high
Target Milestone: GA
: cfme-future
Assignee: Lucy Fu
QA Contact: Dmitry Misharov
URL:
Whiteboard: control:policy
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-07 14:47 UTC by Dmitry Misharov
Modified: 2018-12-06 16:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-06 16:37:48 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dmitry Misharov 2017-08-07 14:47:08 UTC
Description of problem:
A control policy with action "Mark as Non-Compliant" doesn't do anything.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a control policy with some events, e.g. VM Reset
2. Assign action "Mark as Non-Compliant" to that event to the list of the actions "if all Conditions are True"
3. Assign the policy to a policy profile.
4. Assign the policy profile to some vm.
5. Reset the vm.
6. Refresh the details screen of the vm.

Actual results:
Compliance status is not changed.

Expected results:
Compliance status should be "Non-compliant".

Additional info:
policy.log shows that the vm was marked as non-compliant:
MIQ(action_compliance_failed): Now executing [Mark as Non-Compliant] of ManageIQ::Providers::Vmware::InfraManager::Vm

Comment 3 Lucy Fu 2018-12-06 16:37:48 UTC
Mark as Non-Compliant only works with compliance policy, not control policy.

What Mark as Non-Compliant action does is just adding a log message saying something like:
MIQ(action_compliance_failed): Now executing [Mark as Non-Compliant] of ManageIQ::Providers::Vmware::InfraManager::Vm.

This action worked with compliance policy would mark the target with a non-compliant icon as the compliance status.


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