aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/release_handler_SUITE.erl
AgeCommit message (Collapse)Author
2014-04-09Don't allow slave nodes to survive their test caseSiri Hansen
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.
2014-04-03Stop nodes after test cases in release_handler_SUITESiri Hansen
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.
2014-04-03Add debug printouts in release_handler_SUITE:upgrade_ggSiri Hansen
2014-04-03Improve printout of command when encoding is utf-8Siri Hansen
In release_handler_SUITE, print command with ~ts instead of ~tp in case it contains unicode characters.
2014-02-12sasl: Fix testcase which didn't work on windowsDan Gudmundsson
Quoting on Windows is strange
2014-01-21sasl test: Quote executable paths (can contain spaces)Dan Gudmundsson
2013-12-17[sasl] Fix error printout in release_handler_SUITE to handle unicode pathSiri Hansen
2013-11-29Merge branch 'maint'Dan Gudmundsson
Conflicts: erts/etc/win32/Install.c
2013-10-03sasl: Add no_dot_erlang documentation and testsDan Gudmundsson
2013-06-05Merge branch 'siri/install-otp-in-unicode-path'Siri Hansen
* 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
2013-06-05Merge branch 'siri/spawn-and-space'Siri Hansen
* 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
2013-06-03[sasl] Remove priv dir after release_handler_SUITESiri Hansen
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).
2013-05-21[sasl] Clean priv_dir after systools_SUITESiri Hansen
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.
2013-05-14[sasl] Use unicode characters in priv dir name also on windowsSiri Hansen
2013-05-14[sasl] Update tests to run under unicode pathSiri Hansen
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).
2013-05-14[sasl] Rewrite release_handler_SUITE:clean_priv_dir to work on unicode pathsSiri Hansen
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.
2013-05-14[sasl] Update example/target_system.erl to handle unicodeSiri Hansen
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.
2013-04-19[sasl] Remove compiler warning in release_handler_SUITESiri Hansen
2013-04-03[sasl] Quote path to program run with open_port({spawn,...Siri Hansen
This is to allow space in the path.
2013-03-14[sasl] Fix tests that compare execution timeSiri Hansen
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.
2013-01-25Fix release_handler_SUITE:otp_9395_check_old_codeSiri Hansen
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!
2012-10-03Fix release_handler:find_script so it can read regexp in appupsSiri Hansen
2012-09-11Skip release_handler test related to symlinks on windowsSiri Hansen
2012-09-10Make sure release_handler_SUITE does not mess up sasl test directorySiri Hansen
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.
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-28Moved test case to avoid a conflict between test cases.Gustav Simonsson
This is a temporarily fix for R15B01.
2012-01-18Fix so remove_release can remove symlinksGustav Simonsson
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
2011-11-30Merge branch 'siri/stdlib/dialyzer-supervisor/OTP-9741'Siri Hansen
* siri/stdlib/dialyzer-supervisor/OTP-9741: Add test for upgrade of supervisor Fix dialyzer warnings in supervisor
2011-11-29Add test for upgrade of supervisorSiri Hansen
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.
2011-11-28Add copy of rel file in releases/<vsn> in release tar fileSiri Hansen
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.
2011-11-23Fix release_handler:upgrade_app and downgrade_app when upgrading emulatorSiri Hansen
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.
2011-11-18Merge branch 'siri/sasl/upgrade-erts/OTP-9438'Siri Hansen
* 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
2011-11-17Fix bug in erts upgrade on windowsSiri Hansen
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.
2011-11-17Add release vsn info to erts_vsn_changed warningSiri Hansen
2011-11-17Add syntax check of relup to check_install_release and install_releaseSiri Hansen
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.
2011-11-17Wait for two restarts in upgrade_restart testSiri Hansen
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.
2011-11-17Restart emulator before running upgrade script when erts is upgradedSiri Hansen
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
2011-10-20Add release_handler:which_releases/1joewilliams
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.
2011-09-20Merge branch 'jw/release_handler_1' into devHenrik Nord
* 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
2011-09-06General improvements to release_handler_1:get_supervised_procsjoewilliams
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.
2011-09-02Add option purge to release_handler:check_install_releaseSiri Hansen
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.
2011-08-30Improve performance of upgrade when many processes have old codeSiri Hansen
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.
2011-07-07Allow appup instruction delete_module module which is not loadedSiri Hansen
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.
2011-07-04Update code path for all applications that have new versions in a releaseSiri Hansen
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).
2011-06-15Remove path to erts bin dir from erlsrv argumentsSiri Hansen
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.
2011-06-15Make release_handler work with windows servicesSiri Hansen
This commit adds test cases from release_handler_SUITE on windows, including some corrections in erlsrv and release_handler.
2011-05-17Add SASL test suiteSiri Hansen