Skip to content

Unit dropin load order surprising #2103

@fsateler

Description

@fsateler

I just found out the following:

% systemctl cat dropin 
# /lib/systemd/system/dropin.service
[Unit]
Description=dropin

[Service]
Type=oneshot
ExecStart=/bin/true

# /lib/systemd/system/dropin.service.d/99-override.conf
[Unit]
After=network-online.target
% sudo systemctl edit --full dropin
# save with the same contents
% systemctl show -pAfter dropin
After=basic.target system.slice sysinit.target network-online.target systemd-journald.socket

In short, a vendor dropin is not overriden by a full admin unit. I find this very unintuitive. So, either systemd should be fixed to not load dropins from later in the search path after a unit has been found, or this should be documented in the systemd.unit manpage. If the latter, then having systemctl edit --full automatically mask all dropins would be great as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions