aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl
AgeCommit message (Collapse)Author
2011-10-04Prepare releaseOTP_R14B04Erlang/OTP
2011-09-29Update copyright yearsBjörn-Egil Dahlberg
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-08systools: add warnings_as_errors optionTuncer Ayaz
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-05Fix bug in systools:make_tar when path given as just 'ebin'Siri Hansen
If a path was given as ONLY 'ebin' and not for example './ebin', then systools:make_tar would fail with a function_clause exception in filename:join/1. The bug was in systools_make:appDir/1, which tried to find the parent directory of the given path. This function now uses library functions filename:basename and filename:dirname instead of general list manipulations.
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-08-24Merge branch 'hw/update-chmod-without-f' into devHenrik Nord
* hw/update-chmod-without-f: Again: Call chmod without the "-f" flag OTP-9491
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-21Remove compiler warning for using deprecated module rexexpSiri Hansen
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-06-05Again: Call chmod without the "-f" flagHolger Weiß
Commit 7ed11a886fc8fcaf3c2b8324294e2f24e02b0f28 removed the "-f" flag from chmod calls in Makefiles: | "-f" is a non-standard chmod option which at least SGI IRIX and HP UX | do not support. As the only effect of the "-f" flag is to suppress | warning messages, it can be safely omitted. Meanwhile, new "chmod -f" calls have been added. This commit removes the "-f" flag from those new calls.
2011-05-24Prepare releaseOTP_R14B03Erlang/OTP
2011-05-20Update copyright yearsBjörn-Egil Dahlberg
2011-05-17Add SASL test suiteSiri Hansen
2011-05-17Merge branch 'siri/sasl/rb-bugs/OTP-9149' into devSiri Hansen
* siri/sasl/rb-bugs/OTP-9149: Bugfix in rb:filter when using 're' (regexp) and 'no' Don't attempt to do supervisor:delete_child for temporary child Never fail when stopping rb, and fix file descriptor leak
2011-05-16OTP-9094: [httpc] Add support for upload body streaming (PUT and POST).Micael Karlberg
Filipe David Manana OTP-9114: [ftp] Added (type) spec for all exported functions. OTP-9123: mod_esi:deliver/2 made to accept binary data. Bernard Duggan OTP-9124: [httpd] Prevent XSS in error pages. Michael Santos OTP-9131: [httpd] Wrong security property names used in documentation. Garrett Smith OTP-9157: [httpd] Improved error messages. Ricardo Catalinas Jim�nez OTP-9158: [httpd] Fix timeout message generated by mod_esi. Bernard Duggan OTP-9202: [httpd] Extended support for file descriptors. Attila Rajmund Nohl OTP-9230: The default ssl kind has now been changed to essl. OTP-9246: [httpc] httpc manager crash because of a handler retry race condition. Merge branch 'bmk/inets/inet56_integration' into dev
2011-05-13Bugfix in rb:filter when using 're' (regexp) and 'no'Siri Hansen
There was an inconsistency in the filter function, as filter([{Key,Regexp,re,no}]) did not work in the same way as filter([{Key,Value,no}]) The first filter only returned 'proplist' reports, while the second returned *all* reports that didn't match the Value. This has been corrected so both filters now return all reports that don't match.
2011-05-12Don't attempt to do supervisor:delete_child for temporary childSiri Hansen
After a bug fix supervisor does no longer save childspecs for temporary children. Due to this, all calls to supervisor:delete_child will fail for temporary children. rb:stop is therefore now rewritten to only do supervisor:terminate_child.
2011-05-12Never fail when stopping rb, and fix file descriptor leakSiri Hansen
rb:stop did sometimes return {error,running}. This came from supervisor:delete_child and happened when the rb_server has not yet terminated when this function was called. Instead of having a separate gen_server call to rb_server for stopping the process, supervisor:terminate_child is now called. This is a synchronous function - i.e. it waits for the process to actually terminate before it returns. A file descriptor leak in rb:scan_files is corrected. The index file was never closed after reading.
2011-05-03Fail sasl startup if some, but not all, environment variables related to ↵Siri Hansen
log_mf_h are given The sasl application starts and adds log_mf_h handler if all three environment variables are given and valid. If any of the variables are invalid, sasl startup will crash. Earlier, if one or two of the variables were missing sasl would successfully start but silently skip adding log_mf_h. This commit changes this behaviour so that sasl startup will crash if some variables are given and some are not.
2011-04-12Merge branch 'dev' into bmk/inets/inet56_integrationMicael Karlberg
2011-04-11Merge branch 'siri/sasl/rb-help-error/OTP-9166' into devSiri Hansen
* siri/sasl/rb-help-error/OTP-9166: rb help error
2011-04-06Merge branch 'dev' into bmk/inets/inet56_integrationMicael Karlberg
2011-03-30Change default behaviour to not check src code when creating releaseSiri Hansen
Add new option <c>src_tests</c> to systools:make_script and systools:make_tar. The old option <c>no_module_tests</c> is now ignored as this is the default behaviour.
2011-03-30rb help errorSiri Hansen
Start and end date for rb:filter/2 was specified as {{Y-M-D},...} in the help text instead of {{Y,M,D},...}. This has been corrected.
2011-03-25Merge branch 'sg/fix-diskless-booted-relup' into devSiri Hansen
* sg/fix-diskless-booted-relup: Remove traces of release_handler reading from filesystem when it has Masters list OTP-9142
2011-03-21Remove traces of release_handler reading from filesystem when it has Masters ↵Steven Gravell
list There are a couple of places in release_handler and release_handler_1 that assumed it has a disk to read from, which in the case of an erl_prim_loader Loader other than efile is not necessarily true Add check_paths/2 to do the equivalent of check_path/1 for when there is a Masters list Change get_vsn to no longer get sent File paths but instead use the Bin since beam_lib:version being sent a file path causes it to read the local file system Add get_current_vsn/1 as an equivalent to beam_lib:version(code:which(Mod)), but using erl_prim_loader:get_file instead of reading from local file system
2011-03-17Merge branch 'dev' into ↵Micael Karlberg
bmk/inets/ftp/missing_spec_causes_dialyxer_problems/OTP-9114 Also fixed a bunch of "end-years" (was 2010 but should have been 2011, which the commit hook not happy with).
2011-03-14Prepare releaseOTP_R14B02Erlang/OTP
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-02-25Honor start type in .rel files when building relup filesPaul Guyot
Previously, relup file always included an application:start(Application, permanent) apply instruction for every application that appear in the UpTo/DowFrom release file, whatever their start type in the release file. The new implementation fixes this bug by honoring the start type according to the rel(5) format. If the start type is none, no apply line is included in the relup. If the start type is load, the relup includes instruction to only load the application. Otherwise, the relup includes an instruction to start the application to the according type. The fix is implemented by adding a new parameter to the add_application high level appup instruction. This new parameter is documented in appup(5).
2010-05-06Merge branch 'sv/sasl-fix-get_status' into devErlang/OTP
* sv/sasl-fix-get_status: Prepare patch release fix sys:get_status backward compatibility for sasl release_handler_1 OTP-8619 sv/sasl-fix-get_status In R13B04 sys:get_status was modified to invoke format_status/2 in the callback module if the module exports that function. This resulted in a change to the term returned from calling sys:get_status on the supervisor module, since supervisor is a gen_server and gen_server exports format_status. The sasl release_handler_1 module had a dependency on the pre-R13B04 term returned by sys:get_status when invoked on a supervisor, so the R13B04 change broke that dependency. This problem has been fixed by change release_handler_1 to handle both the pre-R13B04 and R13B04 terms that sys:get_status can return from a supervisor.
2010-05-05Prepare patch releaseBjörn Gustavsson
2010-05-05fix sys:get_status backward compatibility for sasl release_handler_1Steve Vinoski
In R13B04 sys:get_status was modified to invoke format_status/2 in the callback module if the module exports that function. This resulted in a change to the term returned from calling sys:get_status on the supervisor module, since supervisor is a gen_server and gen_server exports format_status. The sasl release_handler_1 module had a dependency on the pre-R13B04 term returned by sys:get_status when invoked on a supervisor, so the R13B04 change broke that dependency. Change release_handler_1 to handle both the pre-R13B04 and R13B04 terms that sys:get_status can return from a supervisor.
2010-03-10Merge branch 'bg/sasl-infinity' into devErlang/OTP
* bg/sasl-infinity: Prepare patch release sasl: Use gen_server:call/3 with infinity timeout OTP-8506 bg/sasl-infinity Use an infinity timeout in all calls to gen_server:call() in the sasl application.
2010-03-08Prepare patch releaseBjörn Gustavsson
2010-03-08sasl: Use gen_server:call/3 with infinity timeoutBjörn Gustavsson
gen_server:call/2,3 now sets up a monitor to make sure that it will be noticed if the called process dies. Therefore, there is almost never a good reason to use gen_server:call/2 with its default 5 seconds timeout. Use gen_server:call/3 with the 'infinity' timeout instead. To make sure we use the 'infinity' timeout every time, wrap the to call gen_server:call/3 in a local call/1 function in each module.
2010-02-19Update release notesBjörn-Egil Dahlberg
2010-02-17Update version numbersBjörn Gustavsson
2010-02-17Merge branch 'ks/cleanups' into ccase/r13b04_devErlang/OTP
* ks/cleanups: percept: Clean up as suggested by tidier percept: Modernize types and specs parsetools: Don't use 'try...of' when 'try' will do parsetools: Use %% for comments at the beginning of a line parsetools: Replace lists:keysearch/3 with lists:keyfind/3 parsetools: Modernize types and specs parsetools: Replace TABs with spaces runtime_tools: Modernize specs sasl: Eliminate tuple used as fun sasl: Add missing modules to app file asn1: Clean up as suggested by tidier os_mon: Modernize types and specs wx: Clean up as suggested by tidier OTP-8455 ks/cleanups
2010-02-16sasl: Eliminate tuple used as funKostis Sagonas
2010-02-16sasl: Add missing modules to app fileKostis Sagonas
2010-02-16Merge branch 'jn/sasl-format_report' into ccase/r13b04_devErlang/OTP
* jn/sasl-format_report: Added sasl_report:format_report/3 to return a string rather than send an io OTP-8445 There is new function sasl_report:format_report/3 that works like the existing sasl_report:write_report/3 function except that it returns a formatted string. Note that there is currently no documentation for the sasl_report module. (Thanks to Jay Nelson.)
2010-02-16Merge branch 'va/rb-improvements' into ccase/r13b04_devErlang/OTP
* va/rb-improvements: New rb:filter/2 to filter reports by date New rb:filter/1 function to ease report filtering Modify rb:grep/1 to grep reports using the re module Fix minor typo in read_report/1 OTP-8443 The re:grep/1 function now uses the 're' module instead of the deprecated 'regexp' module. There are new functions rb:filter/1 and rb:filter/2 for easier filtering of reports. (Thanks to Alvaro Videla.)
2010-02-14Added sasl_report:format_report/3 to return a string rather than send an ioJay Nelson
sasl_report:write_report/3 calls io:format to output the report message, but does not provide an option to generate a formatted string rather than sending the message. sasl_report:format_report/3 is added to allow the replacement of sasl_report with a different handler but still generate reports in the same format. It returns the string generated by io_lib:format. sasl_report:write_report/3 retains its original behavior. This patch was submitted in 2008 (see http://www.erlang.org/cgi-bin/ezmlm-cgi/4/35061) but was never incorporated into the source.
2010-02-14New rb:filter/2 to filter reports by dateAlvaro Videla
The function filter/2 expects a second parameter Dates that can be used to return reports that occurred between the provided dates. Usage: Dec22 = {{2009,12,22},{0,0,0}}. Dec24 = {{2009,12,24},{0,0,0}}. rb:filter(Filters, {Dec22, from}). %will return reports that occurred from Dec22. rb:filter(Filters, {Dec22, to}). %will return reports that occurred before Dec22. rb:filter(Filters, {Dec22, Dec24}). %will return reports that occurred between Dec22 % and Dec24