[Bug 1959475] Re: "machinectl shell" connections immediately terminated
Launchpad Bug Tracker
1959475 at bugs.launchpad.net
Thu Sep 22 09:15:24 UTC 2022
This bug was fixed in the package systemd - 245.4-4ubuntu3.18
---------------
systemd (245.4-4ubuntu3.18) focal; urgency=medium
[ Nick Rosbrook ]
* core: make sure we don't get confused when setting TERM for a tty fd
(LP: #1959475)
File: debian/patches/lp1959475-core-make-sure-we-don-t-get-confused-when-setting-TERM-fo.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=b10c6853050dde26665caf3b15444d768d2bc498
* shared/calendarspec: when mktime() moves us backwards, jump forward
(LP: #1966800)
File: debian/patches/lp1966800-shared-calendarspec-when-mktime-moves-us-backwards-jump-f.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=1f063541e44f6ff1a6904676d4264a2e49a09594
* network: do not remove localhost address (LP: #1979951)
File: debian/patches/lp1979951-network-do-not-remove-localhost-address.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=87f872b8c5451f353601fb606e7fd7a479217cef
* units: remove the restart limit on the modprobe at .service (LP: #1982462)
File: debian/patches/lp1982462-units-remove-the-restart-limit-on-the-modprobe-.service.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=68353ffaf3539e6a58ef62a8b50850f56eae29ea
[ Mustafa Kemal Gilor ]
* d/p/lp1978079-efi-pstore-not-cleared-on-boot.patch: pstore: Run after
modules are loaded. Thanks to Alexander Graf <graf at amazon.com>.
(LP: #1978079)
Author: Mustafa Kemal Gilor
File: debian/patches/lp1978079-efi-pstore-not-cleared-on-boot.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=6e60756f2079d6408abdb967127a1d9b9a0eba8c
-- Nick Rosbrook <nick.rosbrook at canonical.com> Wed, 31 Aug 2022
11:27:33 -0400
** Changed in: systemd (Ubuntu Focal)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1959475
Title:
"machinectl shell" connections immediately terminated
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Focal:
Fix Released
Bug description:
[Impact]
This bug prevents users on Impish and newer from connecting to Focal
systemd containers using `machinectl shell`. This limits users ability
to manage containers spawned with systemd-nspawn.
[Test Plan]
On a Jammy host, do the following:
* Install systemd-container and debootstrap if necessary:
$ sudo apt install debootstrap systemd-container
* Create a Focal filesystem for the container:
$ sudo debootstrap --arch=<arch> focal
/var/lib/containers/lp1959475/
* Launch the container:
$ sudo systemd-nspawn -D /var/lib/containers/lp1959475/ --machine
test-container
* Inside the container, set a password for root and then exit:
$ passwd # Enter password when prompted
$ exit
* Re-launch the container with -b option:
$ sudo systemd-nspawn -D /var/lib/containers/lp1959475/ --machine
test-container -b
* In a separate terminal window, try to connect to the container:
$ sudo machinectl shell test-container
* Observe the "Connection to machine test-container terminated" error
message.
[Where problems could occur]
The patch changes a path_equal() call to path_equal_ptr() which NULL-
checks before calling path_compare(). This avoids an assertion failure
in path_compare() and allows the term to be correctly configured in
execution environments requiring one. If were regressions were to
occur, it would be related to this configuration.
[Other Info]
This bug occurs when trying to connect to a Focal container from e.g. a Jammy host. For SRU verification, the container
should be Focal, and the host should be Jammy. The -proposed package should be installed in the Focal container.
[Original Description]
The command "machinectl shell" does not work in systemd
249.9-0ubuntu2:
$ sudo machinectl shell ns-xxx
Connected to machine ns-xxx. Press ^] three times within 1s to exit session.
Connection to machine ns-xxx terminated.
The issue seems to be described here:
https://forum.manjaro.org/t/the-machinectl-shell-command-stopped-working-after-systemd-upgrade-to-250-2-1/99899
https://github.com/systemd/systemd/issues/22234
and solved here:
https://github.com/systemd/systemd/commit/e8cf09b2a2ad0d48e5493050d54251d5f512d9b6
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1959475/+subscriptions
More information about the foundations-bugs
mailing list