Project

General

Profile

Actions

Bug #12324

closed

Hash and array smart parameters are getting corrupted after multiple saves

Added by Tim Verhoeven over 8 years ago. Updated over 8 years ago.

Status:
Duplicate
Priority:
High
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I define (override) a smart parameter and made sure the correct type was set (hash or array) for a Puppet class.
Then I go to a host or hostgroup and enter a value for this parameter in YAML notation.
I can then see in the YAML output for the host that de value is displayed correctly.
Then I edit the host or hostgroup again, but now the value I've entered is quoted and or escaped.

Example: for the hash_resources class, I've overridden the resources parameter. This is the value I've entered:
dns::zone:
dap:
zonetype: slave
masters:
- 10.67.75.155
75.67.10.in-addr.arpa:
reverse: true
zonetype: slave
masters:
- 10.67.75.155

This is the value I see when I edit the host again:
--- ! "dns::zone:\r\n dap:\r\n zonetype: 'slave'\r\n masters:\r\n - 10.67.75.155\r\n
\ 75.67.10.in-addr.arpa:\r\n reverse: true\r\n zonetype: 'slave'\r\n masters:\r\n
\ - 10.67.75.155"

Trying to save a host with this value returns an error because foreman can't validate this as a correct hash, which is of course correct.

This means that when editing a host you have to reenter these values each time.

I'm currently running Foreman 1.9.2 on CentOS7, installed using the katello installer.


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #11375: Smart class parameters turn YAML to string when using a multi line yamlClosedDominic Cleal08/16/2015Actions
Actions

Also available in: Atom PDF