Description of problem:
Satellite upgrade from 6.5.x to 6.6 causes strings being converted in booleans which in turn causes puppet failures.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Parameter String with value yes
2. Upgrade Satellite 6.5 to 6.6
3. Parameter becomes Boolean with value true
Parameter becomes Boolean with value true
key_type_name = 'string'
value = YAML.load param.value <<<<============== IF THE VALUE IS "no" it returns "false"
key_type_name = value.is_a?(Hash) ? 'yaml' : find_key_type(value) <<==== find_key_type function call.
Foreman-rake console output
irb(main):032:0> value = YAML.load Parameter.unscoped.value
And then we have the function return the value as boolean
return 'boolean' if [true, false].include?(param_value)
Parameter stays String with value true
This change was introduced because of an RFE to have more types supported for parameters.
Currently "string" is the only parameter type supported in hostgroup parameters on foreman 1.3. Our customers desperately need to put Array and Boolean type of parameters (possibly other types as well) into the hostgroup for better puppet parameter management of they application clusters. Since multiple parameter types are supported in Smart Variables, why the hostgroup parameters (as well host parameter) have to stuck with just one type (string).
Created redmine issue https://projects.theforeman.org/issues/28129 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28129 has been resolved.
*** Bug 1767443 has been marked as a duplicate of this bug. ***
Is there any work-around for the satellites who are already upgraded to satellite 6.6?
Jaskaran Singh Narula
- create org
- add global params (true/false, on/off, yes/no string value)
- register host
- add host params (true/false, on/off, yes/no string value)
After upgrade check:
- upgrade end up successfully
- global params - all remain string type
- host params - all remain string type
-> conversion didn't run.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.