Problem:
i perform an update from 1.21 to 1.22, but i have wrong global parameter in foreman
the db:migrate cannot be done due to this wrong parameter
i have pending migration message in foreman Service unavailable ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending in the system.
if i try to remove global parameter with hammer cli :
Could not delete the global parameter :
Error: 503 Service Unavailable
how can i remove or fix this issue to finish update ?
Thanks !
Foreman and Proxy versions:
1.22
= 20181105061336 CastKeyTypesAndValuesInParameters: migrating ================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
740: unexpected token at '******"'
can you please paste the full stack trace?
If you know which parameter is causing the issue, you can delete it from foreman-rake console by using the following command:
That is odd, could you please add the full stack trace to the bug report? @kgaikwad - can you take a look? looks like it’s failing in the migration for adding types to parameters.
You could find a parameter by name, but there may be more than one with the same name, so:
Parameter.where(name: 'parameter_name_here')
will get you the list of all of them, then you can select from that list the one that needs destroying using the id like above.