Files | Admin

Notes:

Release Name: 1.0.1

Notes:
Unicorn is an HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels.  Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between Unicorn and slow clients.

* http://unicorn.bogomips.org/
* mongrel-unicorn@rubyforge.org
* git://git.bogomips.org/unicorn.git

Changes:

The first maintenance release of 1.0.x, this release is
primarily to fix a long-standing bug where the original PID file
is not restored when rolling back from a USR2 upgrade.
Presumably most upgrades aren't rolled back, so it took over a
year to notice this issue.  Thanks to Lawrence Pit for
discovering and reporting this issue.

There is also a pedantic TeeInput bugfix which shouldn't affect
real apps from the 1.1.x series and a test case fix for OSX,
too.



Changes: GIT-VERSION-GEN | 2 +- lib/unicorn.rb | 5 ++ lib/unicorn/const.rb | 4 +- lib/unicorn/launcher.rb | 6 +-- lib/unicorn/tee_input.rb | 7 ++- t/pid.ru | 3 + t/t0008-back_out_of_upgrade.sh | 110 ++++++++++++++++++++++++++++++++++++++++ test/exec/test_exec.rb | 29 ++++++---- 8 files changed, 143 insertions(+), 23 deletions(-) commit a965c0bb48d5b92373f939865212641d810c97d7 Author: Eric Wong Date: Tue Jul 13 12:54:26 2010 -0700 unicorn 1.0.1 - bugfixes only The first maintenance release of 1.0.x, this release is primarily to fix a long-standing bug where the original PID file is not restored when rolling back from a USR2 upgrade. Presumably most upgrades aren't rolled back, so it took over a year to notice this issue. Thanks to Lawrence Pit for discovering and reporting this issue. There is also a pedantic TeeInput bugfix which shouldn't affect real apps from the 1.1.x series and a test case fix for OSX, too. commit 2a8c4bea2c39d0a551feb79cb471171cf96a55db Author: Eric Wong Date: Tue Jul 13 08:57:37 2010 +0000 SIGHUP deals w/ dual master pid path scenario As described in our SIGNALS documentation, sending SIGHUP to the old master (to respawn SIGWINCH-ed children) while the new master (spawned from SIGUSR2) is active is useful for backing out of an upgrade before sending SIGQUIT to the new master. Unfortunately, the SIGHUP signal to the old master will cause the ".oldbin" pid file to be reset to the non-".oldbin" version and thus attempt to clobber the pid file in use by the to-be-terminated new master process. Thanks to the previous commit to prevent redaemonization in the new master, the old master can reliably detect if the new master is active while it is reloading the config file. Thanks to Lawrence Pit for discovering this bug. ref: http://mid.gmane.org/4C3BEACF.7040301@gmail.com (cherry picked from commit c13bec3449396b21795966101367838161612d61) commit ae1f5e2d331d1714dd1b71d4905b296abf7780d0 Author: Eric Wong Date: Tue Jul 13 08:53:48 2010 +0000 launcher: do not re-daemonize when USR2 upgrading This was accidentally enabled when ready_pipe was developed. While re-daemonizing appears harmless in most cases this makes detecting backed-out upgrades from the original master process impossible. (cherry picked from commit 3f0f9d6d72cf17b34c130b86eb933bbc513b24b3) commit aad1fdfc17e2fe1a6308690daf74456877796f51 Author: Eric Wong Date: Thu Jul 8 05:45:22 2010 +0000 tee_input: safer record separator ($/) handling Different threads may change $/ during execution, so cache it at function entry to a local variable for safety. $/ may also be of a non-binary encoding, so rely on Rack::Utils.bytesize to portably capture the correct size. Our string slicing is always safe from 1.9 encoding: both our socket and backing temporary file are opened in binary mode, so we'll always be dealing with binary strings in this class (in accordance to the Rack spec). (cherry picked from commit 1cd698f8c7938b1f19e9ba091708cb4515187939) commit 00e04ecc9fda39fa77e2f7fd11834ea977ba9ee8 Author: Eric Wong Date: Fri Jun 25 11:29:13 2010 -0700 test-exec: prefer ENV['PWD'] in working_directory tests We do an extra check in the application dispatch to ensure ENV['PWD'] is set correctly to match Dir.pwd (even if the string path is different) as this is required for Capistrano deployments. These tests should now pass under OSX where /var is apparently a symlink to /private/var.