Bug#951257: udevadm: please exit nonzero with "Running in chroot, ignoring request." when /proc is not mounted

Michael Biebl biebl at debian.org
Fri Feb 14 11:57:56 GMT 2020


Am 14.02.20 um 12:05 schrieb Andreas Henriksson:
> Hello,
> 
> On Thu, Feb 13, 2020 at 02:21:00PM +0100, Michael Biebl wrote:
>> Am 13.02.20 um 14:03 schrieb Trent W. Buck:
> [...]
>>>     78root at DESKTOP-P00TKMM:/# udevadm trigger
>>>     Failed to scan devices: No such file or directory
>>
>> You should only get this error message if /sys is not mounted.
>> I assume your chroot has neither /sys nor /proc mounted.
>>
>>
>> systemd-udevd.service has
>> ConditionPathIsReadWrite=/sys
>>
>> You could try to convince upstream to add a similar check to "udevadm
>> trigger"
>>
> 
> Just wanted to chime in here and say that another way at looking at this
> is to say that calling udevadm (and expecting it to exit with success)
> when udev is not running could possibly be considered the bug.
> 
> (Or in other words, it feels wrong to me to expect udevadm to exit with
> success when it's failing to do the job it was asked to do.)
> 
> From a simple codesearch.debian.net search I can see there are atleast
> some packages which tries to only conditionally run udevadm, eg. via
> 'pidof udevd && udevadm ...' and similar in their maintainer scripts.

The question is, whether such a check should be centralized or not.
systemd-udev-trigger.service also has
ConditionPathIsReadWrite=/sys

We could update all maintainer scripts to wrap that udevadm call into a
if [ -w /sys ]; then ... fi
but it doesn't appear to me as the worst idea to move this check
directly into udevadm and let "udevadm trigger" log a warning/notice and
exit 0 if /sys is not writeable.

Michael
So




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20200214/293526dc/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list