diff options
author | Siri Hansen <[email protected]> | 2011-09-08 10:14:10 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2011-11-17 16:47:27 +0100 |
commit | 19a46c5c9f4ed3f0f2bfb149fc1feb0b93d55379 (patch) | |
tree | 723e9e36d1e1078b244cc5698b7a8c54c8222c88 /lib/configure.in.src | |
parent | 5dc64cffb084e8abc6e5908025833481331f38de (diff) | |
download | otp-19a46c5c9f4ed3f0f2bfb149fc1feb0b93d55379.tar.gz otp-19a46c5c9f4ed3f0f2bfb149fc1feb0b93d55379.tar.bz2 otp-19a46c5c9f4ed3f0f2bfb149fc1feb0b93d55379.zip |
Restart emulator before running upgrade script when erts is upgraded
If the version of erts differs between two releases, the release
handler automatically adds a 'restart_new_emulator' instruction to the
upgrade script (relup). Earlier, this instruction was always added at
the end of the upgrade script, causing the following sequence of
operations during an upgrade (a bit simplified):
1. suspend processes
2. load new code
3. execute code_change functions
4. resume processes
5. restart emulator with new erts version
Obviously, this caused the new code to be loaded into the old emulator
and this would fail if the beam format had been changed in the new
version of the emulator.
To overcome this problem, this commit changes the order of the
instructions, so for upgrade with changed erts version we now have:
1. restart emulator with new erts, kernel, stdlib and sasl versions,
but old versions of all other applications.
2. suspend processes
3. load new code
4. execute code_change functions
5. resume processes
This is implemented by creating a temporary release, including new
erts, kernel, stdlib and sasl from the new release and all other
applications from the old release. A new boot file for this temporary
release is created, which includes a new 'apply' instruction to run
release_handler:new_emulator_upgrade/2. Then the emulator is restarted
using this boot file - and release_handler:new_emulator_upgrade/2
executes the rest of the upgrade script.
For downgrade, the order will be as before:
1. suspend processes
2. execute code_change functions with 'down'-indication
3. load old code
4. resume processes
5. restart emulator with old erts version
Diffstat (limited to 'lib/configure.in.src')
0 files changed, 0 insertions, 0 deletions