Re: Transition to supervision-scripts

2014-11-07 Thread Colin Booth
Currently, sshd and winbindd just will not operate regardless of what is used or done. sshd complains the log service is not working and the service is down. Winbindd won't even start even if nmbd and smbd are both started as well. We even have issues getting kdm to login, unless it is

Re: [announce] s6-2.0.0.0

2014-12-22 Thread Colin Booth
On Mon, Dec 22, 2014 at 8:39 AM, Laurent Bercot ska-supervis...@skarnet.org wrote: Hello, Merry Christmas! s6-2.0.0.0 is out. * Build system changed to ./configure make sudo make install. Distributors rejoice! Packaging s6 will now be easy and won't go against your guidelines, no

Re: sv check exit code not always helpful

2015-02-08 Thread Colin Booth
From the documentation, I had expected check to fail as long as the actual state didn't match the desired state, ie if there is any want clause. I'm using `sv` check to wait for runit to reach a steady state before using services. `sv check' only exits non-zero if the following are both

Re: runit and sv check for dependencies

2015-01-16 Thread Colin Booth
On Jan 16, 2015 8:43 AM, Charlie Brady charlieb-supervis...@budge.apana.org.au wrote: On Fri, 16 Jan 2015, Wayne Marshall wrote: Your assertion sounds scary and foreboding in theory, but is not an issue in practice. You've never had a system crawl when some process is being restarted

Re: s6 init-stage1

2015-01-06 Thread Colin Booth
On Mon, Jan 5, 2015 at 5:03 PM, James Powell james4...@hotmail.com wrote: The initial init bootscript that I'm currently drafting is in execline using the template provided by Laurent. I was going to take the advice on using /bin/sh rather than /bin/execlineb but I recanted that decision due

Re: s6 init-stage1

2015-01-06 Thread Colin Booth
On Tue, Jan 6, 2015 at 6:27 AM, Avery Payne avery.p.pa...@gmail.com wrote: On Tue, Jan 6, 2015 at 4:02 AM, Laurent Bercot ska-supervis...@skarnet.org wrote: But on servers and embedded systems, / should definitely be read-only. Having it read-write makes it susceptible to filesystem

Re: s6 ordering and run-once?

2015-06-16 Thread Colin Booth
On Tue, Jun 16, 2015 at 5:58 PM, Steve Litt sl...@troubleshooters.com wrote: On Wed, 17 Jun 2015 01:07:01 +0200 Laurent Bercot ska-supervis...@skarnet.org wrote: On 16/06/2015 23:33, Steve Litt wrote: Hi all, Does anyone know how to do a run-once service without putting an infinite

Re: comparison

2015-06-15 Thread Colin Booth
I only know s6 and runit well enough to comment on for the most part but filling in some blanks on your matrix: Daemontools is public domain, freedt is the OpenBSD license (which doesn't appear to currently exist according to the OpenBSD licensing page). I'd treat it like the ISC license.

Re: Working on shell for perp/s6/etc., need advice re logging

2015-07-28 Thread Colin Booth
On Tue, Jul 28, 2015 at 12:07 AM, Ido Perlmuter i...@ido50.net wrote: Hello there. Currently, I've implemented the fg command in a pretty dumb way: I read the service's rc.log file for perp or log/run file for s6, and take the last argument to tinylog or s6-log to figure out where log files

Re: Working on shell for perp/s6/etc., need advice re logging

2015-07-28 Thread Colin Booth
On Tue, Jul 28, 2015 at 9:57 AM, Ido Perlmuter i...@ido50.net wrote: Thanks for the suggestions guys. I suppose enforcing a certain logging policy for anyone whishing to use my shell is somewhat unavoidable, but I'll keep looking into those options to see what I can do to be as unobtrusive

Re: s6: compatibility with make3.82

2015-07-22 Thread Colin Booth
On Tue, Jul 21, 2015 at 9:36 AM, Buck Evan b...@yelp.com wrote: Apparently the 'private' keyword was added in 3.82, but many of the platforms I care about have older versions of make. Would you accept a patch to factor it out? Since everything related to s6 only has runtime dependencies on

Re: s6: something like runit's ./check script

2015-09-04 Thread Colin Booth
On Wed, Sep 2, 2015 at 3:07 PM, Laurent Bercot wrote: > echo 3 > notification-fd > > mv run run.real > > cat > run < #!/command/execlineb -P > background -d > { > fdmove 1 3 > forx -x 0 dummy { 1 2 3 4 5 6 7 } > ifelse { ./check } { echo } > foreground { sleep

Re: s6: something like runit's ./check script

2015-09-07 Thread Colin Booth
On Sep 7, 2015 2:53 PM, "Buck Evan" wrote: > Here you go. I made a few minor changes after this thread started (pulling the fdmove into the background block for example) which are reflected here: #!/command/execlineb -P fdmove -c 2 1 background -d { fdmove 1 3 loopwhilex -o 1

Re: s6: something like runit's ./check script

2015-09-08 Thread Colin Booth
On Tue, Sep 8, 2015 at 9:29 AM, Buck Evan wrote: > Putting them side by side for my own benefit, and normalizing Colin's > terminology and formatting: > > It looks to me like the only notable difference is Colin's 'fdmove -c 2 1'. > If I understand it, this is redirecting stderr to

Re: [ale] systemd talk from July has slide deck online now

2015-09-08 Thread Colin Booth
On Tue, Sep 8, 2015 at 10:04 PM, Steve Litt wrote: > Thanks Colin, > > I used Suckless-Init as PID1 and had Suckless-Init pass the baton to > s6, using LittKit to enable service startup ordering in s6 and > intermixing oneshots and longruns in s6. > > If I want to use

Re: [ale] systemd talk from July has slide deck online now

2015-09-09 Thread Colin Booth
On Tue, Sep 8, 2015 at 10:04 PM, Steve Litt wrote: > > Is s6-rc something you add to s6, or is it a totally different thing? > One more bit about this. s6-rc sits on top of s6 and emits s6-svc and s6-sudo commands as necessary. For example, a dry run taking down sshd on

Re: [ale] systemd talk from July has slide deck online now

2015-09-13 Thread Colin Booth
On Sun, Sep 13, 2015 at 11:43 AM, Guillermo wrote: > > If you don't look too closely, you could also say nosh without the > userspace terminal and login services stuff more or less covers the > same ground as s6, s6-rc and a small subset of execline. > I mean't more in

Re: s6: something like runit's ./check script

2015-09-16 Thread Colin Booth
I think I've found what should be the cannonical timered ./check equivalent script. On Tue, Sep 8, 2015 at 9:29 AM, Buck Evan wrote: Original normalized versions: > > Laurent's: > #!/command/execlineb -P > background -d > { > fdmove 1 3 > forx -x 0 dummy { 1 2 3 4 5 6 7 } >

Re: s6: something like runit's ./check script

2015-09-17 Thread Colin Booth
On Thu, Sep 17, 2015 at 3:02 AM, Laurent Bercot wrote: > > Sure, that's doable. > However, remember that s6-maximumtime is part of s6-portable-utils, > so you're introducing an additional dependency there. > True. I'm simply not sure it's possible to make something

Re: s6: something like runit's ./check script

2015-09-17 Thread Colin Booth
On Thu, Sep 17, 2015 at 9:44 AM, Buck Evan wrote: > My proposal was to read a /start-timeout file for this purpose. > > It seems like seq | xargs would do what you need. > I suppose s6 doesn't want to depend on those. > seq | xargs would work too. s6 wouldn't depend on those, the

Re: Some suggestions about s6 and s6-rc

2015-09-20 Thread Colin Booth
On Sun, Sep 20, 2015 at 12:15 AM, Casper Ti. Vector wrote: > (Accidentally sent to Colin as private mail, reposting verbatim here; > sorry for the disturbance...) > > Well, this naming issue is all about overloading... To circumvent the > overloading problem, we can also

Re: s6-rc-init hangs during stage2

2016-06-06 Thread Colin Booth
On Mon, Jun 6, 2016 at 2:55 AM, Laurent Bercot wrote: > If it doesn't solve your issue, please use the "-v -f -s256" options to > strace when you're stracing s6-rc-init, post the result on a site like > pastebin, sprunge or tpaste, and post the URL here. (At least

Re: No DOWN file support in runit?

2016-02-13 Thread Colin Booth
On Feb 13, 2016 10:18 AM, "Steve Litt" wrote: > > Hi all, > > I've been using runit for about 4 months now, and a few days ago I > tried to disable a service by placing a file called DOWN in its > directory (like you would with s6 or daemontools). However, the service >

Re: How to make svlogd send logs via UDP

2016-03-13 Thread Colin Booth
On Mar 13, 2016 7:03 AM, "Nicolas de Bari Embriz Garcia Rojas" @ dalmp.com > wrote: > > Hi, the patch worked, any chance to apply it to the main distribution ? > I don't know how actively GarrIt follows this mailing list, but you may want to email him directly.

Re: How to make svlogd send logs via UDP

2016-03-13 Thread Colin Booth
On Sun, Mar 13, 2016 at 8:59 AM, Colin Booth <cathe...@gmail.com> wrote: > > I don't know how actively GarrIt follows this mailing list, but you may want > to email him directly. Gerrit, sorry... > > Cheers! > -Colin -- "If the doors of perception were cleansed ev

Re: publish/subscribe data between services

2016-03-07 Thread Colin Booth
On Mar 7, 2016 6:41 PM, "Patrick Mahoney" wrote: > > On 2016-03-07 7:41 pm, Buck Evan wrote: > >> How do services become aware of each others' port numbers? >> > > Not sure if this would be simpler than IP-per-playground, but you > could look into Linux's network namespaces

Re: HAProxy Hot Reconfiguration with s6

2016-05-17 Thread Colin Booth
On Tue, May 17, 2016 at 8:52 PM, Colin Booth <cathe...@gmail.com> wrote: > This solution is pretty grotty and I'm not super happy about it, but > it's the least over-engineered version that I've come up with thus > far. I don't have any proof-of-concept code or anything go

Re: HAProxy Hot Reconfiguration with s6

2016-05-17 Thread Colin Booth
On Mon, May 16, 2016 at 12:57 PM, Remko Tronçon wrote: > Hi, > > This question has probably been asked before, but I couldn't find anything. > > I want to run HAProxy under a system using s6. I want to make HAProxy hot > reload its configuration to have minimal downtime on

Re: HAProxy Hot Reconfiguration with s6

2016-05-18 Thread Colin Booth
On Mon, May 16, 2016 at 12:57 PM, Remko Tronçon wrote: > Hi, > > This question has probably been asked before, but I couldn't find anything. > > I want to run HAProxy under a system using s6. I want to make HAProxy hot > reload its configuration to have minimal downtime on

Re: Setting open files for a process started by runit (using chpst)

2016-05-13 Thread Colin Booth
On Fri, May 13, 2016 at 11:59 AM, Tony Gaetani wrote: > I think chpst -o can only limit open files meaning reduce the number of open > file descriptors for the process, not increase. I'm just speaking from > memory, I have no proof to back up this conjecture. I recommend

Re: s6-linux-init: SIGUSR1 and SIGUSR2

2016-08-22 Thread Colin Booth
On Mon, Aug 22, 2016 at 7:29 AM, Martin "eto" Misuth <et.c...@ethome.sk> wrote: > On Mon, 22 Aug 2016 07:26:12 -0700 > > Colin Booth <cathe...@gmail.com> wrote: >> My own $0.02 is that s6-svscan -S should ignore power state signals >> (including SIGIN

Re: s6-linux-init: SIGUSR1 and SIGUSR2

2016-08-22 Thread Colin Booth
On Mon, Aug 22, 2016 at 6:35 AM, Laurent Bercot wrote: > On 22/08/2016 14:02, Casper Ti. Vector wrote: >> >> Are SIGUSR1 and SIGUSR2 not just silently ignored in -S mode? > > > Uuuuh, yes, my bad, they are. > Sigh. I'm not sure what the right thing even is. Should

Re: Runit questions

2016-10-20 Thread Colin Booth
On Oct 20, 2016 12:40 AM, "Andy Mender" wrote: > > Dear colleagues, > > I verified my svlogd logging problems on Debian/Devuan and it turned out > that the error > I was getting was non-specific and did not really interfere with either > daemon supervision > by runsv or

Re: How to redirect to /run/uncaught-logs/current?

2016-11-02 Thread Colin Booth
On Wed, Nov 2, 2016 at 11:54 AM, Jean Louis wrote: > And here is what I wish and don't know how to handle yet: > > I have acpid, and I wish that output from acpid is going to > /run/uncaught-logs/current, and I have it like this, and I get on boot > screen, the messages: > >

Re: Any tool in s6, to check a mountpoint?

2016-11-01 Thread Colin Booth
On Nov 1, 2016 9:54 AM, wrote: > > Is there any tool in s6 that can check for a mountpoint? Or any other > method? > > Jean Does mountpoint from util-linux not work for you? I've done the following in the past: foreground { if -n { mountpoint.$SOMEDIR } mount $SOMEDIR } prog...

Re: Runit questions

2016-10-11 Thread Colin Booth
On Oct 11, 2016 3:09 PM, "Andy Mender" wrote: > > Hello again, > > I'm rewriting some of the standard sysvinit and openrc scripts to ./run > scripts > and I have some problems with dbus. I took the ./run script from Void Linux > as the original runit documentation

Re: Runit questions

2016-10-11 Thread Colin Booth
On Oct 11, 2016 4:07 PM, "Steve Litt" wrote: > > On Wed, 12 Oct 2016 00:09:02 +0200 > Andy Mender wrote: > > > Hello again, > > > > I'm rewriting some of the standard sysvinit and openrc scripts > > to ./run scripts > > and I have some

Re: s6 talk at FOSDEM 2017

2017-01-05 Thread Colin Booth
On Thu, Jan 5, 2017 at 2:59 AM, Laurent Bercot wrote: > > I didn't look too hard at the source code because things like this > _should_ be documented no matter what. I remember early experiments > with old RedHats or Debians where the gettys were actually started in

Re: How to run s6-svscan in user space

2017-07-22 Thread Colin Booth
On Sat, Jul 22, 2017 at 12:52:45PM +0300, Jean Louis wrote: > Hello, > > I have these files: > > ~/Programming/services/cron > > cron/run: executable > > #!/bin/execlineb -P > /home/data1/protected/bin/lisp > /home/data1/protected/Programming/git/RCDBusiness/lib/lisp/cron/cron.lisp > >

Re: Uncontrolled generation of new processes

2017-12-06 Thread Colin Booth
s controlled, at the same time the > process is recreated again and again with increasing PIDs. > What am I doing wrong? In your test case, the design of foo-service.sh is the problem. If you replaced `for i in {1..2} ; do' with `while : ; do' the script will never actually terminate and foo-service.sh will be properly supervised. > > I'm very interested in using runit for controlling other services different > than daemons, so any help will be welcomed. The only rules are: it has to not background/detatch/whatever, and when it terminates it'll get re-launched. > > Thank you in advance for your help. Cheers! > -- > - > Daniel Gutiérrez San José -- Colin Booth

