Looks like an issue in db/migrate/20170112175131_migrate_template_to_parameters_macros.rb causes any such lookupkeys/lookupvalues to turn their values to strings. Since the values are saved using update_attribute, callbacks aren't executed meaning cast_default_value is not called and the value remains a string. For example: <pre> #<VariableLookupKey:0x0000000015b50738 id: 21532, key: "zdcaz", created_at: Thu, 16 Aug 2018 13:01:56 UTC +00:00, updated_at: Thu, 16 Aug 2018 13:01:56 UTC +00:00, puppetclass_id: 5, default_value: ["a", "b"], path: nil, description: "", validator_type: "", validator_rule: nil, key_type: "array", override: false, required: false, merge_overrides: false, avoid_duplicates: false, omit: nil, type: "VariableLookupKey", merge_default: false, hidden_value: false> [152] pry(main)> k.default_value = convert(k.default_value.to_s) => "[\"a\", \"b\"]" </pre> As a workaround, it may be possible to iterate over all Lookupkeys and values and save them all again to ensure casting is called from foreman-rake console (please take care to backup your database before running this): <pre> LookupKey.unscoped.find_each(&:save_without_auditing) </pre>
Created from redmine issue http://projects.theforeman.org/issues/24640
Upstream bug assigned to tbrisker
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24640 has been resolved.
Verified! @ Satellite 6.4 snap 19 Steps: 1. Created various and all types of class parameters before the upgrade. 2. Ran upgrade from 6.3.3-2 to 6.4. Observation: 1. Upgrade completed successfully without any errors. 2. Also, the data and types of class parameters are intact after the upgrade. Hence, changing the bug status to Verified.
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. https://access.redhat.com/errata/RHSA-2018:2927