Re: s6-rc-update initial findings

From: Colin Booth <>
Date: Wed, 16 Sep 2015 22:43:37 -0700

On Wed, Sep 16, 2015 at 3:16 PM, Laurent Bercot <> wrote:
> That's not clever, that's incredibly pedestrian, and ugly because
> it's just not possible to do it 100% safely. As much as I love Unix,
> working with the Unix filesystem primitives makes me want to tear my
> hair out. They're weaker than the Ashley Madison security. They suck
> more d*ck than a gay nightclub on a Saturday night. The only saving
> grace, the one call that makes Unix filesystems usable, is rename(),
> and where is that beauty declared? stdio.h. Ugh!
Clever is allowed to also be gross. Specifically it's a kind of a nice
trick to be able to move the control pipe around without breaking
s6-supervise, regardless of how shitty the filesystem primitives are.
> So yeah, service directories are moved live, and it's not pretty.
> It will work, probably all the time, but there's still a tiny window
> where if the service dies and the ./finish script uses data in ./data
> or ./env, it won't find it. It's generally not a disaster to have
> a ./finish script fail,I've reduced the window as much as I could,
> and you have to be incredibly unlucky to hit it, but it's still there
> and I don't like it, and I can't do any better because Unix primitives.
I thought moves (directory or otherwise) were atomic.
>> Things it didn't do right:
>> Put the links back into /run/service
> This should now be fixed.
Yup, works. Shuffling live directories no longer purges everything
from my s6-svscan root.
>> There's a documentation oversight that should get corrected at some
>> point. The docs should mention that this doesn't touch the original
>> compiled database and that it's on the user to update their call to
>> s6-rc-init before the next reboot.
> This too.
Thanks. It's not something that should need to be written, but you
know that someone will make sweeping changes to their system, update
them, restart, and get super pissed on the mailing list. At least this
way they are going to be pissed because they didn't read the docs, not
because they made an assumption.
> On to more testing. Ugh. On to more procrastinating.
Good luck!

"If the doors of perception were cleansed every thing would appear to
man as it is, infinite. For man has closed himself up, till he sees
all things thru' narrow chinks of his cavern."
  --  William Blake
Received on Thu Sep 17 2015 - 05:43:37 UTC

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