Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define IRQBALANCE_ARGS as empty string to squelch systemd warning #322

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

Camelron
Copy link
Contributor

@Camelron Camelron commented Jul 11, 2024

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+ systemd/systemd-stable@f331434

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

Addresses #321

@Camelron
Copy link
Contributor Author

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

@nhorman
Copy link
Member

nhorman commented Jul 11, 2024

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 systemd/systemd-stable#425 to enquire about this

@nhorman nhorman merged commit 6739dc0 into Irqbalance:master Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants