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

2021-02-15 Thread Laurent Bercot
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. As answered on IRC, for ML completeness: no, because permissions should be fixed when the supervisor starts, not when the se

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

2021-02-15 Thread Laurent Bercot
The s6-svperms is a great feature but it only handle permissions control of a service at runtime. That means that we need to change the permissions of the service everytime that a reboot occurs. For a server, this is not really a big deal but for a desktop machine this can be really hard to han

Re: timer support for s6 services

2021-02-10 Thread Laurent Bercot
Is there a way to set a timer option on a particular service 'X', so that 'X' gets restarted for every timer seconds ? You can achieve that with another service that just sleeps for 'timer' seconds then sends a s6-svc -r command to the service you want restarted. -- Laurent

Re: stage2 as a service

2021-02-01 Thread Laurent Bercot
For the normal case you are absolutly right. But with stage 2 as a service you have a race condition between stage 2 and s6-svscan-log. The usual trick for stage 2 solves this problem. Ah, now I get it: stage 2 must not start before the catch-all logger is ready, so you open the fifo for writin

Re: stage2 as a service [was: Some suggestions on old-fashioned usage with s6 2.10.x]

2021-01-31 Thread Laurent Bercot
Hi Stefan, Long time no see! A few comments: # optional: -- Question: Is this necessary? redirfd -w 0 ${SCANDIR}/service/s6-svscan-log/fifo # now the catch all logger runs fdclose 0 I'm not sure what you're trying to do here. The catch-all logger should be automatically unblocked

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-29 Thread Laurent Bercot
But even `s6-reboot' from older s6-linux-init, or `busybox reboot' with slew can already do that... Yes. And as your sharp mind undoubtedly noticed, those commands are not the same as "reboot". Which means burden on users. Yes, I also thought it was a small burden at first, but it's not. It

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-29 Thread Laurent Bercot
Currently I do not understand the `s6-linux-init-shutdown(d)' way well, so the old-fashioned way is retained at least for now, given its simplicity in implementation and seemingly better flexibility. Frankly it is my intuition that the new way costs more than the old way, but does not provide tha

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-29 Thread Laurent Bercot
Actually I do visit the CGit web interface fairly often Oh, my bad, the links in the skaware documents actually point to https://git.skarnet.org/something. Fair enough then, I have made git.skarnet.org an explicit alias to skarnet.org. Perhaps I need to batch change all

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-28 Thread Laurent Bercot
BTW, seems to be returning empty HTTP replies now; both and work as expected though. That is a side effect of a recent s6-networking addition, where s6-tlsd passes the SNI server name to the application via an environme

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-28 Thread Laurent Bercot
I did not actively follow the recent evolution of s6, and have just been bitten badly by s6 2.10.x on my Alpine servers (where slew [1] is used of course) when it comes along with other updates. Sorry. This bears repeating: major version upgrades may break things. Compatibility is a good t

[announce] skalibs-2.10.0.1, execline-2.7.0.1, s6-2.10.0.1

2021-01-25 Thread Laurent Bercot
Hello, New skarnet.org packages are available: skalibs-2.10.0.1 execline-2.7.0.1 s6-2.10.0.1 Those are bugfix releases. I normally don't announce bugfix releases, but the bugs that have been fixed here are pretty visible (sorry about that!), so all users are encouraged to upgrade ASAP.

Re: s6-man-pages updated to 2.10.0.0

2021-01-22 Thread Laurent Bercot
Very nice. Not to nitpick though, the standard way of handling out-of-version versioning is with an underscore, not an additional dot. So your releases would be v2.10.0.0_1 (and so on). The additional dot was on my suggestion, to avoid conflicting with distros wanting to package s6-man-pages. D

Re: The multisubstitute commands in the run script generated by s6-usertree-maker are in a wrong order

2021-01-22 Thread Laurent Bercot
As shown above, the multisubstitute command that contains XDG_RUNTIME_DIR is put after the one that contains USER, HOME, UID, GID, and GIDLIST. If for example XDG_RUNTIME_DIR=/run/user/$UID, the $UID here will not be substituted with the user's UID since by the time $UID is substituted, $XDG_RU

Re: What extra logging utilities are needed with s6?

2021-01-20 Thread Laurent Bercot
If all your services support logging to stdout/stderr you can get away without a syslog service. Instead of a single logging service consuming logs from all other services s6 is designed to connect each long running service with its own tiny dedicated logging service. To add to this: it is l

[announce] skarnet.org New Year 2021 release

2021-01-10 Thread Laurent Bercot
Hello, Happy New Year to everyone! New versions of the skarnet.org packages are available. This is a major release. The skalibs major version number has been bumped, which means that compatibility with previous versions is not ensured. Other packages have been updated to build against the

Re: Answers to some GitHub questions

2021-01-09 Thread Laurent Bercot
Is there a migration guide from runit to s6? I added a very basic list of things to do as a FAQ in https://skarnet.org/software/s6-linux-init/quickstart.html Please comment if there are things that need change or clarification. (The prose is bad, I know; please stick to content suggestions.)

Re: Why are there 3 programs in s6 that do the same thing?

2020-12-29 Thread Laurent Bercot
s6 has three programs to set UID / GID of a process: s6-setuidgid, s6-applyuidgid and s6-envuidgid. All three of those seem to do the same thing, with some *slight* differences. Why are all three included in s6? Those three programs don't do the same thing at all. They do *related* things; an

Answers to some GitHub questions

2020-12-25 Thread Laurent Bercot
Hi, Someone on GitHub asked a series of questions about s6. I decided to answer them here, in order to have the post in the ML archives and a place (outside of GitHub) to refer people to if similar questions arise in the future. * Benefits of s6 over runit? s6 has multiple benefits over

Re: How to recover from s6-rc broken pipe?

2020-12-16 Thread Laurent Bercot
sudo rsync -avr --delete compiled/ /etc/s6-rc/compiled/ sudo s6-rc-update /etc/s6-rc/compiled/ There's your problem. You're overwriting the live database; that will throw a wrench into everything. s6-rc-update needs to run while the live database is still the old one. Only after s6-rc-

Re: How to recover from s6-rc broken pipe?

2020-12-16 Thread Laurent Bercot
I'm using s6-rc to manage services and have been changing databases. For some unknown reason sometimes the update fails with the error: s6-rc-update: fatal: unable to read /run/s6-rc/state: Broken pipe That should definitely not happen. Have your databases been built with the same version

Re: service creation in s6

2020-12-16 Thread Laurent Bercot
Is there a way of setting capability binding in S6? like "CapabilityBoundingSet=CAP_NET_ADMIN" https://www.man7.org/linux/man-pages/man8/setcap.8.html -- Laurent

Re: s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
It seems I missed the addition of s6-svscan's -X option; I saw it one day in the output of 'ps' on a VM that was using s6-linux-init, didn't recognize it, but then forgot to look up what it did :P But I would have to 'tag' messages in some way, so that the catch-all logger recognizes them and send

Re: s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
I remember occasionally using 'nosetsid' files for the convenience of being able to redirect the output of 'run' and 'finish' to /dev/tty (the controlling terminal of the shell I used to run s6-svscan) so that I could see certain messages during tests in which s6-svscan had its stdout & stderr red

Re: s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
dcron crashes without it, which is why [1] exists. The log says `setpgid: Operation not permitted'. I have not investigated further. The problem happens here: https://github.com/dubiousjim/dcron/blob/master/main.c#L272 dcron assumes that it's not a session leader when run in the foregroun

