Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Aug 2016 17:54:54 +0200
From:      Jan Bramkamp <crest@rlwinm.de>
To:        Warner Losh <imp@bsdimp.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Linuxisms in s6
Message-ID:  <366b32cd-057c-a5c3-d8b4-087db6cb32ff@rlwinm.de>
In-Reply-To: <CANCZdfqN4keZ0QZSTv3oa_ZdDg_CGnqPPP6ysRhW3OUaUULaYg@mail.gmail.com>
References:  <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <CAJ-Vmom1hsUxkXUwAn48E7B2zB_0TCPFiq_ud2Rhym5gvxzWDQ@mail.gmail.com> <20160825194820.GI92256@e-new.0x20.net> <CAJ-Vmo=1mLANmtOhXS9v1h5tVHt%2BjMPvge2A5Pb_zLGP7mLvAw@mail.gmail.com> <CANCZdfrH-Cx9QuXLWjnvq7En9s9KD%2B3v7zRWBO8h7ZG%2BJdp7pw@mail.gmail.com> <CAJ-VmomDbjY7Y=_gfFSP5%2B6dXs3No4%2BM9P7B-Mgrj12Wb_rc0Q@mail.gmail.com> <bed7950d-cdf1-724a-02ef-4bfa1864a053@rlwinm.de> <CANCZdfqN4keZ0QZSTv3oa_ZdDg_CGnqPPP6ysRhW3OUaUULaYg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 26/08/16 16:11, Warner Losh wrote:
> On Fri, Aug 26, 2016 at 4:44 AM, Jan Bramkamp <crest@rlwinm.de> wrote:
>> On 25/08/16 23:17, Adrian Chadd wrote:
>>>
>>> On 25 August 2016 at 14:13, Warner Losh <imp@bsdimp.com> wrote:
>>>>
>>>> On Thu, Aug 25, 2016 at 3:08 PM, Adrian Chadd <adrian@freebsd.org> wrote:
>>>>>
>>>>> On 25 August 2016 at 12:48, Lars Engels <lars.engels@0x20.net> wrote:
>>>>>>
>>>>>> On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote:
>>>>>>>
>>>>>>> On 24 August 2016 at 21:53, Jonathan de Boyne Pollard
>>>>>>> <J.deBoynePollard-newsgroups@ntlworld.com> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> http://adrianchadd.blogspot.co.uk/2016/08/freebsd-on-tiny-system-whats-missing.html?showComment=1471236502051#c1305086913155850955
>>>>>>>> , Adrian Chadd:
>>>>>>>>
>>>>>>>>> We're using s6 at work, and it works out mostly ok. Mostly once you
>>>>>>>>> get
>>>>>>>>> around the linuxisms, and the lack of sensible time code in it (its
>>>>>>>>> calculations for daemon run duration is based on system time, not
>>>>>>>>> wall
>>>>>>>>> clock, so if your box boots jan 1, 1970 then gets NTP, things are..
>>>>>>>>> hilarious), and some of the arcane bits to get logging working
>>>>>>>>> right.
>>>>>>>>>
>>>>>>>> What are these Linuxisms in s6?  s6-linux-utils and s6-linux-init
>>>>>>>> have
>>>>>>>> Linuxisms, obviously.  But what Linuxisms does s6 have?
>>>>>>>
>>>>>>>
>>>>>>> We just had a bunch of fun trying to get it to build right, and the
>>>>>>> uptime stuff really threw us.
>>>>>>>
>>>>>>> It's fine though, I found that s6 may start growing an IPC mechanism
>>>>>>> so we could possibly do a launchd/jobd style service later (ie to run
>>>>>>> things upon event changes, like ifup, ifdown, ifcreate, ifdestroy,
>>>>>>> arbitrary messages, etc) so I may try incorporating it again. :)
>>>>>>>
>>>>>>
>>>>>> Can't this be done with devd?
>>>>>
>>>>>
>>>>> Sure, but I'm looking for something more generic than just devd. Like,
>>>>> notifications about events like "default route is up" can be done by
>>>>> sniffing the rtsock, but notifications like "ntpdate has updated the
>>>>> date, we can now do crypto services" doesn't happen there right now.
>>>>
>>>>
>>>> devd was never intended to be limited to just device events from the
>>>> kernel. It has grown beyond that, and could easily grow to cope with
>>>> routing events and other notifications. No need to reinvent everything
>>>> for that.
>>>
>>>
>>> Right. I don't want to reinvent the wheel if it can be avoided.
>>
>>
>> Afaik devd is limited handling events reported by the kernel on /etc/devctl.
>> There is no way to inject events into arbitrary events from userspace into
>> devd (no ptrace hacks don't count).
>
> It would be trivial to add though, especially since the author is easy to
> work with :). It already fans out data to multiple listeners.

In that case dear author I have two requests:

   * Read messages from sequential packet sockets in addition to 
/dev/devctl.

   * Please offer a flag to keep devd from forking without spamming the 
log with debugging messages.

The first would allow userspace tools to inject messages into devd and 
the second would allow devd to run under a process supervisor without 
ugly workarounds.

--
Jan Bramkamp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?366b32cd-057c-a5c3-d8b4-087db6cb32ff>