Project

General

Profile

Actions

Bug #8333

closed

Incorrect matcher values with multi-key matchers

Added by Jeff Sault about 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

As discussed with Ohad on the mailing list (https://groups.google.com/forum/#!topic/foreman-users/f2YrbR3_FPY)

I have created a custom fact called 'all_environments' which is always "true" (string). My matcher order for a parametised class is...

fqdn
hostgroup
environment
all_environments
environment,all_environments

overriding at the pure 'environment' level works but if i create a matcher (all_environments=true) i get the value from the 'environment,all_environments' matcher.

Doing more tests it seems that matchers with multiple keys are fundamentally broken and very rarely return what's expected, another test case with the same matcher order and the following matches:

- all_environments=true value1
- environment=production,all_environments=true value2

In this case I would expect 'value1' to be returned. I actually get 'value2'

If i change the matchers to:

- all_environments=true value1
- environment=production,all_environments=nottrue value2

Now I get 'value1' returned, as expected.


Related issues 2 (1 open1 closed)

Related to Foreman - Bug #5554: Smart Class Parameter override matches throw error when matching on multiple matchersClosedOri Rabin05/02/2014Actions
Related to Foreman - Bug #11112: Matcher for unlisted attribute fails with "comparison of Array with Array failed"New07/14/2015Actions
Actions #1

Updated by Dominic Cleal about 10 years ago

  • Category set to Parameters
Actions #2

Updated by Ori Rabin about 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin
Actions #3

Updated by The Foreman Bot about 10 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1925 added
  • Pull request deleted ()
Actions #4

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #5554: Smart Class Parameter override matches throw error when matching on multiple matchers added
Actions #5

Updated by Ori Rabin over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Dominic Cleal over 9 years ago

  • Translation missing: en.field_release set to 50
Actions #7

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #11112: Matcher for unlisted attribute fails with "comparison of Array with Array failed" added
Actions

Also available in: Atom PDF