Bug #16591
Smart matchers with multiple, more specific facts match on less specific facts
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
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.
Associated revisions
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
Applied in changeset 48e2264091ae08e490eabd990a0c12811b01612d.
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.