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

IRQBALANCE_ARGS should be explicitly defined to avoid systemd warning #321

Open Camelron opened 2 months ago

Camelron commented 2 months ago

Hello,

I noticed when updating systemd that some new noise was being produced by the systemd unit:

irqbalance: "Referenced but unset environment variable evaluates to an empty string: IRQBALANCE_ARGS"

It seems like 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 this 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

I was able to squelch this warning by uncommenting IRQBALANCE_ARGS in irqbalance.env, instead setting it to the empty string. Might be worth handling upstream?

nhorman commented 2 months ago

yeah, that seems reasonable, if you would like to open a PR, I'd accept it.

Though that said, the systemd change seems somewhat...agressive. lots of services have optional environment variables...