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

modifying a service in systemd.user.services does not cause daemon-reload #7326

Open
anderspapitto opened this Issue Apr 11, 2015 · 6 comments

Comments

Projects
None yet
8 participants
@anderspapitto
Contributor

anderspapitto commented Apr 11, 2015

I went through this process

  • modified existing systemd user service description in /etc/nixos/configuration.nix
  • ran nixos-rebuild switch
  • as user, ran systemctl --user start $MYSERVICE
    it failed, due to a misconfiguration in the old description
  • ran systemctl --user daemon-reload
  • again ran systemctl --user start $MYSERVICE
    this time it worked

daemon-reload should probably run automatically when a service is changed. there may be an analogous problem for systemwide services as well

@joachifm

This comment has been minimized.

Show comment
Hide comment
@joachifm

joachifm Apr 3, 2016

Contributor

Another systemd user service UX problem, see also #7329

Contributor

joachifm commented Apr 3, 2016

Another systemd user service UX problem, see also #7329

@ctheune

This comment has been minimized.

Show comment
Hide comment
@ctheune

ctheune Apr 22, 2016

Contributor

I actually just wrote an activation script that does the following for all users that have lingering enabled:

${pkgs.systemd}/bin/systemd-run --setenv=XDG_RUNTIME_DIR="/run/user/${toString user.uid}" \
  --uid ${user.name}  ${pkgs.systemd}/bin/systemctl --user daemon-reload
Contributor

ctheune commented Apr 22, 2016

I actually just wrote an activation script that does the following for all users that have lingering enabled:

${pkgs.systemd}/bin/systemd-run --setenv=XDG_RUNTIME_DIR="/run/user/${toString user.uid}" \
  --uid ${user.name}  ${pkgs.systemd}/bin/systemctl --user daemon-reload
@edwtjo

This comment has been minimized.

Show comment
Hide comment
@edwtjo

edwtjo Apr 22, 2016

Member

@ctheune why not submit the lingering/reload thing as a pull request? (#3702 related)

Member

edwtjo commented Apr 22, 2016

@ctheune why not submit the lingering/reload thing as a pull request? (#3702 related)

@ctheune

This comment has been minimized.

Show comment
Hide comment
@ctheune

ctheune Apr 22, 2016

Contributor

I'm going to try this out in our environment first and see how it behaves over time. If that works reasonably well I'll be happy, to. Otherwise it's more of a "hack" at the moment. Also, systemd could do a lot better on managing this out of the box. I'm thinking of contacting them, too.

Contributor

ctheune commented Apr 22, 2016

I'm going to try this out in our environment first and see how it behaves over time. If that works reasonably well I'll be happy, to. Otherwise it's more of a "hack" at the moment. Also, systemd could do a lot better on managing this out of the box. I'm thinking of contacting them, too.

@Profpatsch

This comment has been minimized.

Show comment
Hide comment
@Profpatsch

Profpatsch Jul 11, 2016

Member

restartIfChanged should be made working as well for user services.

Member

Profpatsch commented Jul 11, 2016

restartIfChanged should be made working as well for user services.

@siddharthist siddharthist referenced this issue Oct 3, 2016

Open

dunst service: init [wip, stalled] #19183

0 of 7 tasks complete

@fpletz fpletz modified the milestones: 17.03, 16.09 Jan 20, 2017

@fpletz fpletz modified the milestones: 17.09, 17.03 Jul 25, 2017

@matthewbauer matthewbauer modified the milestones: 17.09, 18.09 Apr 17, 2018

@Ma27

This comment has been minimized.

Show comment
Hide comment
@Ma27

Ma27 Sep 15, 2018

Contributor

this should be fixed now. Since #44990 switch-to-configuration.pl performs a daemon-reload for user services.

Contributor

Ma27 commented Sep 15, 2018

this should be fixed now. Since #44990 switch-to-configuration.pl performs a daemon-reload for user services.

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