Project

General

Profile

Actions

Bug #5554

closed

Smart Class Parameter override matches throw error when matching on multiple matchers

Added by Ryan Sabatini almost 10 years ago. Updated over 5 years ago.

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

Description

Matching on multiple values will fail when fqdn or hostgroup is listed first. For example: matching on hostgroup=Servers,osfamily=RedHat will throw the error "hostgroup=Servers,osfamilyRedHat does not match an existing hostgroup"; however, switching the order to osfamily=RedHat,hostgroup=Servers will successfully add the match to the Smart Class Parameter.


Files

bugexample.PNG View bugexample.PNG 24.4 KB Ryan Sabatini, 05/02/2014 02:09 PM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #8333: Incorrect matcher values with multi-key matchersClosedOri Rabin11/10/2014Actions
Actions #1

Updated by Dominic Cleal almost 10 years ago

I'm pretty certain using multiple matchers isn't possible either way - what's happening when you use hostgroup= first is that it's able to verify this against known host groups. When using osfamily= first, it's matching on a fact and so can't verify possible values.

Actions #2

Updated by Ryan Sabatini almost 10 years ago

The Foreman Manual for release 1.4 under the section "Example 2 - Change for a group of hosts (via custom fact) with validation and ordering" shows that matching on multiple values is possible. The manual states this is for smart variables, but it also works for smart class parameters.

We have multiple instances running in our environment where we are successfully matching on multiple values and applying the correct overrides. For example, we currently have sitecfg_purpose= ,hostgroup= as match criteria for a smart class parameter (sitecfg_purpose being a custom fact). The server meeting the credentials will successfully override the value. When we had the order of the two reversed to hostgroup= , sitecfg_purpose= Foreman would throw the error "hostgroup=(hostgroup),sitecfg_purpose=(purpose) does not match an existing hostgroup".

Actions #3

Updated by Ori Rabin over 9 years ago

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

Updated by The Foreman Bot over 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

  • translation missing: en.field_release set to 50
Actions #6

Updated by Ori Rabin almost 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

  • Related to Bug #8333: Incorrect matcher values with multi-key matchers added
Actions

Also available in: Atom PDF