From 281fb9929e2cdcfdaf95e0b90b3b690b78535ddb Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 24 Oct 2011 14:25:15 +0200 Subject: Document upgrade instructions restart_new_emulator and restart_emulator --- system/doc/design_principles/appup_cookbook.xml | 43 +++++++++++++++++-------- 1 file changed, 30 insertions(+), 13 deletions(-) (limited to 'system/doc/design_principles/appup_cookbook.xml') diff --git a/system/doc/design_principles/appup_cookbook.xml b/system/doc/design_principles/appup_cookbook.xml index bc61578953..eebe6ba7b4 100644 --- a/system/doc/design_principles/appup_cookbook.xml +++ b/system/doc/design_principles/appup_cookbook.xml @@ -4,7 +4,7 @@
- 20032009 + 20032011 Ericsson AB. All Rights Reserved. @@ -603,25 +603,42 @@ code_change(_OldVsn, State, port) ->
- Emulator Restart -

If the emulator can or should be restarted, the very simple - .relup file can be created manually:

+ Emulator Restart and Upgrade +

There are two upgrade instructions that will restart the emulator:

+ + restart_new_emulator + Intended for when erts, kernel, stdlib or sasl is + upgraded. It is automatically added when the relup file is + generated by systools:make_relup/3,4. It is executed + before all other upgrade instructions. See + Release + Handling for more information about this + instruction. + restart_emulator + Used when a restart of the emulator is required after all + other upgrade instructions are executed. See + Release + Handling for more information about this + instruction. + + +

If an emulator restart is necessary and no upgrade instructions + are needed, i.e. if the restart itself is enough for the + upgraded applications to start running the new versions, a very + simple .relup file can be created manually:

{"B", [{"A", [], - [restart_new_emulator]}], + [restart_emulator]}], [{"A", [], - [restart_new_emulator]}] + [restart_emulator]}] }. -

This way, the release handler framework with automatic packing - and unpacking of release packages, automatic path updates etc. can - be used without having to specify .appup files.

-

If some transformation of persistent data, for example database - contents, needs to be done before installing the new release - version, instructions for this can be added to the .relup - file as well.

+

In this case, the release handler framework with automatic + packing and unpacking of release packages, automatic path + updates etc. can be used without having to specify .appup + files.

-- cgit v1.2.3 From ae1c361f797a104a35aef967cc694b457217f488 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 3 Nov 2011 15:01:11 +0100 Subject: Add documentation for upgrade from pre R15 to post R15 sasl --- system/doc/design_principles/appup_cookbook.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'system/doc/design_principles/appup_cookbook.xml') diff --git a/system/doc/design_principles/appup_cookbook.xml b/system/doc/design_principles/appup_cookbook.xml index eebe6ba7b4..798b23d847 100644 --- a/system/doc/design_principles/appup_cookbook.xml +++ b/system/doc/design_principles/appup_cookbook.xml @@ -640,5 +640,23 @@ code_change(_OldVsn, State, port) -> updates etc. can be used without having to specify .appup files.

+ +
+ Emulator Upgrade from pre OTP R15 +

From OTP R15, an emulator upgrade is performed by restarting + the emulator with new versions of the core applications + (kernel, stdlib and sasl) before loading code + and running upgrade instruction for other applications. For this + to work, the release to upgrade from must includes OTP R15 or + later. For the case where the release to upgrade from includes an + earlier emulator version, systools:make_relup will create a + backwards compatible relup file. This means that all upgrade + instructions will be executed before the emulator is + restarted. The new application code will therefore be loaded into + the old emulator. If the new code is compiled with the new + emulator, there might be cases where the beam format has changed + and beam files can not be loaded. To overcome this problem, the + new code should be compiled with the old emulator.

+
-- cgit v1.2.3