Skip to content

nixos/switch-to-configuration: restart changed socket units - #73871

Merged
domenkozar merged 1 commit into
NixOS:masterfrom
mayflower:socket-activation-fix
Nov 26, 2019
Merged

domenkozar merged 1 commit into
NixOS:masterfrom
mayflower:socket-activation-fix

Conversation

@lheckemann

Copy link
Copy Markdown
Member
Motivation for this change

The bugfix part of #50340

Things done
  • Tested via nixos/tests/mpd.nix
  • Tested via nixos/tests/systemd-confinement.nix
  • Fits CONTRIBUTING.md.

cc author @fpletz

@ofborg ofborg Bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 21, 2019

@flokli flokli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we also extend this to .socket for user sessions?

This should help with #71095

@domenkozar

Copy link
Copy Markdown
Member

It's not clear to me how this relates to #71095, but I think there's no need to extend scope. The fix already improves socket handling, any further improvements can be done with whoever does them later on :)

@flokli

flokli commented Nov 25, 2019 via email

Copy link
Copy Markdown
Member

Previously, socket units wouldn't be restarted if they were
changed. To restart the socket, the service the socket is attached
to needs to be stopped first before the socket can be restarted.
@primeos

primeos commented Nov 29, 2019

Copy link
Copy Markdown
Member

Unfortunately this causes severe regressions by restarting systemd services that should not be restarted, e.g. dbus.service (I assume due to Requires=dbus.socket). This does e.g. crash Sway (and probably other graphical sessions as well) after nixos-rebuild switch.

See #74626 for more details.

@domenkozar

Copy link
Copy Markdown
Member

Reverted in master until that's fixed.

primeos added a commit to primeos/nixpkgs that referenced this pull request Nov 27, 2021
…proved-socket-handling2"

This reverts commit 57961d2, reversing
changes made to b04f913.
(I.e. this reverts PR NixOS#141192.)

While well-intended, this change does unfortunately introduce very
serious regressions that are especially disruptive/noticeable on desktop
systems (e.g. users of Sway will loose their graphical session when
running "nixos-rebuild switch").

Therefore, this change has to be reverted ASAP instead of trying to fix
it in "production".
Note: An updated version should be extensively discussed, reviewed, and
tested before re-landing this change as an earlier version also had to
be reverted for the exact same issues [0].

Fix: NixOS#146727

[0]: NixOS#73871 (comment)
github-actions Bot pushed a commit that referenced this pull request Nov 27, 2021
…d-socket-handling2"

This reverts commit 57961d2, reversing
changes made to b04f913.
(I.e. this reverts PR #141192.)

While well-intended, this change does unfortunately introduce very
serious regressions that are especially disruptive/noticeable on desktop
systems (e.g. users of Sway will loose their graphical session when
running "nixos-rebuild switch").

Therefore, this change has to be reverted ASAP instead of trying to fix
it in "production".
Note: An updated version should be extensively discussed, reviewed, and
tested before re-landing this change as an earlier version also had to
be reverted for the exact same issues [0].

Fix: #146727

[0]: #73871 (comment)

(cherry picked from commit 1cfecb6)
mkg20001 pushed a commit to mkg20001/nixpkgs that referenced this pull request Nov 29, 2021
…proved-socket-handling2"

This reverts commit 57961d2, reversing
changes made to b04f913.
(I.e. this reverts PR NixOS#141192.)

While well-intended, this change does unfortunately introduce very
serious regressions that are especially disruptive/noticeable on desktop
systems (e.g. users of Sway will loose their graphical session when
running "nixos-rebuild switch").

Therefore, this change has to be reverted ASAP instead of trying to fix
it in "production".
Note: An updated version should be extensively discussed, reviewed, and
tested before re-landing this change as an earlier version also had to
be reverted for the exact same issues [0].

Fix: NixOS#146727

[0]: NixOS#73871 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants