View Source Edeliver.Relup.Instructions.CheckProcessesRunningOldCode (edeliver v1.9.2)
Cancels the upgrade if there are processes running old code
from previous upgrades. This upgrade instruction checks whether any of the modules that will be (re)loaded during upgrade has old code. If any of them has old code it will throw an error and abort the release upgrade. This prevents crashing and restarting the node during the live upgrade. This instruction is inserted before the "point of no return" which causes it to run twice, once when checking the relup and once when executing the relup.
Link to this section Summary
Functions
Returns the modules which will be loaded during the upgrade.
Calls the run/1
function of this module
Callback implementation for Edeliver.Relup.RunnableInstruction.dependencies/0
.
Inserts the instruction before the point of no return.
Callback implementation for Edeliver.Relup.Instruction.modify_relup/2
.
Checks whether the modules passed as argument have old code.
Link to this section Functions
@spec arguments( %Edeliver.Relup.Instructions{ changed_modules: term(), down_instructions: term(), down_version: term(), up_instructions: term(), up_version: term() }, Edeliver.Relup.Config.t() ) :: term()
Returns the modules which will be loaded during the upgrade.
These modules are taken as argument for the run/1
function and only
these modules are checked whether they run old code. Modules which
will not be updated during the upgrade does not affect the upgrade
process even if they run old code. The modules to check are take from
the load_object_code
instructions.
@spec call_this(arguments :: [term()]) :: Instruction.instruction() | Instruction.instructions()
Calls the run/1
function of this module
from the relup file during hot code upgrade
@spec dependencies() :: [instruction_module :: atom()]
Callback implementation for Edeliver.Relup.RunnableInstruction.dependencies/0
.
@spec insert_where() :: Instruction.insert_fun()
Inserts the instruction before the point of no return.
This causes the release handler to abort the upgrade
already when running :release_handler.check_install_release/1
if this instruction fails.
Callback implementation for Edeliver.Relup.Instruction.modify_relup/2
.
Checks whether the modules passed as argument have old code.
These modules are the modules which will be upgraded. This function runs twice because it is executed before the "point of no return", once when checking the relup and once when executing the relup.