aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src/release_handler.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-10-13 11:53:51 +0200
committerSiri Hansen <[email protected]>2011-11-17 16:47:28 +0100
commitbe04ed7beceeb4bcf5db7807e86df87e28c9f4b9 (patch)
tree3c5feabbfb50156cfc6e8025d9c20dd786fb9cd0 /lib/sasl/src/release_handler.erl
parent1dec251ad333045847b75b8ee75d4bff4237108e (diff)
downloadotp-be04ed7beceeb4bcf5db7807e86df87e28c9f4b9.tar.gz
otp-be04ed7beceeb4bcf5db7807e86df87e28c9f4b9.tar.bz2
otp-be04ed7beceeb4bcf5db7807e86df87e28c9f4b9.zip
Distinguish restart_new_emulator from restart_emulator in upgrade instructions
Earlier, there was only one valid instruction to restart the emulator in an appup/relup script, 'restart_new_emulator'. A new instuction, 'restart_emulator', is now added, and the meaning is as follows: 'restart_new_emulator' is mainly for the core applications (erts, kernel, stdlib and sasl), and it indicates that there is new core functionality in the release and the emulator needs to be restarted before executing the upgrade scripts. If this instruction exists, a temporary release will be created which consists of the new version erts, kernel, stdlib and sasl, and the old versions of all other applications. After restarting the emulator with this temporary release, the rest of the upgrade instructions are executed, including loading of new versions. 'restart_emulator' can be used by any application if a restart of the emulator is needed after the upgrade instructions have been executed. In this case, the emulator will be restarted with the new release (i.e. not a tempoarary one) after all other upgrade instructions for all applications have been excecuted.
Diffstat (limited to 'lib/sasl/src/release_handler.erl')
-rw-r--r--lib/sasl/src/release_handler.erl18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl
index 931347bde2..abe6d6bee6 100644
--- a/lib/sasl/src/release_handler.erl
+++ b/lib/sasl/src/release_handler.erl
@@ -338,7 +338,7 @@ check_script(Script, LibDirs) ->
%%-----------------------------------------------------------------
%% eval_script(Script, Apps, LibDirs, NewLibs, Opts) ->
%% {ok, UnPurged} |
-%% restart_new_emulator |
+%% restart_emulator |
%% {error, Error}
%% {'EXIT', Reason}
%% If sync_nodes is present, the calling process must have called
@@ -375,7 +375,7 @@ create_RELEASES(Root, RelDir, RelFile, LibDirs) ->
%%-----------------------------------------------------------------
%% Func: upgrade_app(App, Dir) -> {ok, Unpurged}
-%% | restart_new_emulator
+%% | restart_emulator
%% | {error, Error}
%% Types:
%% App = atom()
@@ -395,7 +395,7 @@ upgrade_app(App, NewDir) ->
%%-----------------------------------------------------------------
%% Func: downgrade_app(App, Dir)
%% downgrade_app(App, Vsn, Dir) -> {ok, Unpurged}
-%% | restart_new_emulator
+%% | restart_emulator
%% | {error, Error}
%% Types:
%% App = atom()
@@ -618,11 +618,11 @@ handle_call({install_release, Vsn, ErrorAction, Opts}, From, S) ->
{reply, {ok, CurrentVsn, Descr}, NewS};
{error, Reason} ->
{reply, {error, Reason}, NS};
- {restart_new_emulator, CurrentVsn, Descr} ->
+ {restart_emulator, CurrentVsn, Descr} ->
gen_server:reply(From, {ok, CurrentVsn, Descr}),
init:reboot(),
{noreply, NS};
- {restart_new_emulator_then_continue, CurrentVsn, Descr} ->
+ {restart_new_emulator, CurrentVsn, Descr} ->
gen_server:reply(From, {continue_after_restart, CurrentVsn, Descr}),
init:reboot(),
{noreply, NS};
@@ -991,7 +991,7 @@ do_install_release(#state{start_prg = StartPrg,
prepare_restart_new_emulator(StartPrg, RootDir,
RelDir, TmpVsn, TmpRelease,
NReleases, Masters),
- {restart_new_emulator_then_continue, CurrentVsn, Descr};
+ {restart_new_emulator, CurrentVsn, Descr};
{ok, {CurrentVsn, Descr, Script}} ->
%% In case there has been an emulator upgrade,
%% remove the temporary release
@@ -1012,14 +1012,14 @@ do_install_release(#state{start_prg = StartPrg,
mon_nodes(false),
NReleases1 = set_status(Vsn, current, NReleases),
{ok, NReleases1, Unpurged, CurrentVsn, Descr};
- restart_new_emulator when Static == true ->
+ restart_emulator when Static == true ->
throw(static_emulator);
- restart_new_emulator ->
+ restart_emulator ->
mon_nodes(false),
prepare_restart_new_emulator(StartPrg, RootDir,
RelDir, Vsn, Release,
NReleases, Masters),
- {restart_new_emulator, CurrentVsn, Descr};
+ {restart_emulator, CurrentVsn, Descr};
Else ->
application_controller:config_change(EnvBefore),
mon_nodes(false),