** Description changed: [ Impact ] Users running `do-release-upgrade` in a LXD VM through `lxc exec` have their session disconnected abruptly as lxd-agent.service is restarted during the upgrade from Jammy->Noble. The disconnected user will likely re-enter the VM using another `lxc exec` but might be confused by the `do-release-upgrade` command still running but being hard to re-attach. The upload would fix this disconnect problem by simply not stopping the `lxd-agent.service` on package upgrade. [ Test Plan ] How to reproduce the bug: ``` $ lxc launch ubuntu-minimal-daily:24.04 v1 --vm $ lxc shell v1 # now inside the VM, enable noble-proposed - root@v1:~# sed -i 's/noble-backports$/noble-proposed/' /etc/apt/sources.list.d/# ubuntu.sources + root@v1:~# sed -i 's/noble-backports$/noble-proposed/' /etc/apt/sources.list.d/ubuntu.sources root@v1:~# apt-get update # install lxd-agent-loader from noble-proposed root@v1:~# apt-get install lxd-agent-loader -t noble-proposed Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be upgraded: - lxd-agent-loader + lxd-agent-loader 1 upgraded, 0 newly installed, 0 to remove and 12 not upgraded. Need to get 4836 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 lxd-agent-loader all 0.7ubuntu0.1 [4836 B] - Fetched 4836 B in 0s (268 kB/s) + Fetched 4836 B in 0s (268 kB/s) debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 14837 files and directories currently installed.) Preparing to unpack .../lxd-agent-loader_0.7ubuntu0.1_all.deb ... Unpacking lxd-agent-loader (0.7ubuntu0.1) over (0.7) ... Setting up lxd-agent-loader (0.7ubuntu0.1) ... lxd-agent.service is a disabled or a static unit, not starting it. ``` With a fixed lxd-agent-loader package, there should be no abnormal closure of the websocket connection during that `apt-get install` upgrading the package. - [ Where problems could occur ] The fix for this upgrade is to not restart the `lxd-agent.service` on package upgrade. This means subsequent fixes delivered through package updates would not be picked up immediatly. In those case, a VM restarted would be required. This scenario is mitigated by the fact that `lxd-agent.service` already has a `Restart=on-failure` directive meaning that if something changes on the LXD side causing it to crash, an updated lxd-agent binary would be picked up after the first crash. Another mitigating factor is that LXD VMs don't require the `lxd-agent.service` to be working to trigger an orderly shutdown as ACPI signals are sent in the QEMU process. [ Original description ] If `do-release-upgrade` is run in LXD VM using `lxc exec <instance> bash` or `lxc shell <instance>` to run the upgrade command, the upgrade process will restart lxd-agent.service during an upgrade from Jammy to Noble, thus causing the `lxc exec` session to be disconnected abruptly. Simple reproducer steps: ``` lxc launch ubuntu:jammy jammy-to-noble --vm lxc shell jammy-to-noble # now inside the VM do-release-upgrade [snipped] Setting up libkeyutils1:amd64 (1.6.3-3build1) ... Setting up lxd-agent-loader (0.7) ... Error: websocket: close 1006 (abnormal closure): unexpected EOF ``` Reported to LXD upstream in https://github.com/canonical/lxd/issues/14033
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2078936 Title: lxd-agent restarts during do-release-upgrade breaking the `lxc exec` connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxd-agent-loader/+bug/2078936/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs