View Issue Details

IDProjectCategoryView StatusLast Update
0016438CentOS-7systemdpublic2019-09-26 21:12
Reportertru 
PrioritynormalSeveritymajorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version7.7-1908 
Target VersionFixed in Version 
Summary0016438: "systemd isolate" kills sshd/screen/tmux/...
Descriptionsystemctl isolate multi-user/graphical disconnect remote user and kills screen/tmux
Steps To Reproduceinstall/upgrade to systemd-219-67.el7_7.1
Additional Informationupstream, regression from 7.6
TagsNo tags attached.
abrt_hash
URL

Relationships

has duplicate 0016440 closedtru Systemd: CentOS 7.7 will kill all sessions when switching runlevel with "systemctl isolate <target>" 

Activities

tru

tru

2019-09-22 15:37

administrator   ~0035194

https://bugzilla.redhat.com/show_bug.cgi?id=1745199
tru

tru

2019-09-22 15:41

administrator   ~0035195

"works for me" patch/spec file

systemd.spec (181,884 bytes)
38.patch (1,140 bytes)
From 3a3c7374893751d2974cbb1b05dfbf71b49df590 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 18 Feb 2016 22:51:23 +0100
Subject: [PATCH] core: exclude .slice units from "systemctl isolate"

Fixes: #1969
(cherry picked from commit 1b4cd0cf11feb7d41f2eff17f86fa55b31bb6841)

Resolves: #1745199
---
 src/core/slice.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/core/slice.c b/src/core/slice.c
index 0985a65286..b0769205f6 100644
--- a/src/core/slice.c
+++ b/src/core/slice.c
@@ -36,6 +36,13 @@ static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = {
         [SLICE_ACTIVE] = UNIT_ACTIVE
 };
 
+static void slice_init(Unit *u) {
+        assert(u);
+        assert(u->load_state == UNIT_STUB);
+
+        u->ignore_on_isolate = true;
+}
+
 static void slice_set_state(Slice *t, SliceState state) {
         SliceState old_state;
         assert(t);
@@ -274,6 +281,7 @@ const UnitVTable slice_vtable = {
         .no_instances = true,
         .can_transient = true,
 
+        .init = slice_init,
         .load = slice_load,
 
         .coldplug = slice_coldplug,
38.patch (1,140 bytes)
toracat

toracat

2019-09-22 15:53

manager   ~0035196

Candidate for fasttrack?
pgreco

pgreco

2019-09-26 17:01

developer   ~0035240

ok, fasttrack should be in the mirrors soon, yum update systemd --enablerepo=fasttrack
tru

tru

2019-09-26 21:12

administrator   ~0035242

that fixes the issue for me +1

Issue History

Date Modified Username Field Change
2019-09-22 15:36 tru New Issue
2019-09-22 15:37 tru Status new => acknowledged
2019-09-22 15:37 tru Note Added: 0035194
2019-09-22 15:41 tru File Added: systemd.spec
2019-09-22 15:41 tru File Added: 38.patch
2019-09-22 15:41 tru Note Added: 0035195
2019-09-22 15:53 toracat Note Added: 0035196
2019-09-23 07:48 tru Relationship added has duplicate 0016440
2019-09-26 17:01 pgreco Note Added: 0035240
2019-09-26 21:12 tru Note Added: 0035242