about summary refs log tree commit homepage
DateCommit message (Collapse)
2015-01-14linux_inet_diag: fix Wshorten-64-to-32 warnings
POSIX and glibc 2.2+ declare the hostlen and servlen args of getnameinfo(3) to be socklen_t, not size_t, so favor socklen_t for those calculations. While we're at it, nlmsg_len is u32, too, so cast it as such to avoid the warning. Tested on clang version 3.5-1ubuntu1 on x86-64
2015-01-14TODO: add item for unix_diag and udp_diag
These features are found in newer kernels.
2015-01-14linux_inet_diag: clarify *fprintf usage without GVL
A reviewer may wonder why fprintf is chosen instead of rb_warn, so make it clear we're outside of the GVL when spewing the warning message and cannot use most rb_* functions.
2015-01-13move mailing list to raindrops-public@bogomips.org
Existing subscribers on librelist will need to resubscribe since there's no published subscriber lists anywhere. The public-inbox + mlmmj setup on bogomips.org allows posting without subscription and offers downloadable archives via git. The lack of rsyncable archives on librelist nowadays and subscription-required nature of librelist are points against it. Repliers should Cc: all recipients (using the reply-all function of their mail client) since many readers are not subscribed. This project has never accepted or encouraged HTML email, but librelist accepted it. The bogomips.org mail server is configured to treat HTML mail as spam, so do not send HTML mail if you expect a response. Users who wish to subscribe may send a message to: raindrops-public+subscribe@bogomips.org Similarly, they may unsubscribe via: raindrops-public+unsubscribe@bogomips.org HTTP archives are available via: http://bogomips.org/raindrops-public/ ssoma users may also use: git://bogomips.org/raindrops-public (see README change) Old messages to the librelist addresses will continue to get routed to the new mailing list. ref: http://public-inbox.org/
2015-01-13modernize packaging and documentation
By switching to olddoc! wrongdoc was difficult to maintain due to FFI, and olddoc is more complete anyways (no images or CSS, not just JavaScript removal). While we're at it, use the SPDX-recommended license abbreviation ("LGPL-2.1+") and specify a test-unit dependency. ref: http://80x24.org/olddoc/
2015-01-13README: trim intro and update license
No need to mention Rainbows! anymore since it is stagnant, and I've given up on Rubinius support since it requires a proprietary bug tracker. We went with LGPL-2.1+ in commit 09fb7ccc3f1712411c61cbf54766c3c12c8296b2 but forgot to update the README.
2014-11-14Add setup and teardown for ipv6 tests
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2014-09-07linux_inet_diag: annotate memory freeing on diag errors
Clarify the code so memory leak alarms in reviewers eyes do not go off.
2014-02-18raindrops 0.13.0 several minor fixes and improvements v0.13.0
Most notably, this release is necessary for Ruby 2.2 (dev). Thanks to Koichi Sasada for the bug report! Eric Wong (5): Rakefile: remove raa_update task last_data_recv: do not assume Unicorn includes all constants raindrops.gemspec: add wrongdoc dev dependency linux_inet_diag: fix Ruby 2.2 (dev) build license: use LGPLv2.1 or later (was LGPL (2.1|3.0)-only) Hleb Valoshka (1): Remove Scope IDs from IPv6 addresses.
2014-02-18license: use LGPLv2.1 or later (was LGPL (2.1|3.0)-only)
There is currently no LGPLv4, so this change has no effect at the moment. In case the LGPLv4 arrives and I am not alive to approve/review it, the lesser of evils is have give blanket approval of all future LGPL versions (as published by the FSF). The worse evil is to be stuck with a license which cannot guarantee the Free-ness of this project in the future. This unfortunately means the FSF can theoretically come out with license terms I do not agree with, but the LGPLv2.1 and LGPLv3 will always remain an option to all users.
2014-02-18linux_inet_diag: fix Ruby 2.2 (dev) build
Do not define or use rb_thread_blocking_region if rb_thread_io_blocking_region is available. rb_thread_blocking_region is gone entirely in Ruby trunk.
2014-02-18raindrops.gemspec: add wrongdoc dev dependency
Ugh, I really need to work on an 80x24-friendly rdoc :P
2013-11-05last_data_recv: do not assume Unicorn includes all constants
Some projects may load parts of Unicorn and not others.
2013-11-05Rakefile: remove raa_update task
RAA is dead
2013-09-13Remove Scope IDs from IPv6 addresses.
Scoped ipv6 addresses are defined in rfc4007. Ruby doesn't support them yet and it's unknown whether it will (see http://bugs.ruby-lang.org/issues/8464). So we just remove scope ids. Tested with MRI and Rubinius.
2013-09-02raindrops 0.12.0 - compatibility fixes v0.12.0
This release fixes builds on systems where compilers target i386 (and not later x86 systems). There are also minor improvements for Ruby 2.1.0dev and Rubinius. Eric Wong (5): doc: add email address to generated doc/site README: update regarding Ruby support status extconf: try harder for gcc atomics in i386-configured systems linux_inet_diag: improve compatibility with newer GCs test_watcher: fix for Ruby trunk r40195 and later
2013-09-02test_watcher: fix for Ruby trunk r40195 and later
assert_raises doesn't capture exceptions the same way rescue works.
2013-08-31linux_inet_diag: improve compatibility with newer GCs
RARRAY_PTR is expensive with GCs in Ruby 2.1.0dev and Rubinius, so use rb_ary_entry for non-performance critical paths. Eventually, RARRAY_AREF/RARRAY_ASET may be common, but for now, using rb_ary_entry should require the least cognitive overhead for a developer.
2013-08-28extconf: try harder for gcc atomics in i386-configured systems
__sync_lock_test_and_set might not be the correct check after all, but __sync_val_compare_and_swap probably is. At least this is what Ruby 2.0.0 uses to check and attempt -march=i486 on.
2013-04-20README: update regarding Ruby support status
Now that Ruby 2.0.0 is out...
2013-04-20doc: add email address to generated doc/site
2013-04-20raindrops 0.11.0 - minor fixes improvements v0.11.0
Eric Wong (7): raindrops: favor configured processor count over online count watcher: set Content-Type via assignment Linux::TCP_Info: implement #get! instance method linux_inet_diag: avoid unnecessary sockaddr initialization .gitignore: add .rbx switch back to gemspec development dependencies linux_inet_diag: better align listener_stats struct Lawrence Pit (1): Watcher: Use relative paths in HTML links
2013-04-20linux_inet_diag: better align listener_stats struct
Using an extra 4 bytes for the listener_stats should not significantly increase space usage, and it has the side benefit of making our code slightly smaller. $ ~/linux/scripts/bloat-o-meter before.so after.so add/remove: 0/0 grow/shrink: 1/2 up/down: 14/-32 (-18) function old new delta tcp_stats 392 406 +14 st_to_hash 195 187 -8 diag 763 739 -24
2013-04-13switch back to gemspec development dependencies
This is more standardized than bundler for gem development.
2013-04-13.gitignore: add .rbx
Rubinius drops a .rbx directory on us nowadays
2013-04-11linux_inet_diag: avoid unnecessary sockaddr initialization
This initialization was unnecessary and avoids the following warning with -Wmissing-braces on gcc 4.7.2-5 on Debian testing: linux_inet_diag.c: In function ‘stats_for’: linux_inet_diag.c:192:8: warning: missing braces around initializer [-Wmissing-braces] linux_inet_diag.c:192:8: warning: (near initialization for ‘sa.ss’) [-Wmissing-braces]
2013-04-11Linux::TCP_Info: implement #get! instance method
This allows reusing existing Linux::TCP_Info objects to avoid generating garbage.
2013-04-11watcher: set Content-Type via assignment
Relying on String#replace to set Content-Type stopped working with rack commit 3623d04526b953a63bfb3e72de2d6920a042563f This fixes compatibility with the Rack 1.5.x series.
2013-04-11raindrops: favor configured processor count over online count
The runnable CPUs of a process may change over the lifetime of the process. So favor the count of configured processor count since that is more likely to be stable. We do not currently do not have special handling for hot-plugging/removal of CPUs on systems that may load raindrops in a single CPU state.
2012-11-30Watcher: Use relative paths in HTML links
When I mount Raindrops::Watcher like so: map "/_raindrops" do run Raindrops::Watcher.new end Then in the HTML output links use an absolute path instead of relative to the path /_raindrops/ Cheers, Lawrence Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-06-19raindrops 0.10.0 - minor feature updates v0.10.0
Improvements to the Unix domain socket handling and small bugfixes throughout. Support for the "unix_diag" facility in Linux 3.3+ is planned but not yet implemented (patches to raindrops@librelist.org appreciated) Brian Corrigan (1): resolve symlinks to Unix domain sockets Eric Wong (6): unix_listener_stats follows and remembers symlinks middleware/proxy: favor __send__ for method dispatch unix: show zero-value stats for idle listeners test_watcher: fix incorrect request/date comparison watcher: sort index of listener listing watcher: do not require Rack::Head for HEAD response See "git log v0.9.0..v0.10.0" for full details
2012-06-18watcher: do not require Rack::Head for HEAD response
Rack webservers are not guaranteed to include Rack::Head in the middleware stack. Watcher is a standalone app, so it cannot rely on a framework which automatically includes Rack::Head.
2012-06-18watcher: sort index of listener listing
For hosts with many listeners, it should be easier to read the index page if the results are shown in a consistent order. Requested privately via email to raindrops@bogomips.org
2012-06-18test_watcher: fix incorrect request/date comparison
It makes no sense to compare peak times of different queues (active vs queued) against each other.
2012-06-12unix: show zero-value stats for idle listeners
When unix_listener_stats is called without arguments, it should still match the behavior of tcp_listener_stats and return ListenerStats object with zero values. This allows callers to iterate through the results to find the pathnames of all the Unix domain sockets in in listen mode.
2012-06-07middleware/proxy: favor __send__ for method dispatch
"send" is more likely to be overridden in subclasses whereas the Ruby runtime (at least 1.9.3) will warn loudly if any user code (re)defines the "__send__" method. For example, BasicSocket#send and UDPSocket#send in the Ruby stdlib are wrappers for the send(2)/sendto(2) system calls, and it's entirely possible an application could return a Socket-subclass as a Rack response body.
2012-06-05unix_listener_stats follows and remembers symlinks
Teach unix_listener_stats to remember the symlink path it followed and have it point to the same object as the resolved (real) socket path. This allows the case where looking up stats by symlinks works if the symlink is given to unix_listener_stats: File.symlink("/real/path/of.sock", "/path/to/link.sock") stats = unix_listener_stats(["/path/to/link.sock"]) stats["/path/to/link.sock"] => # same as stats["/real/path/of.sock"]
2012-06-05resolve symlinks to Unix domain sockets
Raindrops currently fails when provided a symlink to a socket. As this is a common practice for many deployment tools (Vlad, etc.) this patch adds support for finding the realpath prior to looking the socket up in /proc/net/unix [ew: commit message subject] [ew: fixed test to pass under 1.9.3 and 1.8.7: * Tempfile#unlink is unsafe to call if we want to reuse the path, use File.unlink(tmp.path) instead * The return value of File.symlink is zero (or it raises), so it's unusable. * File.symlink will not call #to_path under 1.8.7, so it's necessary to pass pathnames to it, not Tempfile objects. ] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-21raindrops 0.9.0 - minor middleware/proxy update v0.9.0
Raindrops::Middleware::Proxy now forwards method_missing to the proxied body object. This allows compatibility with non-standard Rack extensions employed by some middlewares, applications, or servers. Thanks to Ben Somers for the feature!
2012-05-21middleware/proxy: fixup comment/whitespace
Noted, but not fixed in the previous commit commit abc6dd47ede5b96ada1ff8f37dfba73cd5fd586a (Add method_missing to Raindrops::Middleware::Proxy)
2012-05-18Add method_missing to Raindrops::Middleware::Proxy
This enables it to behave more like a Rack BodyProxy would, delegating methods to its body object when it does not implement them itself. (Also includes a minor grammar fix to a comment.) [ew: minor comment/whitespace fix] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-12raindrops 0.8.1 - compatibility fixes v0.8.1
This release fixes a build problem found under a current SmartOS. This release also runs successfully on FreeBSD 9.0 under both x86-64 and i386. There are also documentation updates from Aman Gupta and a test suite fix from Jeremy Evans for OpenBSD. raindrops fully supports unicorn on recent versions of FreeBSD, OpenBSD, SmartOS, and possibly other Free Software systems. Portability reports and fixes for Free Software systems is greatly appreciated at raindrops@librelist.org Non-Free systems will never be supported. raindrops requires the Linux 2.6.18 or later for full functionality (which unicorn does not require). Future releases will take advantage of the unix_diag functionality found in the Linux 3.3 (and later) kernels.
2012-05-12avoid warning for rb_thread_io_blocking_region
This is exported (visibly) under Ruby 1.9.3 but not in headers, so it was causing warnings.
2012-05-10extconf: better check for GCC atomic builtins
Attempting to test for CMPXCHG on x86 should allow this check to fail on i386 systems. We also won't need try_run as a result, enabling cross-compilation. The configure.in check in Ruby 1.9.3 does something similar and that's far more widely used than raindrops is.
2012-01-07avoid calling tcp_listener_stats when it is not available
Signed-off-by: Aman Gupta <aman@tmm1.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-01-07fix ListenStats documentation error in Raindrops::Linux.unix_listener_stats
Signed-off-by: Aman Gupta <aman@tmm1.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-11-17examples/: updated to match current state of affairs
Consolidating multiple Rack apps into fewer Rack apps on bogomips.org, might as well be transparent about it.
2011-11-14Test suite fix for non-linux users
Most other linux-specific test files have this, but test_linux_tcp_info.rb does not. With this patch, gmake test passes on OpenBSD.
2011-10-14raindrops 0.8.0 - watcher updates v0.8.0
There are various updates to the Raindrops::Watcher Rack app. Most notably, the timestamp where the a statistic first and last hit its peak value (active/queued connections) is captured. As usual, the latest Raindrops::Watcher is running at: http://raindrops-demo.bogomips.org/
2011-10-141.8 compatibility workarounds
Math.sqrt on 1.8.7 does not give NaN for certain errors. We'll also fix our Errno::EDOM retry loop to avoid resetting the "retried" flag.