Re: s6-log run xz compression processor on .u files

2018-02-23 Thread Colin Booth
ame '*.u' -exec xz "{}" \; If you don't mind polling, something similar but as an s6 service works, though you can use s6-pause from s6-portable-utils to stop it from refiring (and as such no longer polling). If you don't have that, a finish script that puts the service down works, but th

Re: s6-ps

2019-01-05 Thread Colin Booth
Therefore, installing s6 forces installation of libexecline, libskarnet, and libs6, and recommends the execline bundle. Cheers! -- Colin Booth

Re: s6-ps

2019-01-06 Thread Colin Booth
efinitely cause some ill will. > > "Recommends" is a mistake. Without execline, parts of the s6 suite > of programs will break. > > -- > Laurent > -- Colin Booth

Re: Added signal to have runsvdir wait

2018-11-30 Thread Colin Booth
tandard (albiet annoying) runit mechanisms. > > Thanks! > > Yanko Cheere! -- Colin Booth

Re: s6 problems logging

2019-01-26 Thread Colin Booth
he files "current" (apparently not), "lock", and "state"? Those final two files are created by s6-log automatically and should at least indicate that it's starting up fine. Cheers! -Colin -- Colin Booth

Re: s6 problems logging

2019-01-27 Thread Colin Booth
On Sun, Jan 27, 2019 at 11:47:51AM -0500, Sean MacLennan wrote: > On Sun, 27 Jan 2019 05:20:00 + > Colin Booth wrote: > > > Everything looks fine from over here. Does running doorknob with -fs > > from the terminal do what you expect? > > Yup, I get a log message

