From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Burgess Date: Wed, 03 Aug 2011 09:09:26 +0000 Subject: Re: udevadm: trigger =?UTF-8?B?LS10eXBlPWZhaWxlZCBkZXByZWNhdGlvbg==?= Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Wed, 3 Aug 2011 01:38:45 +0200, Kay Sievers wrote: > On Wed, Aug 3, 2011 at 00:01, Matthew Burgess > wrote: >> So, Udev-173 added a log message warning us that 'udevadm trigger >> --type=FAiled' is deprecated, which over in LFS we use in a 'udev_retry' >> bootscript in an attempt to retry failed events, for example those > caused by >> slow device initialization. >=20 > What is a 'slow' device? RUN+=3D needs to be explicitly marked to 'fail' > events. What kind of rules do you exactly have there that tells RUN+> to = mark it as failed if needed? Good question. We try to stick as closely as possible to upstream's rules. We only create 2 rules files in addition to those installed by your releases which are: --- Begin 55-lfs.rules --- # /etc/udev/rules.d/55-lfs.rules: Rule definitions for LFS. # Core kernel devices # This causes the system clock to be set as soon as /dev/rtc becomes availa= ble. SUBSYSTEM=3D"rtc", ACTION=3D"add", MODE=3D"0644", RUN+=3D"/etc/rc.d/init.d/= setclock start" KERNEL=3D"rtc", ACTION=3D"add", MODE=3D"0644", RUN+=3D"/etc/rc.d/init.d/set= clock start" # Comms devices KERNEL=3D"ippp[0-9]*", GROUP=3D"dialout" KERNEL=3D"isdn[0-9]*", GROUP=3D"dialout" KERNEL=3D"isdnctrl[0-9]*", GROUP=3D"dialout" KERNEL=3D"dcbri[0-9]*", GROUP=3D"dialout" --- End 55-lfs.rules --- and 70-persistent-net.rules which is generated by following the instructions at http://www.linuxfromscratch.org/lfs/view/development/chapter07/network.h= tml. I have a suspicion that the rtc rule could fail if a user had /var as a sep= arate partition, and /dev/rtc was created before the /var partition had been moun= ted (the setclock script calls out to hwclock, which requires /var/lib/hwclock/= adjtime). Our initscripts in question are S10udev and S40mountfs, so I guess this is theoretically possible. Do you agree with the above analysis, and if so what do I need to do to fix= this? I could just remove the RUN+=3D from the rtc rule, and have setclock be an = initscript that starts after S40mountfs. I think we used to have things configured th= is way, but moved to the RUN+=3D method a while ago. Aside from that issue, is there a way to ask udev to print all failed event= s, as opposed to retrying them. As LFS is a fairly minimal system, I'm concerned that us= ers may end up creating or installing bootscripts that have similar issues, so having a wa= y of printing failed events would be a useful first step in diagnosing their issues. Thanks, Matt.