Skip to content

Added config options for systemd-coredump functionality. - #6168

Merged
lucabrunox merged 1 commit into
NixOS:masterfrom
auntieNeo:coredump
May 25, 2015
Merged

lucabrunox merged 1 commit into
NixOS:masterfrom
auntieNeo:coredump

Conversation

@auntieNeo

Copy link
Copy Markdown
Contributor

This adds simple support for configuring the management of core dumps through systemd to the NixOS config. I was debugging a systemd service with a segmentation fault when I noticed that /etc/systemd/coredump.conf isn't configurable through NixOS. This feature is helpful as systemd can place core dumps in a central location and rotate them as needed.

I left the default as systemd core dumps disabled, which is the current behavior. Limits still have to be set separately, which I believe is appropriate considering core dumps can be a security risk on sensitive systems.

I would have added the explicit --enable-coredump flag to the systemd configure flags, but decided against it when Nix started rebuilding Chromium etc. Someone might want to un-comment it at a later time.

@auntieNeo auntieNeo mentioned this pull request Feb 5, 2015
6 of 13 tasks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncomment, we'll merge into staging.

@bjornfor

Copy link
Copy Markdown
Contributor

IMHO, since coredump support is on by default, we don't need "--enable-coredump". (I think it is impractical to be explicit about all configure flags, so better take advantage of some defaults.)

I don't have strong feelings about that flag, but if you split this PR in two commits, one for the nixos options and one for the "--enable-coredump" flag, we can merge the nixos part quicker (no need to go via staging).

@thoughtpolice thoughtpolice added 0.kind: enhancement Add something new or improve an existing system. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Mar 11, 2015
Comment thread nixos/modules/system/boot/systemd.nix Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to make this conditional as well in the mkMerge below?

@auntieNeo

Copy link
Copy Markdown
Contributor Author

So, I tried to rebase this work onto master recently, and most of the config file stuff that used to be in systemd.nix was moved out. So I moved the coredump stuff completely out of systemd.nix and now it is in its own module. This should be much easier to merge anyway, and my last commit reflects that.

I removed the --enable-coredump flag, since it would be good to merge this into master before it diverges again. Please merge this into master sooner than later; this is the kind of functionality I use daily for developing/debugging services.

I also remove the comment suggesting that a reboot would be required, since it appears that changes to the boot.kernel.sysctl option affect the system immediately.

lucabrunox pushed a commit that referenced this pull request May 25, 2015
Added config options for systemd-coredump functionality.
@lucabrunox
lucabrunox merged commit 03b2a3f into NixOS:master May 25, 2015
@lucabrunox

Copy link
Copy Markdown
Contributor

Agree for the separate coredump nix file, I agree less on having it in system/boot. But we can change it at any time. Merging thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: enhancement Add something new or improve an existing system. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants