Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2013-02-08 Thread Michael Biebl
On 14.04.2012 15:03, Bernhard Schmidt wrote:
 Package: systemd
 Version: 44-1
 Severity: normal
 
 This seems to be somewhat new behaviour, I have several boxes with 
 systemd-37.1 that don't show this behaviour.
 
 root@mail:~# /etc/init.d/ssh restart
 Restarting ssh (via systemctl): ssh.serviceConnection to mail.svr03.mucip.net 
 closed by remote host.
 Connection to mail.svr03.mucip.net closed.

I've tried to reproduce this old bug today, but I wasn't able to trigger
the problem.
I've tested both with libpam-systemd installed and without.

Do you still run into this problem?
If so, can you send me the output of
systemctl status ssh.service and
systemctl show ssh.service

before *and* after the restart.

Thanks
Michael



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-30 Thread Tollef Fog Heen
]] Michael Stapelberg 

 Same here. I would like to add that this problem is somewhat tricky,
 since it occurs when updating ssh via ssh. In that case, you are left
 in a dead-lock: You need to run dpkg --configure -a, but every time you
 run it, the ssh restart will kick you out of the system before the
 command completes.
 
 I got around this by using VNC access to my KVM virtual machine, but
 not everybody has easy access to a recovery console and it’s a big
 annoyance.

You can also just manually remove your shell from the sshd.service
cgroup, though this isn't recommended.

 Is there any workaround for this situation, except for installing dbus
 and libpam-systemd? In case there isn’t, shouldn’t we make dbus and
 libpam-systemd a hard requirement?

It'd mean a circular dependency, which is icky.  But it begs the
question, you write that you're not using libpam-systemd, so I'd like to
ask why not?

Cheers,
-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-30 Thread Michael Stapelberg
Hi,

Quoting Tollef Fog Heen (2012-06-30 09:14:32)
 It'd mean a circular dependency, which is icky.  But it begs the
 question, you write that you're not using libpam-systemd, so I'd like to
 ask why not?
It’s a recommends, not a dependency, therefore it doesn’t get installed
on my system by default. I wasn’t aware that using it would prevent the
situation described in this bug report from happening, so I just didn’t
bother to install it :-).

Best regards,
Michael



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-30 Thread Andreas Klöckner


Michael Stapelberg stapelb...@debian.org schrieb:

Hi,

Quoting Tollef Fog Heen (2012-06-30 09:14:32)
 It'd mean a circular dependency, which is icky.  But it begs the
 question, you write that you're not using libpam-systemd, so I'd like
to
 ask why not?
It’s a recommends, not a dependency, therefore it doesn’t get installed
on my system by default. I wasn’t aware that using it would prevent the
situation described in this bug report from happening, so I just didn’t
bother to install it :-).

Best regards,
Michael



--
To unsubscribe, send mail to 668798-unsubscr...@bugs.debian.org.

+1 for hard dependency.

Andreas 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-30 Thread Tollef Fog Heen
]] Michael Stapelberg 

Hiya,

 Quoting Tollef Fog Heen (2012-06-30 09:14:32)
  It'd mean a circular dependency, which is icky.  But it begs the
  question, you write that you're not using libpam-systemd, so I'd like to
  ask why not?

 It’s a recommends, not a dependency, therefore it doesn’t get installed
 on my system by default. I wasn’t aware that using it would prevent the
 situation described in this bug report from happening, so I just didn’t
 bother to install it :-).

Fair enough, given there are a bunch of bogus recommends in the
archive.  I try to use the definition given in the policy manual though:

  The Recommends field should list packages that would be found together
  with this one in all but unusual installations.

so for my packages, I do really recommend you install recommends. :-)

Cheers,
-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-29 Thread Michael Stapelberg
Hi,

On Sat, 14 Apr 2012 15:03:23 +0200
Bernhard Schmidt be...@birkenwald.de wrote:
 root@mail:~# /etc/init.d/ssh restart
 Restarting ssh (via systemctl): ssh.serviceConnection to
 mail.svr03.mucip.net closed by remote host. Connection to
 mail.svr03.mucip.net closed.
 
 I'm not using libpam-systemd.
Same here. I would like to add that this problem is somewhat tricky,
since it occurs when updating ssh via ssh. In that case, you are left
in a dead-lock: You need to run dpkg --configure -a, but every time you
run it, the ssh restart will kick you out of the system before the
command completes.

I got around this by using VNC access to my KVM virtual machine, but
not everybody has easy access to a recovery console and it’s a big
annoyance.

Is there any workaround for this situation, except for installing dbus
and libpam-systemd? In case there isn’t, shouldn’t we make dbus and
libpam-systemd a hard requirement?

Best regards,
Michael


signature.asc
Description: PGP signature


Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-29 Thread Andreas Kloeckner
Michael Stapelberg stapelb...@debian.org writes:

 Hi,

 On Sat, 14 Apr 2012 15:03:23 +0200
 Bernhard Schmidt be...@birkenwald.de wrote:
 root@mail:~# /etc/init.d/ssh restart
 Restarting ssh (via systemctl): ssh.serviceConnection to
 mail.svr03.mucip.net closed by remote host. Connection to
 mail.svr03.mucip.net closed.
 
 I'm not using libpam-systemd.
 Same here. I would like to add that this problem is somewhat tricky,
 since it occurs when updating ssh via ssh. In that case, you are left
 in a dead-lock: You need to run dpkg --configure -a, but every time you
 run it, the ssh restart will kick you out of the system before the
 command completes.

 I got around this by using VNC access to my KVM virtual machine, but
 not everybody has easy access to a recovery console and it’s a big
 annoyance.

 Is there any workaround for this situation, except for installing dbus
 and libpam-systemd? In case there isn’t, shouldn’t we make dbus and
 libpam-systemd a hard requirement?

