Irqbalance / irqbalance

The irqbalance source tree - The new official site for irqbalance
http://irqbalance.github.io/irqbalance/
GNU General Public License v2.0
576 stars 139 forks source link

Define IRQBALANCE_ARGS as empty string to squelch systemd warning #322

Closed Camelron closed 2 weeks ago

Camelron commented 2 months ago

Systemd now logs when a variable expanded in a unit file is not explicitly defined. Thus, in the systemd service when we expand the variable a warning is logged https://github.com/Irqbalance/irqbalance/blob/master/misc/irqbalance.service#L11. This behavior was introduced to systemd in versions 254+ https://github.com/systemd/systemd-stable/commit/f331434d13488425ccd8485327085d15f8f92aea

Squelch this warning by uncommenting IRQBALANCE_ARGS in irqbalance.env, instead setting it to the empty string.

Addresses https://github.com/Irqbalance/irqbalance/issues/321

Camelron commented 2 months ago

Should we also do the same with all of the other IRQBALANCE_* variables in irqbalance.env?

nhorman commented 2 months ago

I guess it wouldn't hurt, but its really making me question the validity of what systemd is doing here. There are many cases in which environment variables are optional - most code in fact does the check:

var = getnev("ENVVAR");
if (!var)
   var = <default value>

So I really don't see how systemd can consider it an error. Informational, or a warning perhaps, but certainly not an error.

I've opened https://github.com/systemd/systemd-stable/issues/425 to enquire about this