Thoughts on S6 and Docker

From: Aristomenis Pikeas <>
Date: Mon, 23 Mar 2015 03:27:12 -0700

Hello list!

I discovered S6 through John's recent Tutum blog post. I've read through several recent threads, including the recent long discussion, and would like to add my own remarks to the discussion. These thoughts are sufficiently diverse that I'm starting a new thread rather than replying to the existing one.

S6 seems pretty great, but as a new user, it's pretty hard to get started.

1) The S6 docs ( <>) direct me to read the INSTALL file in a tarball, and then link to 10(!) different s6-* subprograms. This is too much to digest. I'd love to see a quick start guide.
2) Mirroring the S6 code to Github is a nice idea which Laurent mentioned in the previous thread. Laurent, may we start posting issues to the <> repo? In particular, I'm having some trouble which I describe in a later bullet point.
3) I understand the reasons behind breaking S6 up into a large set of simple utilities, but the current state of affairs is pretty extreme. ;ss /usr/bin |grep s6-* | wc -l reports 55 different utilities. Have you considered breaking s6 up into multiple packages, for example "core" and extras? That may not be feasible, so my main feedback is that the larger the number of utilities provided, the greater the handholding necessary to get users up to speed.
4) I tried compiling s6 in an Ubuntu container. ./configure froze while looking for /dev/random. You can ctrl+c through this step, but this won't work when running docker build, because it's noninteractive. Is there a way to bypass this step?
5) For major distributions and usage mediums (Ubuntu, docker, OS X, and perhaps Alpine/busybox), the docs should provide clearer steps for installation and usage. John recently posted an Alpine package, which is great. But the version available in Ubuntu is extremely old - 0.47. Have you considered adding a Launchpad PPA?
6) Gorak/John: None of the s6/skalibs images are explicit about /etc/leapseconds.dat. This confuses me. When reading through the build scripts, the file is usually copied into the image, but I can't find the original leapseconds.txt. Is the original, out-of-date version from libtai being used? If so, this needs to be updated.
7) s6-svwait (and possibly other s6-* utils) throws a really unhelpful error if run against a directory which hasn't yet had s6-svscan run against it: "fatal: unable to subscribe to events for/service: No such file or directory". It was also initially unclear to me that svwait should be run against the individual service directory, rather than the parent services directory.
8) I'm really struggling to get a "simple" flow up. All I have is .s6-svwait and a dummy service which is basically "while true; echo work; sleep 1", and their corresponding finish scripts. If I run docker run --rm my_container s6-svscan /service, everything works correctly. But if I add "-it" to the run command for an interactive tty, the dummy service finish script never runs. And if I bring the container up with a shell and run s6-svscan manually, it exits, but the dummy service continues running forever. I imagine this is related to ctrl+C being a SIGINT here, but I'm not really sure what to do to get everything to always Just Work. On another thread, the suggested solution was to trigger nosetsid, but this option is under-documented. Should all services be run nosetsid, or is there some negative side effect?
9) This has already been discussed a bit, but I'd like to add another vote for allowing s6-svscan to run a command. As others have said, I want to set ENTRYPOINT to s6-svscan, with a default COMMAND of /service, with transparent support for running other commands while still starting services, e.g. docker run --rm -it my_container bash, and gracefully terminating services when this process exits. It would also be great to have an --only flag which bypasses service startup. I'm envisioning this as relatively thin wrapper script, but I'm not sure I've considered all the edge cases, and this may already be the new s6-init utility you're working on, Laurent?
10) Gorak - s6-overlay-builder produces five different tarsal build artifacts. Could you document the difference between them? Your README has execution instructions, but is missing all other documentation.

Phew, I know that's quite a lot of commentary. I probably have additional thoughts I've forgotten given the hour, but hopefully this is enough to kick off additional productive discussion.

Thanks, and looking forward to hearing from you all,
Received on Mon Mar 23 2015 - 10:27:12 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC