Bug 45215

Summary: stuck connections with ssh reboot using systemd
Product: UCS Test Reporter: Philipp Hahn <hahn>
Component: FrameworkAssignee: Philipp Hahn <hahn>
Status: CLOSED FIXED QA Contact: Felix Botner <botner>
Severity: normal    
Priority: P5 CC: damrose
Version: unspecifiedKeywords: systemd
Target Milestone: ---   
Hardware: Other   
OS: Linux   
URL: https://serverfault.com/questions/706475/ssh-sessions-hang-on-shutdown-reboot
What kind of report is it?: Development Internal What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:

Description Philipp Hahn univentionstaff 2017-08-16 17:31:23 CEST
With systemd "reboot", "halt", "shutdown" is too fast, as the sshd gets killed before the connection is closed down properly. This leads to the ssh session staying around until the TCP timeout kicks in.

Calling
 reboot & logout
fixes it.
Comment 1 Erik Damrose univentionstaff 2017-08-17 09:29:43 CEST
This is not only an issue in UCS Test, it is also annoying while working with UCS in general. We could backport https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751636
Comment 2 Philipp Hahn univentionstaff 2017-08-17 10:46:02 CEST
r82336 | Bug #45215 test: Fix reboot
r82335 | Bug #45215 test: Work around systemd ssh reboot
r82334 | Bug #45215 test: Fix comment
r82333 | Bug #45215 test: Fix shell return code
r82352 | Bug #45215 test: Work around systemd ssh reboot
Comment 3 Felix Botner univentionstaff 2017-08-23 19:19:40 CEST
OK, works in ec2 utils

(In reply to Erik Damrose from comment #1)
> This is not only an issue in UCS Test, it is also annoying while working
> with UCS in general. We could backport
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751636

yep, but please open a new bug for UCS