Project

General

Profile

Bug #16591

Smart matchers with multiple, more specific facts match on less specific facts

Added by TJ Guthrie over 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Hello,

I think I am running into a bug when overriding a puppet class parameter. I am having trouble getting the matchers to work.

Say you have a set of facts as a priority in the order section that a host matches. The bug occurs when the following conditions are met:
- you have a subset of facts as a priority in the order section that the host also matches
- that subset is a lower priority than the original set in the order section
- there is a value present to the subset of facts in the matcher section
- the subset is listed before the original set in the matcher section

I attached images showing an example.

SmartClassParameter.png View SmartClassParameter.png 107 KB Shows manufacturer,operatingsystemmajrelease,osfamily at a higher priority than manufacturer TJ Guthrie, 09/17/2016 12:58 PM
FactMatch.png View FactMatch.png 205 KB Shows the host eng-fs01 matching the facts TJ Guthrie, 09/17/2016 12:58 PM
ParameterValue.png View ParameterValue.png 158 KB Shows the incorrect value getting assigned to the parameter TJ Guthrie, 09/17/2016 12:58 PM
Smartclassparameter Factmatch Parametervalue

Associated revisions

Revision 48e22640 (diff)
Added by Tomer Brisker about 4 years ago

Fixes #16591 - Correct parameter value order for complex matcher

If the order includes more specific complex matchers before less
specific one (e.g., "organization,location" before "organization"), the
order of resolution is incorrect, because the classification service
will check for the index of the matcher in the path which is serialized
as a string - "organization,location\norganization" leading to incorrect
order.

History

#1 Updated by Dominic Cleal over 6 years ago

  • Subject changed from smart class parameter matchers not working to Smart matchers with multiple, more specific facts match on less specific facts
  • Category set to Parameters

#2 Updated by Tomer Brisker about 4 years ago

  • Bugzilla link set to 1670002

#3 Updated by The Foreman Bot about 4 years ago

  • Assignee set to Tomer Brisker
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6439 added

#4 Updated by Marek Hulán about 4 years ago

  • Fixed in Releases 1.22.0 added

#5 Updated by Tomer Brisker about 4 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF