After restart the server: There are migrations pending in the system

hi all,

after restart the server we get below error:

can anyone tell me whats happens?

thanks in advance

I found this article:

and I did that! now I cannot loggin with my user account!
thats really very strange!

I reset the admin password:
foreman-rake permissions:reset

Now I can loggin! but why Foreman is to strange!

This is what I get after I run foreman-rake db:migrate: my question is I upgrade long time ago my foreman to 3.2.1 and is still the same version! but today I restart the server and I get above error!
Of course I did all steps in upgrade page here.

foreman-rake db:migrate
== 20211111115000 DropFixDbCacheSetting: migrating ============================
== 20211111115000 DropFixDbCacheSetting: migrated (0.0019s) ===================

== 20220111110149 DropRequireSslSmartProxiesSetting: migrating ================
== 20220111110149 DropRequireSslSmartProxiesSetting: migrated (0.0012s) =======

== 20220208134539 RenameCentOsStreamOs: migrating =============================
== 20220208134539 RenameCentOsStreamOs: migrated (0.0046s) ====================

Should I restart after every Upgrade ?

Is there any articles where I can create backup before upgrade for foreman?

You should re-run the foreman-installer after every upgrade. This will ensure everything is applied and restarted as needed.

The full documentation is here: https://docs.theforeman.org/

But it can be quite a mess trying to find exactly what you are looking for… :shrugg:

Thanks for your answer @quba42 , of course run those commands in 2 steps:


foreman-installer --noop --verbose
foreman-installer 

With restart I mean server restart.

Generally speaking foreman-installer should apply all migrations and restart any services that need restarting. So if you need to restart the server in addition to running foreman-installer, then I would say that is a bug in foreman-installer. If you can describe the exact situation (from what version where you upgrading to what version, etc.) where this occurred, the installer team can have a look at it.

1 Like

thank you @quba42

I upgrade from 3.1 to 3.2 and it works without any problems, so far so good.
Yesterday I restart the server and I get above problem and I dont know why?