Project

General

Profile

Actions

Bug #12095

closed

Smart Class Parameters mangle erb interpolated variables

Added by Anonymous over 8 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

This occurs on the class level. Hosts, hostgroups and nested hostgroups appear to have the correct behavior. This occurs in the nightly (October 7, 2015) installed with a default foreman-installer setup, as well as in version 1.9.2.

When adding a parameter override of type array, yaml or hash that has an element which is an interpolated erb value, the first time one clicks submit, the values appear correctly.

Open the class again and you will see that the parameter overrides have been mangled. Click submit, and the yaml values for the host will show true for arrays and hashs, and will be prefixed by multiple instances of the following (and it gets longer each submission):
! '--- ! "---\r\n


Files

mangled hash.png View mangled hash.png 112 KB Anonymous, 10/07/2015 05:44 PM
mangled_array.png View mangled_array.png 111 KB Anonymous, 10/07/2015 05:44 PM
mangled_node_yaml.png View mangled_node_yaml.png 28.9 KB Anonymous, 10/07/2015 05:44 PM
mangled_yaml.png View mangled_yaml.png 114 KB Anonymous, 10/07/2015 05:44 PM
multi_mangled_array.png View multi_mangled_array.png 108 KB Anonymous, 10/07/2015 05:44 PM
multi_mangled_node_yaml.png View multi_mangled_node_yaml.png 30.2 KB Anonymous, 10/07/2015 05:44 PM
multi_mangled_yaml.png View multi_mangled_yaml.png 107 KB Anonymous, 10/07/2015 05:44 PM
original_array.png View original_array.png 106 KB Anonymous, 10/07/2015 05:45 PM
original_hash.png View original_hash.png 113 KB Anonymous, 10/07/2015 05:45 PM
multi_mangled_hash.png View multi_mangled_hash.png 105 KB Anonymous, 10/07/2015 05:45 PM
original_node_yaml.png View original_node_yaml.png 31.3 KB Anonymous, 10/07/2015 05:59 PM
original_yaml.png View original_yaml.png 91.2 KB Anonymous, 10/07/2015 05:59 PM

Related issues 2 (0 open2 closed)

Related to Foreman - Bug #11375: Smart class parameters turn YAML to string when using a multi line yamlClosedDominic Cleal08/16/2015Actions
Has duplicate Foreman - Bug #12117: The web-interface dose not handle smart class parameters that contain templates correctlyDuplicate10/08/2015Actions

Updated by Anonymous over 8 years ago

Looks like I missed two screenshots.

Actions #2

Updated by Dominic Cleal over 8 years ago

  • Category set to Parameters
Actions #3

Updated by Dominic Cleal over 8 years ago

Appears superficially similar to #11375, but that was a host common -> lookup values association issue, so it isn't applicable to this bug which can be reproduced entirely from the Puppet class edit form.

Actions #4

Updated by Dominic Cleal over 8 years ago

  • Has duplicate Bug #12117: The web-interface dose not handle smart class parameters that contain templates correctly added
Actions #5

Updated by Dominic Cleal over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
Actions #6

Updated by The Foreman Bot over 8 years ago

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

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #11375: Smart class parameters turn YAML to string when using a multi line yaml added
Actions #8

Updated by Dominic Cleal over 8 years ago

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

Updated by Dominic Cleal over 8 years ago

  • translation missing: en.field_release set to 104
Actions

Also available in: Atom PDF