libct/cg/sd: set the DeviceAllow property before DevicePolicy#4569
libct/cg/sd: set the DeviceAllow property before DevicePolicy#4569wenjianhn wants to merge 1 commit intoopencontainers:mainfrom
Conversation
Every unit created by runc need daemon reload since systemd v230. This breaks support for NVIDIA GPUs, see opencontainers#3708 (comment) Add a workaround for the below systemd issue. systemd/systemd#35710 Instead of filling the empty DeviceAllow array, a new array is created with allowed devices. Remove the comment about it, since it's misleading. Closes opencontainers#4568 Signed-off-by: Jian Wen <wenjianhn@gmail.com>
Indeed the comment ( Yet it's kind of weird how the order of entries can change the systemd behavior. Summoning @cyphar who may shed some light. |
|
Yeah, the need for this fix is incredibly strange -- systemd's whole declarative design should mean that the order of properties in a Ultimately, I don't mind taking this patch (since it's conceptually a no-op but seems to be a systemd bug we are working around) but we can't be sure that tomorrow systemd won't start having issues with this in a different way... I also am a little concerned (given that systemd seems to not apply these rules in a declarative way) that setting the
Maybe the comment is a bit poorly worded, but what I was trying to say is that we are clearing systemd's internal If you feel the comment is confusing, we can change it, but it shouldn't be removed entirely -- this behaviour from systemd is quite subtle and deserves a comment. (At least, that was my understanding of the |
|
@cyphar how about the below comment
|
|
I would prefer a link to the I think something like this would be clearer (even though it's a bit longer): |
|
Carrying this in #4612. |
Every unit created by runc need daemon reload since systemd v230. This breaks support for NVIDIA GPUs, see
#3708 (comment)
Add a workaround for the below systemd issue.
systemd/systemd#35710
Instead of filling the empty DeviceAllow array, a new array is created with allowed devices. Remove the comment about it, since it's misleading.
Closes #4568