** Description changed:

+ [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 expands the case where the TERM variable is inherited from PID
+ 1 when building an execution environment, e.g. for a container. If
+ problems were to occur, it would be related to the value of TERM in
+ environments forked off of PID 1.
+ 
+ [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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1959475

Title:
  "machinectl shell" connections immediately terminated

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1959475/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to