s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
Hello, The next version of s6 will be a major bump, with a few long-awaited QoL changes - mainly a thorough cleanup of how s6-svscan handles signals and the various commands sent by s6-svscanctl, but also some goodies that you should like. :) One issue that has been often reported by users

Re: Expected behaviour zombie processes

2020-12-01 Thread Laurent Bercot
Hi everybody I've observed the following situation: root 490 0.0 0.0 13004 1596 ?SNov05 0:00 s6-supervise lxe root 2738 0.6 0.0 0 0 ?Zsl Nov05 251:13 [lxe] So you see a zombie process. What is the expected behaviour of s6-supervise here?

Re: How can I make the stdin of a longrun process available to other processes by writing to a file?

2020-11-20 Thread Laurent Bercot
- Using a named pipe and have `skabus-dyntee` read from it (and it dies as soon as the writer program ends). Yes, that's normal. If you want to avoid this, you need to keep the named pipe open, and that can be done via having another process opening the named pipe for writing, and not dying. T

Re: s6-rc: timeout questions

2020-11-18 Thread Laurent Bercot
Could you elaborate a little more about the state transition failures of oneshots caused by timeouts? Let's say for example the oneshot's up script times out, so the transition fails. From s6-rc's point of view the oneshot is still down. What actually happens to the process running the up script?

