Age | Commit message (Collapse) | Author |
|
In order to fake an earlier release to upgrade from, version numbers
are replaced in some .app files. This commit adds a backslash before
the dot in the pattern to replace, so the dot is not mistaken for a
wildcard.
|
|
The slave node from release_handler_SUITE:upgrade_supervisor_fail
sometimes survives its test case. Or rather, it is unexpectedly
restarted. Every now and then, on a slow machine, this confuses the
next test case since test_server:start_node might return the old node
name instead of the new. This has been corrected by using
{error_action,reboot} in release_handler_SUITE:upgrade_supervisor_fail
- to make sure the slave node is really terminated on rollback.
|
|
Test cases 'release_handler_which_releases' and 'upgrade_supervisor'
did not terminate the nodes they started. This might be the cause of
failing test cases further down the suite. This has been corrected.
|
|
|
|
In release_handler_SUITE, print command with ~ts instead of ~tp in
case it contains unicode characters.
|
|
Quoting on Windows is strange
|
|
|
|
|
|
Conflicts:
erts/etc/win32/Install.c
|
|
|
|
* siri/install-otp-in-unicode-path:
[sasl] Remove priv dir after release_handler_SUITE
Update preloaded init.beam
Allow unicode characters for boot and config in init:make_permanent
[sasl] Clean priv_dir after systools_SUITE
[reltool] Use unicode characters in work dir for unicode test
[sasl] Use unicode characters in priv dir name also on windows
[reltool] Write erl.ini as UTF-8
[sasl] Update tests to run under unicode path
[sasl] Rewrite release_handler_SUITE:clean_priv_dir to work on unicode paths
[sasl] Update example/target_system.erl to handle unicode
[sasl] Write erl.ini as utf8, allowing unicode path for root dir and bin dir
|
|
* siri/spawn-and-space:
[sasl] In test, quote erlsrv executable in call to open_port/2
[test_server] Quote path to erl executable when starting slave nodes
Quote path to erl executable in slave to allow space in path
[sasl] Quote path to program run with open_port({spawn,...
[os_mon] Quote path to programs run with open_port({spawn,...
Conflicts:
lib/os_mon/src/nteventlog.erl
|
|
Since introducing unicode paths, the name of the priv_dir will include
"unicode characters" and on some platforms (e.g. Windows) these are
not so easily removed by the daily cleanup scripts. To avoid lingering
directories, the priv_dir is now completly removed by the suite itself
(unless there are failed testcases and logs must be saved).
|
|
Some files with icky names (unicode) can not be deleted with the
cleanup scripts after daily tests. Therefore it is better to clean up
directly from the erlang node after test is run.
|
|
|
|
In order to test that unicode paths can be used in release handling,
the release_handler_SUITE will use a priv_dir with unicode characters
if the file name translation mode is utf8 (not on windows).
|
|
This function used os:cmd("rm -rf " ++ File), and it failed when the
file path contained characters > 255. The function now uses
file:delete/1 and file:del_dir/1 instead.
|
|
This example module can now create and install a release in a
directory which contains unicode characters. The erlang node must be
started with the +fnu* switch for this work.
|
|
|
|
This is to allow space in the path.
|
|
Tests that compare execution time for release_handler:install_release
sometimes fail. This has been corrected by multiplying the time with
the CPU utilization in order to disregard wait time for e.g. file
access and and non-erlang related load.
|
|
This test often fails dues to too high expectations. Don't expect the
test to be more than 1000 times faster with no old code - it just
doesn't happen!
|
|
|
|
|
|
release_handler_SUITE:otp_9864 deleted parts of the
release_handler_SUITE_data directory so the test suite could not be
executed twice without re-installation. This has been corrected.
|
|
|
|
This is a temporarily fix for R15B01.
|
|
remove_file in release_handler would fail silently and leave directories
in inconsistent states if there was symlinks in a release directory
also added a test, otp_9864 to test change
|
|
* siri/stdlib/dialyzer-supervisor/OTP-9741:
Add test for upgrade of supervisor
Fix dialyzer warnings in supervisor
|
|
The test is added in release_handler_SUITE since this makes it
possible to test the full upgrade instead of just a simple library
test of supervisor:code_change.
|
|
systool:make_tar stores the rel file in the releases directory. When
unpacking with release_handler:unpack_release, the file is
automatically moved to releases/<vsn>/. If, however, the tar file is
unpacked manually, the rel file might not be moved, and the next
release unpacked might overwrite the rel file. To overcome this,
systools:make_tar now stores a copy of the rel file in releases/<vsn>/
directly and it is not longer necessary to move the file after
unpacking.
The reason for keeping the file in the releases directory also is that
is needs to be extracted separately before the release version <vsn>
is known.
|
|
Changes to the mechanism for upgrading the emulator in OTP R15 was
erronously not handled in release_handler:upgrade_app, downgrade_app,
upgrade_script and downgrade_script. This has been corrected,
including test and documentation.
|
|
* siri/sasl/upgrade-erts/OTP-9438:
Fix bug in erts upgrade on windows
Add release vsn info to erts_vsn_changed warning
Check for sasl application in systools:make_script and make_relup
Add syntax check of relup to check_install_release and install_release
Add documentation for upgrade from pre R15 to post R15 sasl
Handle upgrade from pre R15 to post R15 sasl
Step version of sasl to 2.2 for R15
Document upgrade instructions restart_new_emulator and restart_emulator
Wait for two restarts in upgrade_restart test
Add restart_new_emulator instruction to kernel, stdlib and sasl appups
Distinguish restart_new_emulator from restart_emulator in upgrade instructions
Upgrade erts: merge sys.config for tmp release instead of using old
Allow regexp for version in .appup
Restart emulator before running upgrade script when erts is upgraded
Conflicts:
lib/sasl/src/release_handler.erl
lib/sasl/test/release_handler_SUITE.erl
|
|
The service which represents the temporary release during erts upgrade
on windows was never deleted. This has been corrected. The service is
now renamed just after the emulator restart.
|
|
|
|
This commit adds a check that all instructions in the relup are
valid. Earlier, the last part (after point_of_no_return) was not
checked before the actual installation started, meaning that if the
relup was hand written, there was a potential for crashing the upgrade
here.
|
|
This is an attempt to correct a failing test case. It the test fails
on having restarted only once, we give it another try to see if the
second restart will happen.
|
|
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
|
|
This is an extension to which_releases that allows a user to specify the
status of the releases they wish to be returned. For instance it allows
for quickly determining which release is 'permanent' without the need of
parsing the entire release list.
|
|
* jw/release_handler_1:
General improvements to release_handler_1:get_supervised_procs
Conflicts:
lib/sasl/src/release_handler_1.erl
lib/sasl/test/release_handler_SUITE.erl
OTP-9546
|
|
The core issues this patch attempts to solve is two fold, 1) have
release_handler_1 act slightly differently in two corner cases and 2)
clean up the code in get_supervised_procs/0 to remove nested cases and
etc.
Regarding #1, get_supervised_procs/0 will now call functions to
test to see if the supervisor is suspended before attempting to ask it
for a list of children. It now will print an error message regarding
the suspended supervisor and produce an error that will cause the VM
to restart. Previously it would timeout attempting the call to
which_children and the VM would restart without any details regarding
the reason.
The second corner case is if in a child specification a supervisor is
incorrectly stated to be a worker and get_modules is called against it.
A timeout will occur causing a VM restart. Similar to the last corner
case in this patch an error message is printed and an error is emitted
causing a VM restart.
When first looking into the issue it was hard to discover why my
upgrades where failing. All I received during the upgrade process was
a timeout and a VM restart, no other information. This patch should
help users track down issues like these.
Regarding #2, due to the above confusion in trying to figure out what
had happened I dug into the code and started tracing it through and
found that the nested case statements and etc made it confusing. So I
started to rework and clean up, hopefully making this code path clearer
to future readers.
|
|
Given this option, all modules that are to be purged by indicated
upgrade,and that can be soft purged, will be purged when all other
check of check_install_release have been successfully completed.
I added a note under install_release in the reference manual about how
to use check_install_release with this new option in order to speed up
the execution of install_release.
I also added three more test cases for this functionality.
|
|
This commit utilizes the new bif erlang:check_old_code/1 to check if a
module has old code in the system or not before running
erlang:check_process_code/2. This is to optimize
release_handler:install_release (and
release_handler:check_install_release).
A new test is added which checks that after traversing all
processes/modules once and purging all old code, the second run
through this part of the code is "sufficiently" much faster.
A note is also added in the reference manual for
release_handler:install_release about how to go around the efficiency
problem of this function.
|
|
The appup instruction 'delete_module' would cause a crash during
upgrade if the module to be deleted was not loaded. The reason was
that the release_handler tried to read the version number of the old
module after the code path had changed to point to the new version of
the application. Thus, if the module had not been loaded before the
upgrade, there would no longer be any such module in the path
(delete_module indicates that the module is deleted from the new
version of the application).
This is corrected by letting the release_handler read the old version
of the module only if the module is updated - not if it is
removed. And it is always read before the code path is changed.
|
|
If a new version of an application did not include any erlang module
changes, the code path of the application was not updasted unless a
'load_object_code' instruction was added for the application. This
would be a problem if e.g. only some files in the priv dir were
changed, since calls to code:lib_dir or code:priv_dir would then point
to the old location of the application. This has been corrected - now
code:replace_path/2 will be called for all applications that are
changed (i.e. when the application's vsn is changed in the .rel file).
|
|
The service will automatically use the start_erl.exe from the same
directory as erlsrv.exe, and heart will use $PATH, which will
always have the erts bin dir first. The reason is to avoid using old
executables after upgrading erts via the release_handler.
|
|
This commit adds test cases from release_handler_SUITE on windows,
including some corrections in erlsrv and release_handler.
|
|
|