Re: Dependencies on shutdown?

2019-02-25 Thread Colin Booth
n runit > or s6? > Use s6-rc. The dependency definition that made sure the database is up before the web app is started will also make sure that the web app is stopped before triggering the stop on the database daemon. -- Colin Booth

Re: s6 bites noob

2019-01-31 Thread Colin Booth
say, in a longrun so you know it's always going to be around) that watches the directory and issues an `s6-svscanctl -an' when it gets nudged. -- Colin Booth

Re: s6 bites noob

2019-01-31 Thread Colin Booth
, in a longrun so you know it's always going to be around) that watches the directory and issues an `s6-svscanctl -an' when it gets nudged. -- Colin Booth

Re: Generic interrupt command?

2019-02-02 Thread Colin Booth
nd hopefully sv if Gerrit > can scrape together the time), no hackiness would be added to s6 or > runit: Any hackiness would be in the shellscript created by the > programmer using s6 or runit. > As documented here: https://www.skarnet.org/software/s6/s6-svstat.html s6-svstat -p /path/to/service | xargs kill SIGNAL -- Colin Booth

Re: killall test run

2019-05-19 Thread Colin Booth
On Sun, May 19, 2019 at 02:57:14PM +0200, Jeff wrote: > ... a bunch of stuff ... Please stop breaking threads. Or if you must break threads include a (was: blah) in the Subject: to help people's mail readers out. -- Colin Booth

