Bug #23581
closed
Upgrade to Foreman 1.17 converts YAML to JSON Hash
Added by Frederik Weber over 6 years ago.
Updated over 6 years ago.
Description
We have Puppet parameters with the type hash and a YAML hash as content (this is valid per Foreman documentation).
After the run of db:migrate the content gets migrated to a JSON hash.
If I extract an example value from the DB:
Before db:migrate
---
frequency: daily
After db:migrate
--- '{"frequency"=>"daily"}'
I see two solutions:
1. Change the db:migrate task that migrates valid YAML hashes to JSON hashes.
2. Update the documentation that YAML hashes are no longer valid.
Just verified that an upgrade from 1.16.0 to 1.16.1 doesn't convert hashes.
Therefore it is likely that the issue was introduced in the version 1.17.
It is likely that this "bug" was introduced by PR #5403 (https://github.com/theforeman/foreman/pull/5403).
Should all YAML lookup_values become JSON hashes? Especially since it is possible to change the values back to YAML hashes (through the UI) and they get written like that to the DB.
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5556 added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/5556)
- Pull request https://github.com/theforeman/foreman/pull/5559 added
- Translation missing: en.field_release set to 360
- Triaged set to No
- Related to Bug #23382: Editing Smart Class Parameter of type YAML creates malformed value in release 1.17.0 added
- Target version changed from 1.17.2 to 1.18.2
1.17.3 has been released, pushing out to 1.18.2
- Status changed from Ready For Testing to Resolved
This issue has been resolved by #24640.
- Related to Bug #24640: 1.17 migration causes array/hash values for parameters to turn into strings with escaped quotes added
Also available in: Atom
PDF