From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2619 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jeff Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: emergency IPC with SysV message queues Date: Sun, 19 May 2019 22:26:36 +0200 Message-ID: <20190519202636.GH4861@panda> References: <20190509071019.GE4017@panda> <7911341557578305@sas1-23a37bc8251c.qloud-c.yandex.net> <856441558019755@sas1-cd55e40a6ba0.qloud-c.yandex.net> <20190519175450.GB4861@panda> Reply-To: sysinit@yandex.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="255299"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.0 (2018-05-17) To: supervision@List.skarnet.org Original-X-From: supervision-return-2209-gcsg-supervision=m.gmane.org@list.skarnet.org Sun May 19 22:27:08 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hSSOh-0014Ce-V1 for gcsg-supervision@m.gmane.org; Sun, 19 May 2019 22:27:08 +0200 Original-Received: (qmail 21278 invoked by uid 89); 19 May 2019 20:27:33 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Original-Received: (qmail 21271 invoked from network); 19 May 2019 20:27:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1558297599; bh=mcut1wyBA8smiRDVk96QMr2+NpsQJupbr5XKVFXP1J8=; h=In-Reply-To:Reply-To:Subject:To:From:References:Date:Message-ID; b=Q0MIkK8+ILF2gDoMaWoyA++RXmcUXxJMUaCFcou4ePEjss9CeepLntjth3Pcnu9BN RSiHS7GQjk7jp+4JitYg0vAHNKcxlqwxswipGCkg4IqQb5dvQcBt7mTvDVNysiRjYh OGmdN4YrlnKlMjIhi8w+A3tiD0mSd/jWjv1cug7U= Authentication-Results: mxback19j.mail.yandex.net; dkim=pass header.i=@yandex.com Content-Disposition: inline In-Reply-To: <20190519175450.GB4861@panda> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2619 Archived-At: > What details need to be conveyed other than "stand up", "sit down", > and "roll over" (boot, sigpwr, sigint)? depends on what you plan to do. for a minimal init handling SIGCHLD (that is an interesting point indeed. is it really necessary ? i still have to find out. would be nice if one could run without it though.) and (Linux) SIG(INT,WINCH) should be sufficient. in the case of the latter 2 it would be enough to run an external executable to notify their arrival and let the admin decide what to do about them. maybe SIGPWR is of relevance too. that suffices for init itself. a supervisor needs more information, such as: start this service, stop that one, disable another, restart one, signal another one and so on, depends on what capabilities the supervisor provides. and this has to be encoded in such a protocol that uses 2 ipc mechanisms: sysv ipc and a specific signal (SIGIO comes to mind) to notify the daemon (maybe a third one: (abstract) sockets). > Abstract namespace sockets have two shortcomings: > > * not portable beyond linux true, but i would use them where available and standard unix sockets elsewhere. > * need to use access restrictions don't you use credentials anyway ? AFAIK all the BSDs and Solaris have them too. > * shared across different mount namespaces; > one needs a new network namespace for different instances so you need to care for that namespaces too. this can be an advantage since it is decoupled from mount namespaces though. i did not consider namespaces at all since i follow the systemd development approach: works on my laptop, hence works everywhere. :-( > I am considering dropping it for a socket in /run in my supervisor. why not ? i would use standard unix sockets for everything with PID > 1 too, but in the process #1 situation i guess they provide an advantage.