Re: further claims

2019-05-01 Thread Colin Booth
er by forking a thing and then issuing the reboot(2) syscall any time its child vanished. Annoyingly aggressive on the restarts, but proper. -- Colin Booth

Re: S6 readiness

2019-04-26 Thread Colin Booth
utomatic-Server AG • > Oliver Schad > Geschäftsführer > Turnerstrasse 2 > 9000 St. Gallen | Schweiz > > www.automatic-server.com | oliver.sc...@automatic-server.com > Tel: +41 71 511 31 11 | Mobile: +41 76 330 03 47 -- Colin Booth

Re: s6-log can create current with 640?

2019-10-22 Thread Colin Booth
re good enough in this situation. In your case, only the uucp user is allowed to descend into that directory to start with so as long as that guarantee stays in place the file permissions shouldn't matter. In fact, 640 is *more* permissive than the parent directory due to the ability for accounts in the uucp group to

Re: runit patches to fix compiler warnings on RHEL 7

2019-11-29 Thread Colin Booth
t; feels like making a new release. > D) The maintainers of distros shipping runit work out a patch-sharing >scheme among them. > > > Just my 0.02€, I hope it helps. > > cheers, > Jan -- Colin Booth

Re: runit patches to fix compiler warnings on RHEL 7

2019-11-29 Thread Colin Booth
for PROTECTED level security (its an Australian > Govt thing), and skarnet's service management provides assurance, and s6-log > provides near-certainty of logging completeness. I'm very happy with the > toolset, worth the time investment. -- Colin Booth

