Source code updated while server is running

If we have the ManageIQ server running in the background and we accidentally update the source code, we might not be able to stop the processes running in the background if one of the workers was removed.

Recently we had to remove the Automate Worker from the codebase so in most dev environments we would have 2 Automate Workers running in the background when you start the ManageIQ server (bin/rake evm:start).

If the code was updated without first stopping the server (bin/rake evm:kill or bin/rake evm:stop). The kill or stop will fail because of the removal of the Automate Worker. This leaves the information about the Workers in the miq_worker table in the database. This will become an hindrance when you try to start the server the next time.

Please stop your server before updating the source code.

If you are stuck in the state where the Automate Worker is preventing the server from terminating and starting. Do the following steps

(1) From a shell kill all the ruby processes related to ManageIQ
pkill ruby
(2) Log into the rails console and clear the workers
bin/rails c

(3) Restart the server using (bin/rake evm:start)