For the record, I got around it by doing

at NOW
dpkg --configure -a
^D

Andreas



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-29 Thread Michael Biebl
Hi,

On 29.06.2012 18:12, Michael Stapelberg wrote:

 Is there any workaround for this situation, except for installing dbus
 and libpam-systemd? In case there isn’t, shouldn’t we make dbus and
 libpam-systemd a hard requirement?

There is a simple workaround: Install a native .service file for ssh and
set KillMode=process.
This way, only the main process is killed on stop, and not the complete
process-group (which is the default).

Copy the attached file to /etc/systemd/system/ssh.service, run
systemctl daemon-reload and systemctl restart ssh.service.

That should be all.

That said, I would still recommend to simply install and use libpam-systemd.

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
[Unit]
Description=OpenBSD Secure Shell server

[Service]
ExecStart=/usr/sbin/sshd
Type=forking
PIDFile=/var/run/sshd.pid
KillMode=process


signature.asc
Description: OpenPGP digital signature


Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-06-09 Thread aelschuring
Package: systemd
Version: 44-2
Followup-For: Bug #668798

As another point of information, I do use libpam-systemd (well, I do have it
installed) but that makes no difference:

Setting up openssh-server (1:6.0p1-1) ...
Installing new version of config file /etc/pam.d/sshd ...
[] Restarting ssh (via systemctl): ssh.serviceConnection to satyr closed by 
remote host.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (900, 'stable'), (300, 'unstable'), (200, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages systemd depends on:
ii  dpkg 1.16.3
ii  initscripts  2.88dsf-22.1
ii  libacl1  2.2.51-7
ii  libaudit01:1.7.18-1.1
ii  libc62.13-32
ii  libcap2  1:2.22-1
ii  libcryptsetup4   2:1.4.1-3
ii  libdbus-1-3  1.5.12-1
ii  libkmod2 8-2
ii  liblzma5 5.1.1alpha+20110809-3
ii  libpam0g 1.1.3-7.1
ii  libselinux1  2.1.9-2
ii  libsystemd-daemon0   37-1.1
ii  libsystemd-id128-0   44-2
ii  libsystemd-journal0  44-2
ii  libsystemd-login044-2
ii  libudev0 175-3.1
ii  libwrap0 7.6.q-23
ii  udev 175-3.1
ii  util-linux   2.20.1-5

Versions of packages systemd recommends:
iu  libpam-systemd  44-2

Versions of packages systemd suggests:
pn  python2.7.2-10
pn  python-cairo  1.8.8-1+b2
pn  python-dbus   1.1.0-1
pn  systemd-gui   none

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#668798: systemd kills existing ssh sessions on /etc/init.d/ssh restart

2012-04-14 Thread Bernhard Schmidt
Package: systemd
Version: 44-1
Severity: normal

This seems to be somewhat new behaviour, I have several boxes with 
systemd-37.1 that don't show this behaviour.

root@mail:~# /etc/init.d/ssh restart
Restarting ssh (via systemctl): ssh.serviceConnection to mail.svr03.mucip.net 
closed by remote host.
Connection to mail.svr03.mucip.net closed.

I'm not using libpam-systemd.

root@mail:~# systemctl status ssh.service
ssh.service - LSB: OpenBSD Secure Shell server
  Loaded: loaded (/etc/init.d/ssh)
  Active: active (running) since Sat, 14 Apr 2012 15:01:05 +0200; 1min 
52s ago
 Process: 2677 ExecStop=/etc/init.d/ssh stop (code=exited, 
status=0/SUCCESS)
 Process: 2683 ExecStart=/etc/init.d/ssh start (code=exited, 
status=0/SUCCESS)
  CGroup: name=systemd:/system/ssh.service
  ├ 2689 /usr/sbin/sshd
  ├ 2690 sshd: root@pts/0
  ├ 2692 -bash
  ├ 2699 /usr/bin/python /usr/bin/reportbug systemd
  ├ 2827 sh -c /usr/bin/sensible-editor  
'/tmp/reportbug-systemd-20120414-2699-NaEPCt'
  ├ 2828 /bin/sh /usr/bin/sensible-editor 
/tmp/reportbug-systemd-20120414-2699-NaEPCt
  ├ 2829 editor /tmp/reportbug-systemd-20120414-2699-NaEPCt
  ├ 2830 sshd: root@pts/1
  ├ 2832 -bash
  └ 2836 systemctl status ssh.service


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages systemd depends on:
ii  dpkg 1.16.2
ii  initscripts  2.88dsf-22.1
ii  libacl1  2.2.51-5
ii  libaudit01:1.7.18-1.1
ii  libc62.13-27
ii  libcap2  1:2.22-1
ii  libcryptsetup4   2:1.4.1-2
ii  libdbus-1-3  1.5.12-1
ii  libkmod2 6-2
ii  liblzma5 5.1.1alpha+20110809-3
ii  libpam0g 1.1.3-7
ii  libselinux1  2.1.9-2
ii  libsystemd-daemon0   44-1
ii  libsystemd-id128-0   44-1
ii  libsystemd-journal0  44-1
ii  libsystemd-login044-1
ii  libudev0 175-3.1
ii  libwrap0 7.6.q-23
ii  udev 175-3.1
ii  util-linux   2.20.1-4

Versions of packages systemd recommends:
pn  libpam-systemd  none

Versions of packages systemd suggests:
pn  python   2.7.2-10
pn  systemd-gui  none

-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org