Error in arrays values after 1.16 to 1.17 migration

The values in the params of all clases are scaped …
expected: nameserver : [“”,“”,“”]
found after migration: nameserver “[/“”,/“”,/“”]”
Expected outcome:
The values are not proppertly applied.
Foreman and Proxy versions:
Initial : 1.16.2 . --> 1.18.0
Foreman and Proxy plugin versions:

Other relevant data:

If you change de value manualy it works perfectly, but I have a LOOTTTT of values to change.


Thank you for reporting this issue! Looks like we had a bad migration in 1.17, I’ve opened up an issue on our redmine tracker: Bug #24640: 1.17 migration causes array/hash values for parameters to turn into strings with escaped quotes - Foreman
There is a possible workaround inside, but do take care when attempting to use it (i.e. backup your database in case something goes wrong).

The fix for this has now been merged:

If you can’t wait for the 1.18.2 or 1.19.0 releases that will contain the fix, you can download the db/migrate/20180816134832_cast_lookup_key_values.rb file from that pull request into /usr/share/foreman/ and run foreman-rake db:migrate to execute it. It should fix all of your existing values.

1 Like

1.17.4 is out with this fix as well as 1.19.0. A 1.18.2 release isn’t there yet.