** 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: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
+ ```
+ 
+ With a fixed lxd-agent-loader package, there should be no abnormal closure of 
the websocket connection.
+ The `do-release-upgrade` should be able to complete without any session 
disconnection.
+ 
+ [ 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

Reply via email to