Re: s6-permafailon not acting as expected

2020-11-18 Thread Laurent Bercot
Sounds good. So what kind of interface changes should we expect? I mean will they require updating the service definitions, run/finish scripts, that sort of thing? (Sorry, I missed it indeed.) Nothing that drastic; service definitions will not change. They are the core of s6, and such a chang

Re: s6-rc: timeout questions

2020-11-17 Thread Laurent Bercot
- Am I correct in thinking that if a service has properly configured timeout-kill and timeout-finish, timeout-down becomes unnecessary and even undesirable as it can leave services in an undefined state limbo? I know the documentation pretty much says so, but I'm still a bit confused by the existe

Re: s6-permafailon not acting as expected

2020-11-17 Thread Laurent Bercot
Back to s6-permafailon.c: the sigset_t sigs is not initialized either... Looks like it needs a call to sigemptyset(). Gah! -_- Fixed. Thanks. -- Laurent

Re: s6-permafailon not acting as expected

2020-11-16 Thread Laurent Bercot
The service did die with exit code 0, but s6-permafail is wrong, since exit code 0 is not specified in the filter. Looking at the source code in s6-permafailon.c, it seems to me that the codes[32] bitarray is not initialized with zeroes before calling bitarray_set(n). You're probably right tha

Re: Missing "$@" at the end of the s6-linux-init invocation in basedir/bin/init script

2020-11-10 Thread Laurent Bercot
So, is that "$@" supposed to be there or not? It absolutely is! You found a bug. Thanks for the report! Now fixed in release 1.0.5.1, which I cut immediately because it is pretty critical. -- Laurent

Re: Handling environment in s6

2020-11-10 Thread Laurent Bercot
Is there anything in s6 equivalent to below of systemd? /bin/systemctl set-environment SERVICEFILE=$SERVICEFILE There is not. The process supervisor itself (s6-supervise) and the service scanner (s6-svscan) do not use the environment. Services can define their own environment in their run scr

Re: s6 in production on Ubuntu - yeah!

2020-11-04 Thread Laurent Bercot
we're proud to announce, that we have s6 in production in context of platform as a service for our customers. That's awesome! Glad it's working, and thanks for your return! Thanks Laurent for supporting us to develop the integration of s6 in ubuntu 16 and 20. We can definitly recommend to en

Re: S6-log

2020-11-04 Thread Laurent Bercot
1) does the log service of a corresponding long run service goes down when the long run service is made down using some s6 commands? (like s6-rc -d change No, because as Crest says, a producer foo depends on a consumer foo-log, not the other way around, so bringing up foo also forces foo-log

Re: socket based service bringup

2020-11-03 Thread Laurent Bercot
Is it s6-ipcserver which can be used to make an s6 socket based service equivalent .socket service in systemd? For unix-domain sockets, yes, it is. For inet-domain sockets, the equivalent is s6-tcpserver, available in the s6-networking package. -- Laurent

Re: writing s6 services

2020-10-28 Thread Laurent Bercot
1) Is there a possibility to add an ENV variable dynamically? I have a shell script which fills out some variables like IPADDRESS, SERVER etc .. which I need to use in starting a process later as part of starting a service/stopping a service. You can do whatever you want in a run script, as lo

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

