Project

General

Profile

Actions

Bug #18151

open

Smart matcher value is invalid hash after editing the host environment.

Added by Vincent Lamers over 7 years ago. Updated almost 7 years ago.

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

Description

I'm using smart class parameters in foreman. When I override a parameter of the type hash through a matcher that's all working fine. But after I try to change the environment of the host I'm dropped to the parameters TAB and I receive an error 'value is invalid hash.That's indeed true, it looks like a string:

--- "check_ports_tcp:\r\n command: check_ports.pl\r\n args: tcp perl:4949 munin-node:4949
nrpe:5666 sshd:22 inetd:106,107,108,146,850\r\n"

My YAML output looks good:
check_ports_tcp:
command: check_ports.pl
args: tcp perl:4949 munin-node:4949 nrpe:5666 sshd:22 inetd:106,107,108,146,850

I have 'merge overrides' and 'merge default' active of the specific smart class parameter. Looks like when I try to switch the environment, the hash is accidentally converted into a string or something like that. My work arround for now is "update hosts set environment_id = 1 where name = '<hostname>'; But that's of course a crappy workaround..

foreman version 1.13.3-1.


Files

Actions #1

Updated by Dominic Cleal over 7 years ago

  • Subject changed from value is invalid hash after editing the host environment. to Smart matcher value is invalid hash after editing the host environment.
  • Category set to Parameters
Actions

Also available in: Atom PDF