From owner-freebsd-hackers@freebsd.org Thu Aug 25 21:17:23 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 9CC58BC65AE for ; Thu, 25 Aug 2016 21:17:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (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 637EE1608 for ; Thu, 25 Aug 2016 21:17:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x243.google.com with SMTP id e63so7321473ith.1 for ; Thu, 25 Aug 2016 14:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cUIn/dBkWlGGm3JPbPw0GK4hSRmhOI4SD2OwVXyFp3w=; b=l7IBhSzVCXBQmwXmclnlczwcihV+FY07ecZeR1S+OAmXbfjEO6U9uPcDQZ3DfrPp85 0I1yofPzj49iAagWUTtJ/b/FU0P6ONdIAOp9+s3/zlcZ3M+InxbLRzRMFsde3gxdu1ZM D9TR8k3kGqqX5YzHWJ7sND6hxyKDGpwFnqpw2s6ZfCbjrbtDtdfBvmoRFP112tsFHTTJ auNpLf8uK/HiOVdEftOXF1VJJsfKqf1NedGJ1mOxa7KpEf4NOecTsSaVxBaTyft94Fjb /npi7vrd50w3cTjTVwCjPIkRfSIOH2KotQpBK9o7j6uOOKZi1EWExCr6jYxV36ZdNjar DrAQ== 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=cUIn/dBkWlGGm3JPbPw0GK4hSRmhOI4SD2OwVXyFp3w=; b=llKgI+H2l9M3+Xn4blx20dTUkbR1Y6s9WL4c83kgLK1iQqlB5J7/HI+nZE4mYibcQM 78M1mjMvZ2DOKwKBZbjL3W+m4v81B0FccXgUIxi3SMHrryee2LTHFTTO2+yas2qhDeOa 6FWWfbKSfwRIBU5EU6mj0F57IJyw22Hy7ppO8rW+issJprnw7CyDzoVrf7puqe5iGTEW wA056oBOSppMbi0BFZBC1gsyo/pK9iOurG2asqBmRVicmbDM5exLTlGkhVI2ZW+gw+zp ZIut2AZEj6hNHNO5QyRPoTldM9Xj5MJOR22ZRQfYJpAAHs5kZea9dmBDX8yi/YayjXEi z6TQ== X-Gm-Message-State: AE9vXwPXvQlvyLUZtUcC/pdTolcuYYDNyXafD/LDf6/Ag+fDjpjASKQVWLdAZRrnwcpVB1ma9GibYACBy0Go8A== X-Received: by 10.36.242.68 with SMTP id j65mr7225720ith.25.1472159842837; Thu, 25 Aug 2016 14:17:22 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Thu, 25 Aug 2016 14:17:21 -0700 (PDT) In-Reply-To: References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Adrian Chadd Date: Thu, 25 Aug 2016 14:17:21 -0700 X-Google-Sender-Auth: 9vw88eCSlq6Wfn_QWbN80t0P48w Message-ID: Subject: Re: Linuxisms in s6 To: Warner Losh 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:17:23 -0000 On 25 August 2016 at 14:13, Warner Losh wrote: > 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. Right. I don't want to reinvent the wheel if it can be avoided. But there are other things that want to produce and consume events. eg, openvpn bringing up a VPN triggering possible ipfw rule changes. Or openvpn coming down triggering other ipfw rule changes. > 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... Well, ideally the jobd would sit on the message bus and take commands to do things. Like dbus and udevd did in linux, before systemd steamrolled over them. But then if I suggest we need a message bus daemon up and going so arbitrary system pieces could talk to other system pieces, I'll likely be shouted at. But not by jkh. He'd likely be "YOURE ONLY JUST GETTING AROUND TO THIS NOW?" and laugh a lot. (jkh - please come to the next bafug so we can talk shop..) -a