2020-10-23 Thread Laurent Bercot
If I use sysvinit's PID1, is it possible for me to use s6-rc by declaring an s6-rc program in /etc/inittab? Yes. You have to tell /etc/inittab to launch a s6 supervision tree first, then s6-rc-init, then s6-rc -u change top (if "top" is the bundle containing all the services you need), as one-t

Re: External health Check Process

2020-10-23 Thread Laurent Bercot
I just miss the elegance of the solution: I personally want to model one service with one s6 service. For me it would mean thinking about a wrapper around s6 to get that. Maybe I get now the slew thing. The thing is, s6 is a *process supervision* suite, so one s6 "service" is really one long

Re: External health Check Process

2020-10-22 Thread Laurent Bercot
I know you can model a service in s6, which watches another service and kills it, so in fact the problem is solved outside of s6. But I wanted to ask to develop a feature to get a simple way to model that within s6. Usually it's good enough to call a external command with a timeout and watches exi

Re: Dependencies in S6

2020-10-21 Thread Laurent Bercot
Hi Amaresh, As long as service B depends on service A, A and B will never start in parallel; B will always start when A is ready. "A is ready" means: - if A is a oneshot: when the script has completed - if A is a longrun: * if there is a notification-fd file in the service definitio

Re: Module-load binary for S6

2020-10-09 Thread Laurent Bercot
Is the module-load binary is available for S6 to load all the kernel module ? Is there any support for volatile binds in S6 ( S6 tool for volatile bind ) Hi Amaresh, Those are operations that are totally irrelevant to s6; you should use the tools that your distribution provides you. To see

Re: s6 v2.9.2.0 compiles only disabling execline

