[systemd-devel] Unset option in drop-in override

Dominick C. Pastore dominickpastore at dcpx.org
Wed Jun 19 02:05:16 UTC 2019


Hello,

I think this is an easy question but I can't find the answer anywhere.

I'm having some trouble with a unit file drop-in overrride. I have a package that uses some options that are incompatible with the LXD container I'm running it in. Specifically, the following two options:

[Service]
IOSchedulingClass=realtime
CPUSchedulingPolicy=rr

So I used "systemd edit" to try and override these using the following:

[Service]
IOSchedulingClass=
CPUSchedulingPolicy=

The problem is, then I get the messages "Failed to parse IO scheduling class, ignoring: " and "Failed to parse CPU scheduling policy, ignoring: " in the journal.

The systemd.exec(5) man page does suggest that this is a reasonable thing to try to do:

> If the empty string is assigned to this option, all prior assignments to both IOSchedulingClass= and IOSchedulingPriority= have no effect.

And the systemd.unit(5) man page suggests that this would be the correct syntax to do it, since it has examples where list options are cleared like that. (But just in case, I also tried setting them to empty quotes, e.g. IOSchedulingClass="" with similar results.)

So I'm a little stuck. Am I doing this wrong? Is unsetting specific options in a drop-in actually possible? I know I can also override the entire file, but I'd like to avoid masking any future updates to the packaged unit file if I can.

Thanks,
Dominick


More information about the systemd-devel mailing list