forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue: systemctl daemon-reload would sporadically cause udev hand…
…ler fail (sonic-net#15253) (sonic-net#15959) A workaround to back port the fix for a systemd issue. The systemd issue: systemd/systemd#24668 The systemd PR to fix the issue: https://github.com/systemd/systemd/pull/24673/files The formal solution should upgrade systemd to a version that contains the fix. But, systemd is a very basic service, upgrading systemd requires heavy test.
- Loading branch information
1 parent
be818f1
commit 611449d
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...e_config/systemd/systemd-udevd/fix-udev-rule-may-fail-if-daemon-reload-command-runs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ------------------------------------------------------------------- | ||
# Patch for /lib/systemd/system/systemd-udevd.service | ||
# Fix issue: The udev rule may fail to be executed because the | ||
# daemon-reload command is executed in parallel | ||
# Github issue: https://github.com/systemd/systemd/issues/24668 | ||
# Github PR: https://github.com/systemd/systemd/pull/24673 | ||
# ------------------------------------------------------------------- | ||
@@ -16,8 +16,6 @@ | ||
ConditionPathIsReadWrite=/sys | ||
|
||
[Service] | ||
-DeviceAllow=block-* rwm | ||
-DeviceAllow=char-* rwm | ||
Type=notify | ||
# Note that udev will reset the value internally for its workers | ||
OOMScoreAdjust=-1000 | ||
@@ -29,7 +27,6 @@ | ||
KillMode=mixed | ||
TasksMax=infinity | ||
PrivateMounts=yes | ||
-ProtectClock=yes | ||
ProtectHostname=yes | ||
MemoryDenyWriteExecute=yes | ||
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 |