about summary refs log tree commit homepage
DateCommit message (Collapse)
2018-12-18cmogstored 1.7.0 v1.7.0
The big feature in this release is "devNNN/usage" are served from memory, allowing up-to-date usage information even unwritable/unreadable filesystems. This can also be used to reduce spinups and wear on HDDs. "devNNN/usage" files are still updated on the FS by default for compatibility with existing HTTP servers, but admins may wish to disable updates to them by removing all permissions from the "usage" files: chmod 0000 $MOG_DOCROOT/dev*/usage Filesystem errors from the sendfile(2) syscalls are also logged to syslog. There's also a bugfix for zombies for libkqueue-on-epoll users, but that doesn't affect native kqueue users on *BSDs. And the usual round of gnulib, minor doc and style updates. 18 changes since v1.6.0: cmogstored.h: remove unused mog_file.mmptr member doc: documentation for ioq doc: further comment updates around ioq build-aux/txt2pre: support '=' in URLs test/inherit: fix ambiguous parenthese warning test/inherit: stop testing Ruby itself doc: update URLs to HTTPS compat_sendfile: ensure this works without an offset doc/queues.txt: add key point about only retrieving ONE event fix trace.h dependency on probes.h update to gnulib.git 90f289f249a266b1afb9c63e182f5d979d17df5f http_get.c: log filesystem-level errors from sendfile serve /dev*/usage requests from memory doc: URL updates to reduce redirects and favor HTTPS test/inherit.rb: fix syntax error under Ruby 1.8 update copyrights for 2018 and use SPDX for "GPL-3.0+" selfwake: enable self-pipe with kqueue http_parser: workaround parsing OOM in Ragel 6.10
2018-12-08http_parser: workaround parsing OOM in Ragel 6.10
Noticed in FreeBSD 11.2 where Ragel 6.10 was OOM-ing, this doesn't affect Ragel 6.9. TODO: make sure this is fixed upstream in Ragel.
2018-11-29selfwake: enable self-pipe with kqueue
This was causing my libkqueue build to stall on Linux where epoll_pwait exists. We actually favor kqueue in the code for testing purposes, so we need to enable the self-wake pipe when using libkqueue if epoll_pwait is detected.
2018-11-28update copyrights for 2018 and use SPDX for "GPL-3.0+"
copyrights updated by "update-copyright" in gnulib: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright While we're at it, SPDX seems to be the accepted way to identify licenses nowadays, so lets use it. git ls-files | xargs perl -i -p -e \ 's,GPLv3 or later.*,GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>,g'
2018-11-28test/inherit.rb: fix syntax error under Ruby 1.8
Not sure if it's worth supporting 1.8, anymore, but parts of the Ruby VM test and benchmark suite still remain 1.8-compatible...
2018-11-28doc: URL updates to reduce redirects and favor HTTPS
HTTPS is usually more secure and redirects slow readers down.
2018-11-28serve /dev*/usage requests from memory
Filesystems may become unwritable and out-of-date "usage" files will cause trackers to see out-of-date information. We still write to the filesystem by default for compatibility with existing HTTP servers. However, giving the "usage" file a 0000 mode will prevent cmogstored from overwriting it. This allows admins to also reduce wear on storage devices: chmod 0000 $mogroot/dev*/usage
2018-07-09http_get.c: log filesystem-level errors from sendfile
Socket errors are too common to log (especially from malicous clients), but filesystem errors are rare and important.
2018-06-02update to gnulib.git 90f289f249a266b1afb9c63e182f5d979d17df5f
2018-06-02fix trace.h dependency on probes.h
I haven't tested with systemtap, lately; maybe something bit rotted.
2017-10-24doc/queues.txt: add key point about only retrieving ONE event
This had become such second nature to me that I forgot to document it :x
2017-05-11compat_sendfile: ensure this works without an offset
While we never call sendfile without an offset, some projects may copy our code and want to use it without an offset.
2017-02-09doc: update URLs to HTTPS
HTTPS seems to be working well for the rest of bogomips.org with Let's Encrypt, so lets use it and hope it protects some users from snooping.
2017-01-03test/inherit: stop testing Ruby itself
TCPSocket.new raises exceptions on failure.
2017-01-03test/inherit: fix ambiguous parenthese warning
Who tests the tests?
2016-12-24build-aux/txt2pre: support '=' in URLs
We'll just have everything on r******** soon, I hope :p
2016-12-24doc: further comment updates around ioq
Let's not forget about this queue, it is a useful design.
2016-12-24doc: documentation for ioq
It's a queue that looks like a semaphore, so document it in doc/queues.txt and provide pointers to perhaps-forgotten documentation.
2016-12-16cmogstored.h: remove unused mog_file.mmptr member
This was intended for zero-copy PUT support, but that is probably not worth it due to checksumming and the general unpredictability of mmap/munmap performance, especially on non-Linux systems.
2016-08-31cmogstored 1.6.0 - minor fixes on allocation errors v1.6.0
There are minor robustness fixes on handling errors when allocating memory or spawn failures on otherwise-hosed systems. These bugfixes will not affect real users unless the system is already hosed or in badly overtaxed, so there's no real need to upgrade. There are minor portability improvements and I now test under FreeBSD 10.x. The iostat test cases are relaxed a bit to account for virtualized devices (as iostat is less useful with modern 17 changes since 1.5.0 (Nov 2015): Rakefile: add missing <div> for Atom feed test/pwrite-wrap: remove unused variable and comment test/pwrite_wrap: squelch unnecessary output test/pwrite_wrap: reduce space overhead required update copyrights for 2016 build-aux/txt2pre: drop CGI.pm requirement stdin is always redirected to /dev/null minor vfork/fork safety fixes process: try to handle OOM gracefully http_put: gracefully handle path allocation errors iostat_process: declare environ extern test/mgmt: relax checks for iostat mapping gnulib copyright update for 2016 upgrade: avoid syslog call if execve fails rely on gnulib for environ portability INSTALL: update latest Debian stable version to 8.x README: stop mentioning cgit
2016-08-31README: stop mentioning cgit
I do not expect to run it much longer since it contains CSS and renders poorly without it.
2016-08-26INSTALL: update latest Debian stable version to 8.x
Debian 8.x (jessie) was released over a year ago :x
2016-07-18rely on gnulib for environ portability gl-env
This avoids warnings on my GNU system while still working on FreeBSD.
2016-07-18upgrade: avoid syslog call if execve fails
We cannot safely call syslog on all platforms under vfork; but we have normal exit handling to tell us of the presence of execve errors, just not which.
2016-07-17gnulib copyright update for 2016
2016-07-17test/mgmt: relax checks for iostat mapping
In the age of virtualized devices and fast solid-state storage, iostat information isn't as useful at it was a decade ago and probably less useful in tests. So relax the tests.
2016-07-17iostat_process: declare environ extern
This is necessary for FreeBSD and probably other non-GNU systems.
2016-06-05http_put: gracefully handle path allocation errors
Failing to allocate memory should be a temporary error and be non-fatal.
2016-06-05process: try to handle OOM gracefully
If we fail to register a process, it is not fatal since a process is already running. However, we may not know about when to restart it when it dies.
2016-06-01minor vfork/fork safety fixes
In case "/bin/sh" or "/dev/null" becomes unavailable during the lifetime of cmogstored, we will no longer crash when attempting to (re)start iostat. However, your system is probably hosed anyways if "/bin/sh" or "/dev/null" become unavailable. This also fixes a bug where we would leak the iostat pipe if either fork/vfork fails. We also close an innocuous race condition where the child might toggle flags in the parent process and trigger an extra wakeup. Finally, we use sigprocmask in the child in case pthread_sigmask does not not work on some systems after forking. This is likely only a cosmetic change.
2016-06-01stdin is always redirected to /dev/null
There is no reason for stdin to ever be connected to a terminal, ensure we have a consistent stdin for iostat processes and the like.
2016-05-29build-aux/txt2pre: drop CGI.pm requirement
CGI.pm is no longer in the main Perl distro, so depending on it is not worth the effort for a few lines.
2016-05-29update copyrights for 2016
git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2016-05-29test/pwrite_wrap: reduce space overhead required
It's probably overkill to use 100G of space, even if its sparse.
2016-02-01test/pwrite_wrap: squelch unnecessary output
Oops, leftover from development many years ago.
2016-02-01test/pwrite-wrap: remove unused variable and comment
They were blindly copied and s/search/replace/-ed from epoll-wrap.c
2015-11-28Rakefile: add missing <div> for Atom feed
Apparently this is needed for proper XHTML rendering in iceweasel?
2015-11-21cmogstored 1.5.0 - vfork, systemd, 416 codes v1.5.0
A bunch of minor changes; most notable is systemd-style socket activation support. This was easy-to-add since we've always had socket activation support for nginx-style SIGUSR2 upgrades. This places no link or runtime dependency on libsystemd, so the LISTEN_FDS and LISTEN_PID environment variables may be used in other init systems as well. While I have my own reservations about systemd itself, I also strongly believe in using socket activation to prevent downtime. Existing behavior with CMOGSTORED_FD (used for SIGUSR2 upgrades) is now documented in the manpage and will always supported. We've also added vfork support for Linux systems, allowing faster spawning of iostat if malloc is using too much memory. Behavior changes: Bad Range: headers return 416 responses in more cases for invalid ranges (e.g. miscalculated ranges such as "1--1", while completely wrong ones (lacking a "bytes=" prefix) are ignored entirely as in nginx. Bugfixes: There are also some cleanups to avoid dying on OOM in more places on weird systems which trigger OOM. More work on this is ongoing. Also updates to the latest gnulib.git commit 71d39c1644762745b94e9449c45bfd716a79a5eb ("autoupdate") along with a change which fixes a memory leak when people build from cmogstored.git using gnulib commit c6148bca89e9465fd6ba3a10d273ec4cb58c2dbe or later ("mountlist: add me_mntroot field on Linux machines"). This memory leak did not affect any released tarballs of cmogstored. Note, users building from git (as opposed to the tarball) will need gnulib commit 41d1b6c42641a5b9e21486ca2074198ee7909bd7 ("mountlist: add support for deallocating returned list entries") or later (from July 2013). There are also various documentation updates and our mailing list is now readable over NNTP: nntp://news.public-inbox.org/inbox.comp.file-systems.mogilefs.cmogstored
2015-11-20require newer gnulib for free_mount_entry support
gnulib commit 41d1b6c42641a5b9e21486ca2074198ee7909bd7 ("mountlist: add support for deallocating returned list entries") or later (from July 2013) is needed for free_mount_entry support introduced in our commit 1225f9ce4c32b3bba61ce92a487d99260a001995 ("use free_mount_entry from gnulib instead of rolling our own").
2015-11-20Makefile.am: distribute txt2pre in tarball
Oops.
2015-11-20add cmogstored manpage to website
Sometimes people will forget to install the manpage, make sure it's online in plain-text or HTML format.
2015-11-20misc doc updates
Generate pre-formatted HTML which gives us a consistent visual style with our mailing list archives and enhance linkability. <a>, <pre>, and <title> are among the few useful HTML tags I'll use :P Drop the AUTHORS file, it's pointless maintenance task and users can just look at git history instead (and honestly, I have zero interest in recognition; I only use my real name to deter GPL violations).
2015-11-20README: update contact information
Most notably, our mailing list is now available over NNTP. Stop advertising ssoma since it's too much to expect users would be willing to install and use yet another new tool when NNTP is already standardized and our NNTP server is pretty efficient.
2015-11-13use vfork under Linux before execve
Given the prevalance of gigantic VM footprints due to current glibc malloc and our potentially large number of threads, vfork can speed up fork used for spawning iostat and SIGUSR2 upgrades. vfork only pauses the spawning thread, so it will not affect other I/O threads used in cmogstored; only the non-performance-critical master thread. Swapping 'fork()' for 'vfork()' in the following C test program should show a large speedup under Linux. Changing FILL to increase or decrease memory usage will respectively decrease or increase performance improvement gain from vfork over fork.. -----------------------------8<------------------------- /* gcc -o x x.c -Wall -O2 -lpthread && ./x */ #include <sys/types.h> #include <sys/time.h> #include <unistd.h> #include <pthread.h> #include <poll.h> #include <stdio.h> #include <sys/wait.h> #include <stdlib.h> #include <string.h> #define FILL (1024 * 1024) static void *thfunc(void *p) { void *ptr = malloc(FILL); memset(ptr, 1, FILL); poll(0, 0, -1); return 0; } int main(void) { long i; void *ptr = malloc(FILL); memset(ptr, 1, FILL); for (i = 0; i < 100; i++) { pthread_t th; pthread_create(&th, 0, thfunc, (void *)i); } poll(0, 0, 1000); for (i = 0; i < 100; i++) { /* swapping fork with vfork increases performance on Linux */ pid_t pid = fork(); if (pid < 0) { fprintf(stderr, "ERROR: forking %m\n"); return 1; } if (pid == 0) { char *argv[] = { "/bin/true", 0 }; char *env[] = { 0 }; execve(argv[0], argv, env); return 1; } else { int s; waitpid(pid, &s, 0); } } return 0; }
2015-11-11doc: document CMOGSTORED_FDS in the manpage
This has always been supported internally, and we can't stop supporting it since we'll be supporting upgrades from old versions indefinitely. So document it, as it has some minor advantages over the LISTEN_{FDS,PID} environment handling of systemd.
2015-11-11cmogstored 1.5.0rc1 v1.5.0rc1
A bunch of minor changes; most notable is systemd-style socket activation support. This was easy-to-add since we've always had socket activation support for nginx-style SIGUSR2 upgrades. This places no link or runtime dependency on libsystemd, so the LISTEN_FDS and LISTEN_PID environment variables may be used in other init systems as well. While I have my own reservations about systemd itself, I also strongly believe in using socket activation to prevent downtime. Behavior changes: Bad Range: headers return 416 responses in more cases for invalid ranges (e.g. miscalculated ranges such as "1--1", while completely wrong ones (lacking a "bytes=" prefix)) are ignored entirely as in nginx. Bugfixes: There are also some cleanups to avoid dying on OOM in more places on weird systems which trigger OOM. More work on this is ongoing. Also updates to the latest gnulib.git commit f197c2c9e5e0d12c373f26d5b3211809457bc972 ("intprops: new public macro EXPR_SIGNED") along with a change which fixes a memory leak when people build from cmogstored.git using gnulib commit c6148bca89e9465fd6ba3a10d273ec4cb58c2dbe or later ("mountlist: add me_mntroot field on Linux machines"). This memory leak did not affect any released tarballs of cmogstored. shortlog of changes since 1.4.3: doc: use "builder" RubyGem to generate Atom feed dev.c: fail gracefully on out-of-memory errors do not die on OOM when for mgmt paths HACKING: update URLs to reduce redirects http: return 416 errors in more cases for bad Ranges update .gitignores for latest autotools + gnulib Rakefile: remove text-only part from the Atom feed support systemd-style socket activation via environment set TCP listener options on inherited sockets doc: add example systemd config files use free_mount_entry from gnulib instead of rolling our own fix tmpdir dependency for slow Ruby tests doc: publish examples directory to website
2015-11-11doc: publish examples directory to website
This might improve visibility of these scripts for use with systemd.
2015-11-11fix tmpdir dependency for slow Ruby tests
.slowrb tests have a different suffix and the test dependencies need to be split out separately.
2015-11-11use free_mount_entry from gnulib instead of rolling our own
gnulib.git added the me_mntroot element in commit c6148bca89e9465fd6ba3a10d273ec4cb58c2dbe, so we would leak memory during filesystem refreshes as a result :x Use the gnulib-provided API (free_mount_entry) instead of freeing elements ourselves.
2015-11-11doc: add example systemd config files
Since we'll support systemd, it's not a bad idea to include reasonable example files for users.