Bug #11375
closedSmart class parameters turn YAML to string when using a multi line yaml
Description
Adding an override to a smart class parameter of type YAML with the value:
test:
example: hello
results in the host edit form showing the parameter as: --- ! "test: \nexample: hello\n"
Files
Updated by Ori Rabin about 9 years ago
- Related to Tracker #4470: Usability of parameters and overrides added
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release set to 91
Updated by Dominic Cleal about 9 years ago
- Has duplicate Bug #11830: Different results when adding a parameter override from a hostgroup vs puppet class directly added
Updated by Dominic Cleal about 9 years ago
This seems to be because of the :validate => false on the association in host_common to lookup_value. The validation's necessary to cast the value correctly - and also to fix issues such as #11782.
Updated by Dominic Cleal about 9 years ago
- Related to Bug #11782: Puppet override with invalid hash array doesn't give error added
Updated by Dominic Cleal about 9 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
- Translation missing: en.field_release deleted (
91)
Updated by The Foreman Bot about 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2755 added
- Pull request deleted (
)
Updated by Dominic Cleal about 9 years ago
- Has duplicate Bug #11962: Override of Host-Parameter is saved malformed added
Updated by Julien Pivotto about 9 years ago
Why did you delete Release (1.9.3)? this is a very annoying bug and the PR has lots of conflicts with 1.9 branch so it would be great to see this backported properly in 1.9. Thanks :)
Updated by Julien Pivotto about 9 years ago
The blocking problem is that each time you save the host (e.g change anything on the host and click save) the smart parameters are malformed
Updated by Dominic Cleal about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 003359564b4ab5fa8198cc9b035df405e7e600cd.
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release set to 63
Updated by Dominic Cleal about 9 years ago
Julien Pivotto wrote:
Why did you delete Release (1.9.3)?
I mistakenly thought it was a new, 1.9 regression, but it wasn't.
this is a very annoying bug and the PR has lots of conflicts with 1.9 branch so it would be great to see this backported properly in 1.9. Thanks :)
Yeah, I will investigate this but at the moment I don't have the time to make sure it works properly. The implementation of overrides between 1.10 and 1.9 is different in a few places, so I'm not sure if the fix will introduce further bugs in 1.9 - it's going to need some testing. For now I'm placing it on 1.10.
Updated by Dominic Cleal about 9 years ago
- Related to Bug #12095: Smart Class Parameters mangle erb interpolated variables added
Updated by Anthony Lapenna about 9 years ago
+1 really annoying bug, would be nice if the fix could be release in 1.9.
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release changed from 63 to 91
No promises, but I'll move it to make sure it appears on the right TODO list. Hopefully the backport's possible.
Updated by Anonymous about 9 years ago
- Has duplicate Bug #12191: Array-typed smart parameters changed to broken JSON added
Updated by Julien Pivotto about 9 years ago
The problem is the same for hostgroups. You can not save hostgroup without breaking the smart variables.
Updated by Dominic Cleal about 9 years ago
larry campbell wrote:
Is this fix found in 1.10.0-RC1?
Yes.
Updated by Dominic Cleal about 9 years ago
- Related to Bug #12284: host group parameter overrides reformatting YAML values to strings added
Updated by Anthony Lapenna about 9 years ago
- File deep_merge_exception.txt deep_merge_exception.txt added
Btw, once your parameters are 'corrupted' you'll not be able to edit your host or even access the YML dump.
See the attached file for more details about the stacktrace.
Updated by Dominic Cleal about 9 years ago
- Has duplicate Bug #12324: Hash and array smart parameters are getting corrupted after multiple saves added
Updated by Anonymous about 9 years ago
Dominic Cleal wrote:
No promises, but I'll move it to make sure it appears on the right TODO list. Hopefully the backport's possible.
Will this make it to 1.9.3?
Updated by Dominic Cleal about 9 years ago
Alyssa H wrote:
Will this make it to 1.9.3?
Yep, seems to be working fine! I hope to get .3 out early next week as we've got pretty much everything I hoped for.
Updated by Tim Verhoeven about 9 years ago
I've just upgrade my 1.9.2 install to 1.9.3. But it seems that the issue isn't fixed in 1.9.3. I'm still having the issue. Could somebody else test and verify?
Updated by Anthony Lapenna about 9 years ago
We're still having this issue but with array type parameters only.
Updated by Brad Cowie about 9 years ago
It seems like 1.9.3 fixed it for me when using arrays on the host/group override page.
I did initially have trouble updating overrides that had previously been escaped and stored in the db. Try fixing your overrides manually in the puppet classes page and then when the correct unescaped version of the override is stored in the db try again from the host/group override page.
Updated by Vincent Miszczak almost 9 years ago
I still have the issue in 1.10 for a host belonging to a nested group.
Group have original multi line yaml->NestedGroup inherits->Host inherits->broken yaml