-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
udev: modernize code and propagate critical errors #12700
udev: modernize code and propagate critical errors #12700
Conversation
2777705
to
d46e716
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general. One pattern that I think should be improved is the if (r < 0 && r != -ENOENT) ... if (r == -ENOENT)
checks (see one of the comments below). I think it'd be nice to standarize on a single form that uses if ... else if ...
to avoid repeated checks of the same condition.
I think we should merge this with some minor changes, and work on follow-up cleanups later.
Is the first patch here by mistake? I see it also in #12699. |
Seems so. Sorry. Will drop. |
d46e716
to
fc63ba8
Compare
fc63ba8
to
5ac9ba5
Compare
@keszybz Thank you for your review. I've force-pushed an updated version. Most of your comments are addressed. Exceptions are |
5ac9ba5
to
cb85e7b
Compare
@mrc0mmand Is it possible to obtain udevd's logs during running systemd-networkd-tests.py? It seems some lines are ignored... |
@yuwata will the Arch VM's journal help? https://ci.centos.org/job/systemd-pr-build/6666/artifact//systemd-centos-ci/artifacts_3_e2Yh/testsuite-logs-upstream.ner/journald-testsuite_PASS.log (it's the journal from the Arch KVM machine, not from the QEMU VMs for https://ci.centos.org/job/systemd-pr-build/6666/artifact//systemd-centos-ci/index.html Also, nice build ID :-) |
Thanks!
Haha :-) |
Hmm, the warnings seem irrelevant... And my laptop works fine with this PR... |
cb85e7b
to
5d9f5ff
Compare
Hmm. @mrc0mmand Could you enable debug logging of |
Hmm...
|
Ah, |
e72c444
to
e5de67d
Compare
This does the following: - rename enum udev_builtin_cmd -> UdevBuiltinCmd - rename struct udev_builtin -> UdevBuiltin - move type definitions to udev-rules.h - move prototypes of functions defined in udev-rules.c to udev-rules.h - drop to use strbuf - propagate critical errors in applying rules, - drop limitation for number of tokens per line.
7eed9bb
to
fd3eb83
Compare
Also, this makes the function refuse invalid formatting and propagate error in substituing variable.
fd3eb83
to
d7aee41
Compare
I force-pushed a revised version. I hope all CIs will be green. PTAL. |
Yey! All green now! |
LGTM. |
This broke dracut in legacy network mode. |
The original behavior of $env{INTERFACE} was undocumented and changed in the recent udev versions, breaking the ability to bring up networking reliably. Switching to $name directive should fix this issue. Related links: - systemd/systemd#12700 (udev PR) - systemd/systemd#12291 (related udev issue) - systemd/systemd#14935 (this issue, udev side) - dracutdevs#732 (this issue, dracut side) Fixes: dracutdevs#732
The original behavior of $env{INTERFACE} was undocumented and changed in the recent udev versions, breaking the ability to bring up networking reliably. Switching to $name directive should fix this issue. Related links: - systemd/systemd#12700 (udev PR) - systemd/systemd#12291 (related udev issue) - systemd/systemd#14935 (this issue, udev side) - dracutdevs#732 (this issue, dracut side) Fixes: dracutdevs#732
The original behavior of $env{INTERFACE} was undocumented and changed in the recent udev versions, breaking the ability to bring up networking reliably. Switching to $name directive should fix this issue. Related links: - systemd/systemd#12700 (udev PR) - systemd/systemd#12291 (related udev issue) - systemd/systemd#14935 (this issue, udev side) - #732 (this issue, dracut side) Fixes: #732 (cherry picked from commit a8ba1c4)
Replaces #12416. Closes #12291.
@keszybz I cannot split the 3rd commit. Sorry. Could you take a look?