Bug 1650635

Summary: roles & addons compliance mismatch in rules
Product: [Community] Candlepin Reporter: Nikos Moumoulidis <nmoumoul>
Component: candlepinAssignee: Nikos Moumoulidis <nmoumoul>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 2.5CC: nmoumoul, redakkan, skallesh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1650638 1650640 (view as bug list) Environment:
Last Closed: 2018-11-22 18:13:44 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: 1640215    
Bug Blocks: 1650638, 1650640    

Description Nikos Moumoulidis 2018-11-16 16:57:04 UTC
Description of problem:
The consumer's compliance is calculated wrong when the pool he is attached to, and which has at least one addon in common with the ones he specified, supports more than 1 addon.

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


How reproducible:
100%

Steps to Reproduce:

- Have a consumer with installed product "product1" and set syspurpose addons to "addon1" and "addon2".
- Attach directly to a pool which provides product1, which has its addons product attribute set to "addon3,addon1"
- Query the consumer's compliance (not the syspurpose compliance, but the general one).


Actual results:
The compliance returned has status 'partial', and has 1 item in 'partiallyCompliantProducts' and 1 item in 'reasons'.

Expected results:

The compliance returned should have status 'valid', and should have no 'partiallyCompliantProducts' or 'reasons', since the pool supports at least one of the addons that the consumer has specified (addon1).

Additional info:

One additional problem: the rules look for the product attribute named 'role' instead of the proper one which is 'roles'.