Bug 1391824

Summary: [RFE] Add the ability to use host collection as a matcher for smart class parameters.
Product: Red Hat Satellite Reporter: Amit Kumar Das <amdas>
Component: Smart VariablesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.2CC: bbuckingham, inecas, jcallaha, mhulan, orabin, tstrachota
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-29 09:53:09 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:

Description Amit Kumar Das 2016-11-04 07:03:37 UTC
Description of problem:

Presently there are only four matcher values for overriding smart class parameters in Satellite 6 which are fqdn, hostgroup, os and domain.
It would be very beneficial to be able to use host collections as a matcher value as this is the primary grouping method in Satellite and would be a common requirement to setup unique puppet overrides on.

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

Actual results:
We cannot find any fact/YAML definition related to 'Host Collection' in any
hosts which are associated to Host collections. Fact is required in hosts to create a matcher in Smart Class Parameter.

How to reproduce:
In satellite 6 server, customer want to add below attributes:
Navigate to Configure>Classes>Smart Class Parameter>check Override box>Prioritize attribute order
#hostcollection (Host Collection)

Once this is added it is listed in "Specify matchers" drop down list where customer can select:

Attribute type   Name
--------------   -------
hostcollection = APACHOSTS or NAHOSTS 

Above hosts collections (APACHOSTS/NAHOSTS etc) are earlier created in satellite and contains several hosts. Based on the specific matcher, new 'values' can be passed to all hosts.

Question arises here - Is there any facts or YAML definition available in all the hosts that is part of host collection?

I checked some hosts (Monitor->Facts) and cannot find any such facts. After running #facter in any puppet hosts, I can see below several facts which can be used to create a matcher in Smart Class Parameter but cannot find any facts related to host collection -

fqdn,
os,
domain,
hostname etc 

Expected results:
Cu is requesting to create a matcher based on host collection. Currently, we cannot find any facts/YAML definition related to Host Collection in any hosts.
Once fact is available it can be used to create a matcher.

Comment 1 Amit Kumar Das 2016-11-04 07:12:07 UTC
Type            RFE
Account Name	Queensland University of Technology
Account Number	453570

Comment 2 Marek Hulan 2016-11-04 07:17:19 UTC
I don't think host collection is being added to ENC output (YAML definition), I see only kt_env, kt_cv, lifecycle_environment, content_view, kickstart_repository. It might be easy to add though. I'd recommend opening separate RFE for that since it would be useful anyway.

Comment 3 Amit Kumar Das 2016-11-04 07:45:10 UTC
This RFE (1391824) is assign to add a matcher on host collection.

New RFE (1391831) created to include host's host collection to YAML definition.
https://bugzilla.redhat.com/show_bug.cgi?id=1391831

Comment 4 orabin 2016-12-29 09:53:09 UTC

*** This bug has been marked as a duplicate of bug 1384009 ***