From owner-freebsd-hackers@freebsd.org Thu Aug 25 21:13:20 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0727ABC6496 for ; Thu, 25 Aug 2016 21:13:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3F5F11D3 for ; Thu, 25 Aug 2016 21:13:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id x131so296330418ite.0 for ; Thu, 25 Aug 2016 14:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=79w5fCyUfm4wF8ml5pMeIpg6cubu9R1GnYxM5Pya1tw=; b=XjF744g09RuRydpmN/C2+ZXE2xupHkbUDcZpaRv7cbYYLMzlABFOy00U2K/uHTUUXC tjkAHo2bEKAx10W/F1GD7Kj72TWOf7ZpSUFEKfeVA21kHIRv+aR4iDWJ4wxs1L/Emm0x DKxW9JrTGQYtaryKsxUabV0qpDEZiijES3+V9K28V/IXASCeh7kuQM11gQ3snC8VkZHi BwYOSihGPvBHYkp8Ei7yufWOkIZdiFMgsWf1uSwO/ous7PSD+KYT0/MwcWDsvI8MEoFK s7IIAFpxvEkb/+Jvunk6gbL2hN47QIcpsCydBcYtsYYx/Fq9/vhLKz70it0yH09dMlXm WU+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=79w5fCyUfm4wF8ml5pMeIpg6cubu9R1GnYxM5Pya1tw=; b=UK4RX5kc4vITw5QQrUHHCP0A6PMpx/0cwiIKFGRTtcHZHPAgtiahOdHeU73NWE3Z/A lB72JpdDzQPLdAYRnBca2GjNfgWo9DvIdg58mU5sT8rPxmGqap3JHJBf/fvhvKkYgmr9 fj3xVGYsNnzhnWlLMJu6cX8Qgz17Un28r+o62zQKkL7pHWq643IYUwlvQUsI434rl4QX XMe0Nqlq1/AgVXKOA59caxZZPnqlCHXBTmNZ/FDw4cQmsWGHYme6IvK6bednwv8WmnbQ JJXj1pmD83pvvUl+TZpWLbZnXkuKnxZuEK6oXT5nBc0ZaFx8bOnwgkK8Kb6yPXzE3rH8 XXOA== X-Gm-Message-State: AE9vXwMranzybp1VuiCmQaTFEew+pBGphb/HHGsyU7Iw1/rMfFo+8KjvNiyAjAj0J2GM1R/dJ9U1Z1j9YTF6fg== X-Received: by 10.107.21.134 with SMTP id 128mr12247333iov.59.1472159599275; Thu, 25 Aug 2016 14:13:19 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Thu, 25 Aug 2016 14:13:18 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Warner Losh Date: Thu, 25 Aug 2016 15:13:18 -0600 X-Google-Sender-Auth: Ak6UPw4CyJR37RxmiZRD9Vu4MIM Message-ID: Subject: Re: Linuxisms in s6 To: Adrian Chadd Cc: Lars Engels , Supervision , Jonathan de Boyne Pollard , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2016 21:13:20 -0000 On Thu, Aug 25, 2016 at 3:08 PM, Adrian Chadd wrote: > On 25 August 2016 at 12:48, Lars Engels 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 >>> 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. What devd doesn't do is launchd / job control. That would be a whole new kettle of fish for it, and one for which it may be ill suited. Though viewed in the right way, it's all just a series of notifications: This service is up, this is down, user wants to start this other one, etc, so maybe it wouldn't so bad... Warner