From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 39D98138BF3 for ; Tue, 18 Feb 2014 15:09:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F458E0BAF; Tue, 18 Feb 2014 15:09:05 +0000 (UTC) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D299CE0B07 for ; Tue, 18 Feb 2014 15:09:03 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id pv20so12205514lab.2 for ; Tue, 18 Feb 2014 07:09:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:reply-to :mime-version:content-type; bh=K4KlacGFloTbVSn2/qAnYADjcu0m6NvGSPQHAG/P5R0=; b=NCLNcYas5F4l91AF9dnvluIw00bN8ERlKyFF1VtGnk0fXHXYStzipDUqnD58RuCQCF kZfZgVIDCFWiGdjkukCynIRsptj7sYcR0zjPcUhxcEALTuY/0AXzqPUw+ZhPb4c91/tL cjGSvhkMGM4c5H4MkM0DQZgU3AolwQMErFv9+3Vl5jpfNpEopGMvofzLMI4ArdPEokZF fr++TPTxjBhvCMNYWeifwDygMLg2GCvpx0CSbbaJn1EuXnem3fLtODNyZcC1co3q/58Q N7M4XSEfGyCAjbTwUiNOPfgdHvzgX+mNdiZc4kHAobnRVp4TOYYBL7Shg9rEsKBvGnCW TIcw== X-Received: by 10.112.90.5 with SMTP id bs5mr1029647lbb.66.1392736140790; Tue, 18 Feb 2014 07:09:00 -0800 (PST) Received: from localhost ([85.143.114.129]) by mx.google.com with ESMTPSA id gb8sm23945678lbc.13.2014.02.18.07.08.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Feb 2014 07:08:59 -0800 (PST) Date: Tue, 18 Feb 2014 19:08:35 +0400 From: Andrew Savchenko To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Debian just voted in systemd for default init system in jessie Message-Id: <20140218190835.88f0c3e6a185bd68f358b975@gmail.com> In-Reply-To: References: <52FF84CE.2050301@libertytrek.org> <52FF9D58.3000608@libertytrek.org> <201402152023.10543.michaelkintzios@gmail.com> <5300DD51.5060207@libertytrek.org> <5300EA3A.5020801@gmail.com> <24165346-F62B-4CD4-BB43-0D5A68BE0004@stellar.eclipse.co.uk> <530268AE.3050603@gmail.com> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.18; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA512"; boundary="Signature=_Tue__18_Feb_2014_19_08_35_+0400_+uMdcddOOKL4yH=T" X-Archives-Salt: bb7d801a-89bd-4b0f-8512-3e71b6d60d37 X-Archives-Hash: 4d12dfb609f6d7641ef5e289f22bcdc1 --Signature=_Tue__18_Feb_2014_19_08_35_+0400_+uMdcddOOKL4yH=T Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 18 Feb 2014 11:46:14 +0800 Mark David Dumlao wrote: > init scripts, in general, are ad-hoc, quirky, and incomplete > implementations of service supervision in bash. They're reliable so > long as the daemon can be relied on to advertise one or all of its > processes in a pid file. Thing is, there are way too many different > possible setups for services for that to be the case. In the average > case watching a PID file works. And since most people use "average > software", most people don't care. That's ok. >=20 > Thing is an init isn't just for "most people". It's for "all people". > It should be reliable for all services. >=20 > I used to use cherokee. Fast, light, awesome, and with a web admin. > The init script always failed me. /etc/init.d/cherokee stop was not a > guaranteed stop to all forked cherokee processes - the parent pid > dies, but some forked process or something, usually related to > rrdtool, doesn't. Or the parent does exit and erases the pid file but > it returns control immediately and its not yet done exiting. Something > like that or other. Point is, I've several times had to ps aux|grep > ... kill; zap; start - on production servers. >=20 > Was it cherokee's fault? Maybe. But the init script should have told > me that. Or even better, the init script should have done its job and > terminted the processes. See, pid files are just a proxy, they don't > work for all services and all setups. Maybe a process crashes before > it kills its forks. Maybe the server has a restart feature that fails > to write the pid file because the init script created it as root but > the daemon relinquished privileges. Maybe there's a bug somewhere. > Maybe the pid file gets overwritten accidentally. Maybe the pid file > is stale because of a power failure. Point is you don't know until the > service restart which should "just take a sec" costs you maybe an hour > or two in billable time. >=20 > With supervised cgroups that's not a problem. Because all process > forks are grouped together, it doesn't matter if there's a pid file or > not. When its kill time, the daemon and all forks and children go > down. Because they're dynamically created on start, they don't get > stale or point to the wrong process. Sounds to me like the right tool > for the job. I agree with you. But openrc has cgroups support now for each service started. Thus systemd is not the only solution solving problem you described above. Best regards, Andrew Savchenko --Signature=_Tue__18_Feb_2014_19_08_35_+0400_+uMdcddOOKL4yH=T Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQIcBAEBCgAGBQJTA3eJAAoJEFZZU7lTcnVs/RAQAIumce/+8Dq26RCkFPAylWju WDUXFgWMjI0WOnqirDUXyaA/nABK41CD86iGOnu082X88r1pB/X0NY+Yxm1NudCH UguUoYFzGlhbCyXylPa7qe0zp4C+HKuQ/fhNFePaFbgrmCnLdcygKF+C07dgnXeA xcadqCt9MTssqzg7REIaWVzn/HKi3klLZhzEgy7HcUFC4earCnvABXyH40Zn5P6Z QA3PJ/7NGr7olYsSC7xreFFf2Qo9V4k87LKGmEtqGsO6TyEvDOMQk4Ych/w05O8v ZbPKWjxNj1IiEd0++kpIuAb1II6WN1cO/v7x43MHX3XwixVTUqbO1X7VnzwQRp1h qCfO4e1ENxnACYhB9u+FilkPob09GisOpRv424wSTSY0a6sHEoTyNiSodoNuXtxe Ho0z1oFsDi78ipcAnuQSx28UUyZEouCmAZOmSEg4BYZ3D4Wuq7habf4sibjuUycY iakKAkSMqgi5TZSAO/27C2Jkz/PQd1ZX/rE+b0IIfuBrtYUOksCEHKgzLXR3EK2G uFPb8jOKpRfs+n6L/EbiZ47m0i4VBj6i7O9xKfs1YUbhJgpn9MHUDIinjOR8PIs+ b9jlZ3ref4InzPv72clg/cUhVD9lSKcoKnCqFN1ndNPFCQwThNxby/aTwG6yOEl9 2NYieevZ7J9vKZvRBUxZ =mCBX -----END PGP SIGNATURE----- --Signature=_Tue__18_Feb_2014_19_08_35_+0400_+uMdcddOOKL4yH=T--