2020-10-08 Thread Laurent Bercot
Which advantages does this design bring to the table? - Header files are execline/*.h, it's logical to put static library files in execline/*.a - /lib and /usr/lib are places where the dynamic linker looks for shared libraries. Despite sharing the name "library", static and shared libraries a

Re: s6 v2.9.2.0 compiles only disabling execline

2020-10-07 Thread Laurent Bercot
I'm building s6 from source on latest git tags and it seems to fail because it cannot link execline: ./configure --disable-execline; make # works ./configure; make # fails with message exec gcc -o s6-ftrig-listen -pipe -Wall -std=c99 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-ta

Re: s6-rc : Anomalies or normal behaviour

2020-10-06 Thread Laurent Bercot
Glad it's working for you! A significant reduction in complexity. However, and the reason for my delay in replying. Magic happened! I was now transmitting data which crossed jail barriers (from b3 "named" to b2 "named logging"). I needed to consult with one of the FreeBSD developers to e

Re: Network-online.target

2020-10-05 Thread Laurent Bercot
How to port network-online.target of systemd to S6 ? Some of the services requires network-online.target to be executed Hi Amaresh, It's basically impossible to answer this question without understanding the bigger picture. What are you trying to do? systemd relies on the existence of a net

[announce] skarnet.org October 2020 release

2020-10-04 Thread Laurent Bercot
Hello, New versions of some of the skarnet.org packages are available. This is mostly a bugfix release: bugs have been fixed in every released package. A .0 release number means that the minor has been bumped because there are also new features, in which case details are provided below. The

Re: s6-rc : Anomalies or normal behaviour

2020-10-03 Thread Laurent Bercot
Apologies, my earlier email, item 2, pointed to emptyenv as the cause of zombie processes on FreeBSD 12.2S, actually it is due to background. Ah, then everything is working as intended and there's no anomaly. background spawns a process as a direct child, so if the parent execs into a long-liv

Re: s6-rc : Anomalies or normal behaviour

2020-10-03 Thread Laurent Bercot
1. I expected to see the date in seconds since time epoch, but result is variable name # execlineb -Pc 'backtick D { date "+%s" } echo $D' $D Normal behaviour, since there's no shell to interpret $D as the contents of variable D. Try using "importas D D" before the echo: it will read the value

Re: Disable autostart of service

2020-10-01 Thread Laurent Bercot
How to disable the autostart of service during boot up in S6. touch ./down https://skarnet.org/software/s6/servicedir.html -- Laurent

Re: Understanding the syslogd-linux Service Script

2020-09-12 Thread Laurent Bercot
My particular environment uses glibc, so the old version of the example seems to work well. I omit the syslog service's log directory and the log lines appear on my container's stdout, which was my goal. If your goal is to have syslog messages appear on your container's stdout, then you should

Re: Understanding the syslogd-linux Service Script

2020-09-12 Thread Laurent Bercot
The s6-ipcserverd docs specifically state that it expects a bound and listening SOCK_STREAM socket, and this led me to the `ipc_accept()` call that the program makes. Out of curiosity, is there another s6-family program that handles SOCK_DGRAM sockets? Otherwise, I'll look in to socklog as Laur

Re: s6-man-pages update

2020-09-09 Thread Laurent Bercot
Fair enough. :-) My thought is, to help distros with packaging, i can add tags to the s6-man-pages repo to match the corresponding s6 version on which they were based. So at the completion of this current process, i could add a 2.9.2.0 tag (assuming that the current docs on skarnet.org are from

Re: s6-man-pages update

2020-09-09 Thread Laurent Bercot
Do you think it would make sense to include the man pages in tarball releases of s6 software? It would help with packaging efforts across distros, I think. Only downside would be that, since you dislike the mdoc format, any changes to the man pages would have to be coordinated and finished by othe

Re: s6-man-pages update

2020-09-09 Thread Laurent Bercot
i've now completed the linting pass for the s6 man pages. The few remaining lint issues are either commented in the sources, or aren't actually an issue in this context. As per Laurent's request, i've also added a Makefile to facilitate installation; details in the repo README: https://github

Re: Understanding the syslogd-linux Service Script

2020-09-09 Thread Laurent Bercot
One thing that I forgot to mention here is that depending on the age of the libc this might not work properly as written. Newer libc's use datagram connections for syslog and because of that you need to hand-write the entire s6-ipcserver chain (since the s6-ipcserver entrypoint doesn't currently s

Re: Update early logger logging path after remounting root as rw

2020-09-05 Thread Laurent Bercot
I'm configuring my linux to use s6-rc. It works fairly well so far. One thing I want to improve though, is that the early logger logs to /run/uncaught-logs. It's nice to have a log file during early boot and it helped my debugging easier. But it would be cool to able to change the location to a

Re: possible s6-rc redesign

2020-09-02 Thread Laurent Bercot
1. In order to provide the -sane- functionality of systemd, a system needs to use linux-only interfaces. I am absolutely not saying that cgroups, namespaces etc should be tightly integrated to a service manager/init system. Most of the work can be done on dedicated programs but they are needed if

Re: possible s6-rc redesign

2020-09-01 Thread Laurent Bercot
1. There is one **huge** disadvantage for the second option. It is not a technical one, so it may carry little weight on your final decision. There already different implementations of init systems based on s6/s6-rc, some of them successfully used on distributions. They will almost certainly have

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-09-01 Thread Laurent Bercot
* We negotiate a HTML schema your documentation can be written in, which is based on current documentation; existing HTML documentation will be converted to the schema, with minimised changes. (The structuredness of HTML helps; now you also see why knowing some Lisp is beneficial :) I'm

possible s6-rc redesign (was: [request for review] Port of s6 documentation to mdoc(7))

2020-09-01 Thread Laurent Bercot
I have only seen one new feature committed to the Git repository so far. Is it too early to ask what are you planning to change? The new feature is orthogonal - or, rather, it will be used if I end up *not* redesigning s6-rc. The trend with distributions is to make service managers reactive t

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-31 Thread Laurent Bercot
For the people who are not on #s6 and have missed the countless resurgences of this discussion, here is my position regarding documentation formats. I hope that by the end of this mail things are quite clear for everyone and I won't need to talk about this again, ever. - Doc formats seem to

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-31 Thread Laurent Bercot
Of course, you'd also have to convert the existing HTML documentation into DocBook and then generate the mdoc and HTML from that. I would understand concern over adding a dependency on a potentially heavy DocBook toolchain in order to generate the HTML. One possible way around this, though, w

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-31 Thread Laurent Bercot
Certainly. i'll do that once i've completed a linting pass. Excellent. Sure, i'd be happy to reflect any changes. And the people rejoiced and celebrated, because they would soon, finally, have s6 man pages. Ah, okay - thanks for the heads-up. Also a heads-up for people who are curre

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-30 Thread Laurent Bercot
i've spent the last couple of weeks porting the s6 documentation to mdoc(7) format: https://github.com/flexibeast/s6-man-pages Excellent, thank you. There is a lot of talk (especially on the #s6 IRC channel, but occasionally on the mailing-list too) about people wanting to have s6 man pages,

Re: Runit source version control

2020-08-17 Thread Laurent Bercot
There is a Git repository, actually: git clone http://smarden.org/git/runit.git/ Source: https://www.mail-archive.com/supervision@list.skarnet.org/msg01353.html Oh, thanks for the archeological find! I had completely forgotten about it. Sorry. -- Laurent

Re: Runit source version control

2020-08-16 Thread Laurent Bercot
I was looking into runit version history, and was wondering if there's anywhere I could access actual version control of its source. It is possible to assemble a rough history by fetching all the releases, such as done in [1], but it would be nice to have an actual complete history, if such a thin

Re: silent boot with runit

2020-07-13 Thread Laurent Bercot
I was wondering if it is possible to get a silent boot without having to modify runit itself. With systemd, the `quiet` kernel parameter acheives this. Is there anything similar for runit to prevent messages being displayed to the tty? No, runit hardcodes stdout and stderr to /dev/console. In o

Re: Following log directories

2020-06-26 Thread Laurent Bercot
When lnav implemented the support - they did exactly what sounds reasonable - they took the tool they wished to support (multilog I would presume as it mentionds cr.yp.to) and implemented the code required to produce a view of that tool's logs. To say that is a lack of understanding is rather h

Re: Following log directories

2020-06-26 Thread Laurent Bercot
I meant nothing towards s6 - but daemontools does not deal with leap seconds (or at least it cetainly looks that way from my foolish viewpoint). Indeed, the tai64nlocal program from daemontools assumes that the system clock follows TAI-10, which is a smart choice, but unfortunately not the o

Re: Following log directories

2020-06-25 Thread Laurent Bercot
I use lnav [1] for a similar concept and it parses TAI64N but it does not deal with leap seconds so my timestamps were off by like 20 seconds (or something similar). I had to modify the code to handle the leap seconds. TAI64N labels represent TAI time, which is linear; when you need a leap seco

[announce] s6-2.9.2.0

2020-06-16 Thread Laurent Bercot
Hello, s6-2.9.2.0 is out. This release is happening a lot earlier than I intended, but I made a mistake: I released s6-linux-init-1.0.4.1 (a bugfix version) and it depends on the new feature of s6-2.9.2.0. So, in order to keep the latest versions in sync, I have to release s6-2.9.2.0 now.

Re: Logging in a web server context

2020-06-13 Thread Laurent Bercot
Add-on: Jan suggested to run the service with only *one* output channel in order to benefit from the reliable pipe integration feature in s6, and do to the dispatching into different service directories at the s6-log level. I'm generally not a fan of fan-in fan-out mechanisms (pun unintended)

Re: Logging in a web server context

2020-06-13 Thread Laurent Bercot
I'm not completely sure about s6, but runsv (from runit) hands only the stdout of the ./run script to the logger, and passes the stderr out of it's own stderr. All daemontools-inspired supervision suites, including s6, follow that model, so yes, your runit example can be directly applied to s6.

Re: Readiness notification exemplars

2020-04-08 Thread Laurent Bercot
It's maybe a little heavy-handed, but is there any technical reason not to just pick an arbitrary FD, like say 3, and just always use that for a particular daemon? For a given daemon, no, there's no reason not to pick an arbitrary fd and stick to it. That's the intended usage. For a supervisor

Re: Readiness notification exemplars

2020-04-04 Thread Laurent Bercot
Yes it sounds like I completely misread the earlier emails, sorry about that. Now, looking at http://skarnet.org/software/s6/notifywhenup.html, I'm probably not reading that quite right, but it seems to tie the proposal to the 'notifcation-fd' file in the service directory, making it a bit les

Re: Readiness notification exemplars

2020-04-04 Thread Laurent Bercot
So the API would be - the thing that starts the daemon opens an fd N, the daemon accepts an argument "--ready-fd=N", daemon writes something to fd N when ready or just closes it Well it has to write something (and in the current version of the protocol it requires a newline) before closing, els

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
There are pros and cons, but you are arguing for parsing stdout for a text message and/or using pidfiles (written to an fd). I'm arguing for none of these things. I'm arguing for daemons to write a newline to a fd of their choice, which is hardly anything difficult. And hardly anything diff

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
You'd have to buy into it with a syscall that says "let me know when something listens on tcp port N". In turn s6-supervise would only do that if some config said "don't start service Y until something (which is expected to be service X) proves it's ready by listening on port N". The idea was to

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
I've been considering for several years trying to push a kernel patch which would provide a way for userspace to find out when someone starts listening on some port. Based on problems I saw long ago in the late days of upstart and early days of systemd, that seemed like it would solve a not infre

Re: Readiness notification exemplars

2020-04-01 Thread Laurent Bercot
I am curious, does anyone on this list know of examples of such daemons? I am considering creating and submitting patches for some daemon programs that I use that do *not* support this mechanism as yet, and am curious if it is as simple as it looks like it should be. - I'm trying to make it so

Re: keeping sites off

2020-03-29 Thread Laurent Bercot
The problem is that /etc/hosts does not support wildcards, so graph.facebook.com (for example) is not filtered. So, is there any solution? Should I replace dnscache by something else? (something else trustworthy and supervision-friendly) Any other setup compatible with dnscache? What I do is:

Re: runit SIGPWR support

2020-03-16 Thread Laurent Bercot
will the setting achieved by this very ioctl() call survive after exec()ing into another binary (s6-svscan/stage 2) ? Testing on s6-linux-init 1.0.4.0 shows that a SIGWINCH is sent to s6-svscan on kbrequest after s6-linux-init has performed the ioctl. So, the answer seems to be yes. Having

[announce] skarnet.org March 2020 release

2020-03-02 Thread Laurent Bercot
Hello, New versions of all the skarnet.org packages are available. This is mostly a bugfix release (there was an installation bug in some circumstances with shared libraries) but some packages, notably execline and s6, have new, useful features. The new versions are the following: skalibs-

Re: runit SIGPWR support

2020-02-24 Thread Laurent Bercot
s6-linux-init has a suitable open file descriptor. It is its standard input, before it closes it to do the slashdev test. Of course, but once the fd is closed, /dev/console should not have any impact on the process, so would a kbrequest still reach it? -- Laurent

Re: runit SIGPWR support

2020-02-24 Thread Laurent Bercot
However, I was not aware that kbrequest needed a special ioctl call before it can be accepted, so thank you for that; I'll add the call to s6-l-i. Scratch that. s6 never uses /dev/console as input: s6-l-i redirects stdin to /dev/null. (This is intentional, and is not changing.) So there is no

Re: runit SIGPWR support

2020-02-24 Thread Laurent Bercot
I purposefully did not add a default SIGWINCH handler, because sysvinit does not come with a default kbrequest in /etc/inittab. I added a SIGPWR handler that performs a regular poweroff because it sounds like a sane default for a power failure. I suppose I could add an empty SIGWINCH script by

Re: runit SIGPWR support

2020-02-24 Thread Laurent Bercot
in this case systemd compatibility can be trivially achieved, so there is no real reason to abstain from it. "systemd compatibility" makes no sense here. We are talking about runit or s6 as an init system: by definition, in that context, there is no systemd, no interaction with systemd, nothi

Re: runit SIGPWR support

2020-02-24 Thread Laurent Bercot
SIGRTMIN+3 should also be caught and processed. What piece of software sends SIGRTMIN+3 to pid 1 when you're not running systemd? -- Laurent

Re: runit SIGPWR support

2020-02-23 Thread Laurent Bercot
have you ever used s6 as process #1 on any other platform than Linux ? i bet you have not even tried to do so on any of the BSDs. The BSDs are a different kind of beast: they're much more tightly integrated than your run-of-the-mill Linux distro, and you can't easily switch out one of the compon

Re: runit SIGPWR support

2020-02-23 Thread Laurent Bercot
s6 should also catch SIGWINCH (keyboard request) and let the user handle it via a hook executable if the signal exists btw. dunno if it already does so. Both SIGPWR and SIGWINCH are caught in the latest s6 git head. Release coming whenever real life stop throwing things at me and I can act

Re: Handle ENOTDIR in pathexec_run

2020-02-19 Thread Laurent Bercot
Simply put: One wants to (largely) ignore the error if there's a problem with the directory prefix from the search path; and one wants to retain the error if there's a problem with the final pathname component, the name that is being searched for or the actual node that it names. Unfortunately

Re: runit SIGPWR support

2020-02-18 Thread Laurent Bercot
absolutely right, totally agreed. i also wondered why he refuses to add this. just catch and handle ALL possible signals, including the RT signals and leave it to the user how to react. In the github issue you linked, I explained my exact reasoning. An additional reason is that signaling init is

Re: runit SIGPWR support

2020-02-14 Thread Laurent Bercot
I don't generally question people that are this far above my weight class on a topic - but I'm pretty sure this [1] implies that pid 1 is not a requirement. Of course, you can run runsvdir directly under a different init. But that requires a bit of work: you now need to find another way to run y

Re: runit SIGPWR support

2020-02-14 Thread Laurent Bercot
That's a win-win Lengthening the supervision tree in the container and using more RAM just to save writing one line in a configuration file does not seem like a win to me. ... Besides, runit will refuse to run if it's not pid 1, so that wouldn't work. -- Laurent

Re: runit SIGPWR support

2020-02-14 Thread Laurent Bercot
You mean that adding few lines of code in one place is worse than many users of many distros must configure their containers? I can configure that myself, but I don't want every user of runit driven container to walk this path. Is it necessary? As counterintuitive as it may seem at first glance,

Re: mdevd / udevd issues, and the issue of "reverse" dependencies

2020-02-10 Thread Laurent Bercot
This has obvious benefits, at least for now. udevd does not have a readiness notification mechanism (polling for the existence of /run/udev/control surely does not count) There is no fundamental reason why it doesn't. inotify works on tmpfs; you don't need to poll for the existence of /run/udev

Re: State of skarnet.org projects

2020-02-02 Thread Laurent Bercot
Do you mean they don't like editing files and creating symlinks? Do they want a GUI interface to the service directory tree and the symlink tree? No, it's about service startup with s6-rc. They don't want to dive into the unpalatable blobs that are the set of systemd unit files or the set of ope

Re: Project funding: was State of skarnet.org projects

2020-02-02 Thread Laurent Bercot
Finding long term sponsors is a kind of sales I'm not experienced in, but I can probably get people to contribute on a one-time or intermittent basis. Do you have a contributions page that takes Paypal? I don't, for the reasons explained here: https://twitter.com/laurentbercot/status/120924704

<    1   2   3   4   5   6   7   >