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

irqbalance: systemd service config aligned with upstream #78448

Merged
merged 3 commits into from Feb 4, 2020

Conversation

@snicket2100
Copy link
Contributor

@snicket2100 snicket2100 commented Jan 24, 2020

Aligned systemd service config with the definition in the upstream repo: https://github.com/Irqbalance/irqbalance/blob/master/misc/irqbalance.service#L7.

Other than adding some level of sandboxing it also fixes the "Daemon couldn't be bound to the file-based socket." warning reported on irqbalance startup due to the fact that the "/run/irqbalance" directory didn't exist. The "RuntimeDirectory" property makes sure it gets created. The aforementioned warning didn't cause any problems I could spot though.

I have verified that both irqbalance as well as irqbalance-ui work fine with this new systemd service config.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Aligned systemd service config with the definition in the upstream repo:
https://github.com/Irqbalance/irqbalance/blob/master/misc/irqbalance.service#L7.

Other than adding some level of sandboxing it also fixes the "Daemon
couldn't be bound to the file-based socket." warning reported on
irqbalance startup due to the fact that the "/run/irqbalance" directory
didn't exist. The "RuntimeDirectory" property makes sure it gets
created. The aforementioned warning didn't cause any problems I could
spot though.

I have verified that both `irqbalance` as well as `irqbalance-ui` work
fine with this new systemd service config.
@Mic92
Copy link
Contributor

@Mic92 Mic92 commented Jan 25, 2020

@snicket2100 would you mind, modifying the package to install the package to $out/lib/systemd/system and use the systemd.packages so that we use the upstream service directly? You can also use sed to fix up the path in the ExecStart line.

@snicket2100
Copy link
Contributor Author

@snicket2100 snicket2100 commented Jan 25, 2020

@snicket2100 would you mind, modifying the package to install the package to $out/lib/systemd/system and use the systemd.packages so that we use the upstream service directly? You can also use sed to fix up the path in the ExecStart line.

@Mic92 Sure, sounds great, thanks for the hint, I'm very new to NixOS so I didn't know that approach. Will fix it as soon as I learn how to do it ;)

@Mic92
Copy link
Contributor

@Mic92 Mic92 commented Jan 25, 2020

Just have a look for other users of systemd.packages in ./nixos. The wantedBy = [ "multi-user.target" ]; option would be still required for instance.

@snicket2100
Copy link
Contributor Author

@snicket2100 snicket2100 commented Feb 2, 2020

@Mic92 thanks for the hint once again, does it look good to you now?

otherwise the service is never started by us.
environment.systemPackages = [ pkgs.irqbalance ];

systemd.services.irqbalance.wantedBy = ["multi-user.target"];

This comment has been minimized.

@Mic92

Mic92 Feb 4, 2020
Contributor

This was still needed.

@Mic92 Mic92 merged commit 6cfc7e9 into NixOS:master Feb 4, 2020
1 check was pending
1 check was pending
grahamcofborg-eval Checking original out paths
Details
dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Feb 4, 2020
irqbalance: systemd service config aligned with upstream
(cherry picked from commit 6cfc7e9)
@snicket2100 snicket2100 deleted the snicket2100:irqbalance-systemd branch Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.