From owner-freebsd-hackers@freebsd.org Sat Feb 9 23:35:10 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 840BF14D1EEA for ; Sat, 9 Feb 2019 23:35:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 95846880BB; Sat, 9 Feb 2019 23:35:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id sc9BgarsanBo4sc9CgrKeo; Sat, 09 Feb 2019 16:35:01 -0700 X-Authority-Analysis: v=2.3 cv=J8fUEzvS c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=CFTnQlWoA9kA:10 a=pGLkceISAAAA:8 a=heTAvR70AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=CgU0YTBytRdL6FccJDAA:9 a=wPNLvfGTeEIA:10 a=lJIPGLpbTLIA:10 a=UrJ2pwYPfabwj1STkZPu:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 29951471; Sat, 9 Feb 2019 15:34:57 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x19NYu7Q036562; Sat, 9 Feb 2019 15:34:56 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x19NYtZe036559; Sat, 9 Feb 2019 15:34:55 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201902092334.x19NYtZe036559@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Enji Cooper cc: Wojciech Puchar , Sidju , "freebsd-hackers@freebsd.org" , Conrad Meyer Subject: Re: nosh init system In-Reply-To: Message from Enji Cooper of "Sat, 09 Feb 2019 09:55:17 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 09 Feb 2019 15:34:55 -0800 X-CMAE-Envelope: MS4wfBbV5nsHhJYUA7N0o5x+IxVcLuGOaGEpIxQHW6K/amLxVR20tDWv0JfR0Nyszil4cIofNaqxd3o2NeRRcx3lsKh7xYMEYubCTEjMAtkLeTx7D7T47MNR ENFoF+yPckTF+7E5urh44F4aXcT9yHjpgTsXaLZ73w1csFA/7ywlGCFMUbQk5K/sQC0/DgKSa6PMI/I9Q1BsTXZ95UUzuF0h9Diu9qneSfdM22L2Ho57CEkL HUOsROvXG3swsZKnyUNe7wdmH0S8BxgMknk//qohi1DLvytWxMLBf0UT2B5Mq5LE X-Rspamd-Queue-Id: 95846880BB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.59 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; MX_GOOD(-0.01)[spqr.komquats.com]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; IP_SCORE(-1.92)[ip: (-4.97), ipnet: 64.59.128.0/20(-2.54), asn: 6327(-1.98), country: CA(-0.09)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; RCVD_COUNT_FIVE(0.00)[5]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1]; FROM_HAS_DN(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 23:35:10 -0000 In message , Enji Cooper writes : > On Feb 9, 2019, at 09:32, Wojciech Puchar wrote: > > >> pid 2 and reap zombies. We're missing a half-decent service > >> management system. On Linux, systemd performs both roles. On > >> FreeBSD, init(8) serves one role, and rc(8) is a tiny subset of a real > >> service management system like systemd. > > > > systemd is overcomplex crap. And a reason many people migrated to FreeBSD f > rom linux. > > > >> > >> (I think the piece we would consider replacing or supplementing would > >> be rc(8). Part of that might be migrating some responsibilities from > >> pid 1 to pid 2, such as spawning gettys. I don't hold strong opinions > >> about that.) > > > > this make sense but with spawning gettys left to init. > > > > > > what do you want to improve in rc? starting services in parallel doesn't se > em to be major problem to make i think. > > Starting and stopping services based on logical events and “run levels”, > apart from what devd handles with hardware events is what comes to mind for m > e. > > rc(8) is also incredibly fragile when it comes to starting or stopping servic > es beyond first boot, or when dealing with “optional” services, like nis/ > yp. I tried to clean this up a few years ago, but it’s not close to my idea > l design (it feels like a bubblegum and duct tape solution). I've been using NIS on FreeBSD for a couple of decades and still using it on my network. Except for one bad patch a few years ago it's been 100% solid. There are no startup or shutdown issues. I don't see what's so "incredibly fragile" about rc(8). That's not to say there aren't better solutions, like SMF. Where rc(8) falls down is any port or a customer's (user of FreeBSD) rc script could fail hosing the boot or worse hosing the system*. Where a solution like SMF solves the problem is that should a service which other services depend on fail, only that branch of the startup tree would fail. In that scenario, if a service fails but sshd start, a sysadmin would still be able to login remotely to resolve the problem. So in this regard rc(8) is at a disadvantage. We could address the above paragraph by starting sshd earlier during boot thereby allowing the opportunity to fix remotely. Regarding SMF, it could be implemented by rc(8) invoking smf in similar fashion as Solaris does -- Solaris invokes it through inittab(5) -- or it could through a special yet to be determined entry in ttys(5). The Solaris approach is init(8)'s sole job, through the inittab(5) entry, is to restart smf, while smf does the rest. I prefer not to discuss implementation details right now, it's premature. * Incredibly stupid people can hose SMF too. It is more complex. OTOH that complexity might scare the uninitiated from attempting something dumb. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.