edeliver v1.4.5 Edeliver.Relup.Instructions.CheckProcessesRunningOldCode
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 insterted 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
Returns a list of module names which implement the behaviour Edeliver.Relup.RunnableInstruction
Inserts the instruction before the point of no return
Modifies the relup file
Checks whether the modules passed as argument have old code
Link to this section Functions
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.
call_this(arguments :: [term()]) :: Instruction.instruction() | Instruction.instructions()
Calls the run/1
function of this module
from the relup file during hot code upgrade
Returns a list of module names which implement the behaviour Edeliver.Relup.RunnableInstruction
and are used / referenced by this runnable instruction. These modules must be loaded before this instruction is executed for upgrades and unloaded after this instruction for downgrades. Default is an empty list.
Callback implementation for Edeliver.Relup.RunnableInstruction.dependencies/0
.
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.
Modifies the relup file.
Modifies the relup
file which will be used to upgrade (or downgrade) from one version to another
by inserting, removing, or shifting appup instructions.
See Edeliver.Relup.InsertInstruction
and Edeliver.Relup.ShiftInstruction
for useful helpers to
insert / position the instructions and Edeliver.Relup.RunnableInstruction
to execute custom code
during the upgrade.
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.