From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2853 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Casper Ti. Vector" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: mdevd / udevd issues, and the issue of "reverse" dependencies Date: Tue, 11 Feb 2020 09:41:35 +0800 Message-ID: <20200211014135.ynx7hjwcr4szj4lt@CasperVector> References: <20200210171943.tzjltctjry2iqysx@caspervector> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="124539"; mail-complaints-to="usenet@ciao.gmane.io" To: supervision@list.skarnet.org Original-X-From: supervision-return-2442-gcsg-supervision=m.gmane-mx.org@list.skarnet.org Tue Feb 11 02:41:51 2020 Return-path: Envelope-to: gcsg-supervision@m.gmane-mx.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by ciao.gmane.io with smtp (Exim 4.92) (envelope-from ) id 1j1KYg-000WD8-9i for gcsg-supervision@m.gmane-mx.org; Tue, 11 Feb 2020 02:41:50 +0100 Original-Received: (qmail 29909 invoked by uid 89); 11 Feb 2020 01:42:09 -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 29902 invoked from network); 11 Feb 2020 01:42:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=Q6HXBq7pQdrC8NByIg1vNcuTpr4/TGq8cwNmVxXhepw=; b=u6ApzeqTaEo1TrumvQbN9u4wJIhEi/8jkgt7VOSRcU/e5RJowgZgEqcTlsBZJuDvn3 Hak0tQ4Q490yc1ijyRpAk1SqfnhKnQGNEH6PWZuNle8OIsfBH1wh787B1/48uGBAjFTb 1NLbJF5rwm+56ZuQXqByKjCWE35sJ1sXytk4VupGbgi2rx+WEx8Pv/2h3B7WdnL7/tiT AUVFEo00qwnsx5KXTzu+UWC2w5V1xMthbtFO2fSUfAtlJWfAN4+jGJ06v2ujt/7yz0A6 fbWkSLyhqYEghk61Ys7cVHmWsBcFerBbewexvelowKZZaa8DLjzjNZpOtmH4j8sTHoK4 WUpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=Q6HXBq7pQdrC8NByIg1vNcuTpr4/TGq8cwNmVxXhepw=; b=N5z8DaV1EAFkAT1H3KG9xX0I2PNPlgavx0OgssXtEot+pJh2VeWZ7ijnVOODlPtEj/ ZISglJ5YI0fvNa0RG1OGwwJWuoeNHrBwRFHwkAJcTVDtyZsMwziSM2IMgemUcXRqghNZ eBVIp9RJQ0oxgqHMm1bmw1xtqEQB+Qt4lEB2Nn//43GmQ3wH44ScaFMrczLptw4gGPph CfKA+F09ZWDCC2NvxLGXwuFjqp2i9c91EtusAXX7qeNCW1nxMJgKMiS3TSlAD0565gni xkbqHZvZ4MJwVK0FcRfQmajUnjsMt1lkrzzbYTNzPDnIHz8GXdLoA08NBRTBeB49QZAj VyXA== X-Gm-Message-State: APjAAAVk1vlI7xZbG0FAnjT0h0bMkXskGs9K9+R0J83yRox/W00mPEV9 BsJUq3Pu7Rtt/9q/KqhRvrYPTfGf X-Google-Smtp-Source: APXvYqzCpj08131/wOgSzeKG1Oj/7HEYjkUi5A0PnQhALycJ9D97FJx5IVCR3JzDNHZIumU/p4rNUg== X-Received: by 2002:a17:902:8a85:: with SMTP id p5mr16243611plo.154.1581385299168; Mon, 10 Feb 2020 17:41:39 -0800 (PST) X-Google-Original-From: "Casper Ti. Vector" Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: Xref: news.gmane.io gmane.comp.sysutils.supervision.general:2853 Archived-At: On Mon, Feb 10, 2020 at 08:02:44PM +0000, Laurent Bercot wrote: > There is no fundamental reason why it doesn't. inotify works on tmpfs; > you don't need to poll for the existence of /run/udev/control, you can > inotifywait for its appearance. Thanks. I just did not take inotify into consideration. > That is true, but I shamelessly chalk that up to the shell's > limitations: the shell can't create anonymous pipes outside of a > pipeline, and it can't make a pipeline without forking both the reader > and the writer. It's a terrible tool when you need semi-serious > plumbing work. Now I daydream again about the scsh-like mini-language I want :) > It would be quite difficult to add a "udevadm settle" to mdevd. [...] > However, depending on the kind of device you're waiting for, it may be > possible to avoid the race for that device. I needed to wait for a > network interface to appear after the coldplug, so I wrote a tool that > does just that: bcnm-waitif, in the bcnm package. (Documentation coming > soon.) So at least network interfaces are covered now. Here I am more concerned about the coldplugging of disks, so that loggers other than the catch-all can be started. I guess Alpine folks would feel at home with similar requirements in `nlplug-findfs'... > I don't understand why you'd prefer the original way. The natural and > normal way of proceeding is 1. start the daemon that processes the > uevents, 2. trigger the initial hardware scan that produces a big > batch of uevents. You don't need a temporary devd when you can just > start the real one; if the interfaces around the existing devd > implementations make it difficult to start properly, that's what should > be fixed. Frankly I was just attempting to find an excuse to introduce my idea of "reverse" dependencies. The most important (and perhaps only) advantage of the original way is that the devd has its own logger; but as we have noticed, even the bloated udevd usually plays nice with the catch-all. -- My current OpenPGP key: RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19) 7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C