Re: Does execline natively do arithmetic and branching

2019-12-19 Thread Colin Booth
tins per-se (the commands shipped with execline are stand-alone utilities) so you can't fudge it like you can with shell. If you don't want to use the GNU or BSD coreutils, and are allergic to multi-call binaries, s6-test (in s6-portable-utils) works quiet well and handles all of the POSIX defined cases. -- Colin Booth

Re: s6 usability

2019-12-22 Thread Colin Booth
esponse to getting both -0 and -d > would be erroring out, but that's just an aside.) > Fair enough. For some reason I was thinking you were talking about a documentation error, not a functional inconsistency. I was assuming that this leaked in when forbacktickx became a wrapper but that isn't the case, the inconsistency exists as far back as the 2.0.0.0 rewrite. -- Colin Booth

Re: s6 usability

2019-12-21 Thread Colin Booth
the runit design, though with stage1 execing into s6-svscan (instead of forking it), stage2 only handling post boot initialization tasks (instead of those tasks and then the supervisor), and stage3 also being pid1 (via s6-svscan's finish script). (speaking of walls of text). > > P.S: I stumbled over this execline oddity: > | dollarat -0 -d a # separates by \0 > | forbacktickx -0 -d a var {gen...} loop... # splits on a > IMHO, both should be an error, but at least treat them the same. > As per the docs for forbacktickx: -0 : accept null characters from gen's output, using them as delimiters. If this option and a -d option are used simultaneously, the rightmost one wins. Cheers! -- Colin Booth

Re: runit SIGPWR support

2020-01-30 Thread Colin Booth
ng lxc.signal.halt and using a signal that runit already understands? -- Colin Booth

Re: runit SIGPWR support

2020-02-12 Thread Colin Booth
signal is a little bit of a bummer. -- Colin Booth

Re: Understanding the syslogd-linux Service Script

2020-09-08 Thread Colin Booth
supervise readyness reader; fd2 open, pointed at s6-log; fd3 closed s6-ipcserver -U -1 -- /dev/log fd1 signaled ready and then closed; fd2 open, pointed at s6-log; fd3 closed --- for each new sender attached to /dev/log --- fd0 open, reading from /dev/log, fd1 open, writing to s6-log, fd2 open, writing to s6-log, fd3 closed. Cheers! -- Colin Booth

Re: Understanding the syslogd-linux Service Script

2020-09-08 Thread Colin Booth
ipcserver-socetbinder -m -b0 /dev/log s6-applyuidgid -U -z s6-ipcserverd -1 then the rest of the program (the fdmove and ucspilogd commands). -- Colin Booth

Re: Can you use s6-rc with the sysvinit PID1?

2020-10-23 Thread Colin Booth
second. background { foreground { sleep 1 } foreground { s6-rc-init /path/to/scandir } s6-rc change up } s6-svscan /path/to/scandir Jam that into the startup script that you use for booting your supervision tree and you'll be good to go. -- Colin Booth

Re: Logging in a web server context

2020-06-14 Thread Colin Booth
could be to use Google > Analytics instead, but I want to avoid that since I don’t feel > comfortable about handing over my visitors’ personal data over to > Google. > > [2] I.e. lines like this '10.131.214.101 - - [20/Nov/2017:18:52:17 > +] "GET / HTTP/1.1" 401 188 "-" "Mozilla/5.0 (X11; Ubuntu; Linux > x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"' -- Colin Booth

Re: Answers to some GitHub questions

2021-01-06 Thread Colin Booth
t is acceptable in the void package mainline as an alternate base system, get it in there, and then hand off maintainership to someone who is more central to Void. Longest term is obvious - adjust the part 2 stuff so that it's acceptable as the default, but that is a long way off and this is an iterative process. -- Colin Booth

Re: s6-man-pages updated to 2.10.0.0

2021-01-22 Thread Colin Booth
itional dot. So your releases would be v2.10.0.0_1 (and so on). Cheers! -- Colin Booth

Re: Service started at bootup Though empty down file created

2021-01-27 Thread Colin Booth
ency on B. Assuming you leverage the notification system (either internally in the B service or via s6-notifyoncheck), s6-rc will guarantee that B is started _and ready_ before bringing A up. This is by far the preferable route since it involves fewer leaky abstractions or awkward plumbing through the management layer. -- Colin Booth

Re: s6 supervision

2021-01-29 Thread Colin Booth
t know anything else about the process because it doesn't need to. However, there are several options to s6-svstat that make output information in easy-to-parse formats which make follow-on queries to /proc trivial. -- Colin Booth

Re: Query on s6-log and s6-supervise

2021-06-09 Thread Colin Booth
ich is a pretty decent tradeoff between efficiency and convenience, but to see super low dirty memory you'll need to use a libc that can actually be linked statically such as musl. For your needs, using a musl toolchain and building a fully static s6 should get you significantly better memory usage. -- Colin Booth

Re: [s6-svperms] Handling service permissions at creation time.

2021-02-15 Thread Colin Booth
should be few and far between and their permissions > shouldn't be trifled with. > > I can add that functionality to the next version of s6-rc. What do > you think? > Services can fix their own permissions so if s6-rc is going to grow that functionality it should be in the generated run, not in some rarely used outboard helper service. -- Colin Booth

Re: "Back off" setting for crashing services with s6+openrc?

2022-09-26 Thread Colin Booth
delay restarting, set the service down in the face of a permanent error, or so on. Note that by default finish has a five second deadline so if you want to delay a restart for ten seconds you'll need to increase that deadline with a timeout-finish file. -- Colin Booth