Bug#770404: systemd: breaks lightdm, does not start anymore
Actually, I think we can settle it that way (which would help fixing fixing bug #770633: Everytime we have a service which provided an alternative, we declare an Alias=.service name. Then, we patch systemctl to update the alternative file (if it exists) on this alias name for those units having an alias. That's fixing the systemctl enable -> put in sync the alternative. Then, we patch update-alternative to look for a correspond .service name, and if any (and systemctl installed), we call systemctl enable --force (and need to find a way to not have the circular dependency on both, like checking the alternatives file directly) That's fixing the update-alternative command -> syncing on systemctl state. With this, we can even remove the tweaked postinst for the DMs as the normal alternative prompts will do the right thing. That of course wouldn't fix people changing the alternatives file by hand, but I'm unsure we can gracefully handle this. What do you think? Didier -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
Le 24/11/2014 10:01, Sjoerd Simons a écrit : On Mon, 2014-11-24 at 09:31 +0100, Didier Roche wrote: Le 21/11/2014 22:46, Sjoerd Simons a écrit : reassign 770404 lxdm thanks On Fri, Nov 21, 2014 at 08:01:50PM +, Simon McVittie wrote: This looks wrong. I think it might be caused by this in lxdm.service: [Install] Alias=display-manager.service Neither gdm3 nor lightdm have that, which suggests that it isn't meant to be necessary. I think what's happening is that when you install lxdm, that Alias directive causes the debhelper snippets in its postinst[1] to break the mechanism that is meant to arbitrate who owns display-manager.service: the part of its postinst headed "# set default-display-manager systemd service link" is correct, but then the #DEBHELPER# snippet runs "systemctl enable lxdm" which sees the Alias, obeys it, and overwrites the display-manager.service symlink with an incorrect target. Correct, that Alias= breaks our current mechanism for arbitrating the DM to use (that is, the sylink and the config file go out of sync). See also Martin pitt's comment for lightdm way back when: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733220#25 Actually, we revisited that with Martin and we can use Alias in relation to the correct postinst scripts to achieve this in a clean way. See the snippet I proposed on bug #764607. Adding Bigon and Joss to the CC for their GDM perspective ;) Interesting. Your postinst (patch from the bug you mentioned) seems a bit brute-force though (it tries to (re)enable the default display manager regardless of whether it, itself, is the default). But at least that means things stay in sync :p However I guess that still breaks things if the user enables a non-default DM by hand ? (iotw the DM gets enabled but will bail resulting in no DM being started if the user doesn't also update the etc file) Indeed, but even manually crafted solutions will have that issue as well (manual symlinks) as the alias is just the systemd way to do that automatically on systemctl enable . We are currently discussing with Laurent to maybe ensure that all dms (the 7 in debians) have some service file as a RC bug to avoid such things to happen. However, there is an issue with gdm3 due to it being a symlink (will raise a bug once we found a proper way to avoid this) Cheers, Didier -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
On Mon, 2014-11-24 at 09:31 +0100, Didier Roche wrote: > Le 21/11/2014 22:46, Sjoerd Simons a écrit : > > reassign 770404 lxdm > > thanks > > > > On Fri, Nov 21, 2014 at 08:01:50PM +, Simon McVittie wrote: > >> This looks wrong. I think it might be caused by this in lxdm.service: > >> > >> [Install] > >> Alias=display-manager.service > >> > >> Neither gdm3 nor lightdm have that, which suggests that it isn't > >> meant to be necessary. > >> > >> I think what's happening is that when you install lxdm, that Alias > >> directive > >> causes the debhelper snippets in its postinst[1] to break the mechanism > >> that is meant to arbitrate who owns display-manager.service: the part of > >> its postinst headed "# set default-display-manager systemd service link" > >> is correct, but then the #DEBHELPER# snippet runs "systemctl enable lxdm" > >> which sees the Alias, obeys it, and overwrites the display-manager.service > >> symlink with an incorrect target. > > Correct, that Alias= breaks our current mechanism for arbitrating the DM to > > use > > (that is, the sylink and the config file go out of sync). > > > > See also Martin pitt's comment for lightdm way back when: > >https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733220#25 > > Actually, we revisited that with Martin and we can use Alias in relation > to the correct postinst scripts to achieve this in a clean way. > See the snippet I proposed on bug #764607. Adding Bigon and Joss to the CC for their GDM perspective ;) Interesting. Your postinst (patch from the bug you mentioned) seems a bit brute-force though (it tries to (re)enable the default display manager regardless of whether it, itself, is the default). But at least that means things stay in sync :p However I guess that still breaks things if the user enables a non-default DM by hand ? (iotw the DM gets enabled but will bail resulting in no DM being started if the user doesn't also update the etc file) -- Sjoerd Simons -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
Le 21/11/2014 22:46, Sjoerd Simons a écrit : reassign 770404 lxdm thanks On Fri, Nov 21, 2014 at 08:01:50PM +, Simon McVittie wrote: This looks wrong. I think it might be caused by this in lxdm.service: [Install] Alias=display-manager.service Neither gdm3 nor lightdm have that, which suggests that it isn't meant to be necessary. I think what's happening is that when you install lxdm, that Alias directive causes the debhelper snippets in its postinst[1] to break the mechanism that is meant to arbitrate who owns display-manager.service: the part of its postinst headed "# set default-display-manager systemd service link" is correct, but then the #DEBHELPER# snippet runs "systemctl enable lxdm" which sees the Alias, obeys it, and overwrites the display-manager.service symlink with an incorrect target. Correct, that Alias= breaks our current mechanism for arbitrating the DM to use (that is, the sylink and the config file go out of sync). See also Martin pitt's comment for lightdm way back when: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733220#25 Actually, we revisited that with Martin and we can use Alias in relation to the correct postinst scripts to achieve this in a clean way. See the snippet I proposed on bug #764607. Cheers, Didier -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
Thank you very much, everyone, for all that detailed comments. I remove that Alias statement and hope that fixes the problem. Reopen the ticket if something is still wrong, please. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
clone 770404 -1 reassign -1 systemd retitle -1 more useful error messages severity -1 wishlist Hi coming back to the original bug report, I have two wishlist items: * a way to force systemd to start a service regardless of tests * more decent error messages, in this case it was Error: File exists which is a tautology in any case and carries no meaning if not accompanied with *which* file is the problem. Thanks Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
On Fri, 21 Nov 2014, Simon McVittie wrote: > Norbert, if I'm correct, then you should be able to fix this on your > system with `dpkg-reconfigure lightdm` or by correcting the symlink by hand. Indeed, or some systemctl status display-manager.service followed by some fixes was what it fixed it for me. Thanks for the analysis, and the suggestion for fix. Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
reassign 770404 lxdm thanks On Fri, Nov 21, 2014 at 08:01:50PM +, Simon McVittie wrote: > This looks wrong. I think it might be caused by this in lxdm.service: > > [Install] > Alias=display-manager.service > > Neither gdm3 nor lightdm have that, which suggests that it isn't > meant to be necessary. > > I think what's happening is that when you install lxdm, that Alias directive > causes the debhelper snippets in its postinst[1] to break the mechanism > that is meant to arbitrate who owns display-manager.service: the part of > its postinst headed "# set default-display-manager systemd service link" > is correct, but then the #DEBHELPER# snippet runs "systemctl enable lxdm" > which sees the Alias, obeys it, and overwrites the display-manager.service > symlink with an incorrect target. Correct, that Alias= breaks our current mechanism for arbitrating the DM to use (that is, the sylink and the config file go out of sync). See also Martin pitt's comment for lightdm way back when: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733220#25 > systemd maintainers: do you agree with my reasoning, and that that > bit of lxdm.service is wrong? If so, please reassign this to lxdm > (which is conveniently not a blocker for jessie, since it is only > in unstable). reassigning :) -- All men know the utility of useful things; but they do not know the utility of futility. -- Chuang-tzu -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
On Fri, 21 Nov 2014 at 09:27:57 +0900, Norbert Preining wrote: > Aehm, since yesterday or so ligthdm does not start anymore, only > updates related were systemd, lightdm hasn't changed. To be clear about the situation, you have lightdm, lxdm and xdm installed, of which you intend to use lightdm; and you have no display managers other than those three. Is that correct? Which versions of those packages? Have you installed or upgraded a display manager since the last reboot where they worked the way you intended? (see /var/log/apt) What's in your /etc/X11/default-display-manager? /etc/systemd/system/display-manager.service should be a symbolic link. What is its target? If /etc/X11/default-display-manager and /etc/systemd/system/display-manager.service have got out of sync, which I suspect they have, then that's what is causing your bug. > ==> /var/lib/systemd/deb-systemd-helper-enabled/lxdm.service.dsh-also <== > /etc/systemd/system/display-manager.service This looks wrong. I think it might be caused by this in lxdm.service: [Install] Alias=display-manager.service Neither gdm3 nor lightdm have that, which suggests that it isn't meant to be necessary. I think what's happening is that when you install lxdm, that Alias directive causes the debhelper snippets in its postinst[1] to break the mechanism that is meant to arbitrate who owns display-manager.service: the part of its postinst headed "# set default-display-manager systemd service link" is correct, but then the #DEBHELPER# snippet runs "systemctl enable lxdm" which sees the Alias, obeys it, and overwrites the display-manager.service symlink with an incorrect target. [1] http://git.lxde.org/gitweb/?p=debian/lxdm.git;a=blob;f=debian/lxdm.postinst;h=b5ee873fab5a8400965329f649029ffbe2fb1aa7;hb=HEAD systemd maintainers: do you agree with my reasoning, and that that bit of lxdm.service is wrong? If so, please reassign this to lxdm (which is conveniently not a blocker for jessie, since it is only in unstable). Norbert, if I'm correct, then you should be able to fix this on your system with `dpkg-reconfigure lightdm` or by correcting the symlink by hand. S -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
On Fri, 21 Nov 2014, Norbert Preining wrote: > On Fri, 21 Nov 2014, Norbert Preining wrote: > > Package: systemd > > Version: 215-6 > > Severity: critical > > Justification: breaks unrelated software > > > > Aehm, since yesterday or so ligthdm does not start anymore, only updates > > related > > were systemd, lightdm hasn't changed. > > > > $ systemctl status lightdm > > ● lightdm.service - Light Display Manager > >Loaded: error (Reason: File exists) > >Active: inactive (dead) > > Docs: man:lightdm(1) > > $ /etc/init.d/lightdm start > > Starting lightdm (via systemctl): lightdm.serviceFailed to start > > lightdm.service: Unit lightdm.service failed to load: File exists. See > > system logs and 'systemctl status lightdm.service' for details. > > failed! > > $ > > At the same time, although it is *not* selected as default display > manager, systemd tries to permanently start lxdm ... So it seems that the auto-generated unit file for lxdm is the problem. Removing lxdm I could at least start lightdm manually. But still it didn't start automatically. Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#770404: systemd: breaks lightdm, does not start anymore
On Fri, 21 Nov 2014, Norbert Preining wrote: > Package: systemd > Version: 215-6 > Severity: critical > Justification: breaks unrelated software > > Aehm, since yesterday or so ligthdm does not start anymore, only updates > related > were systemd, lightdm hasn't changed. > > $ systemctl status lightdm > ● lightdm.service - Light Display Manager >Loaded: error (Reason: File exists) >Active: inactive (dead) > Docs: man:lightdm(1) > $ /etc/init.d/lightdm start > Starting lightdm (via systemctl): lightdm.serviceFailed to start > lightdm.service: Unit lightdm.service failed to load: File exists. See system > logs and 'systemctl status lightdm.service' for details. > failed! > $ At the same time, although it is *not* selected as default display manager, systemd tries to permanently start lxdm ... THis after freeze :-((( Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org