** Description changed:

  Problem description:
  
  Upgrading lxd-agent-loader package causes a restart of the lxd-
  agent.service. This service restart can be problematic when the apt
  upgrades are done through a `lxc exec` session as the session gets
  killed/disconnected abruptly. This is what caused
  https://bugs.launchpad.net/ubuntu/+source/lxd-agent-loader/+bug/2078936
  for example.
  
  Motivation for the FFe:
  
  This behavior of restarting on package upgrade is problematic especially
  when it happens during do-release-upgrade as it's not obvious how to
  reconnect or pick up where the session was disconnected. As such, the
  end goal of that FFe is to land the fix in Oracular and do a SRU to
  Noble to address the Jammy->Noble upgrade issue it causes.
  
  Additional information:
  
  lxd-agent-loader authoritative sources live at
  https://code.launchpad.net/~git-ubuntu-import/ubuntu/+source/lxd-
  installer/+git/lxd-installer/+ref/ubuntu/devel so this is not a new
  upstream release per se. As such, the only changelog would be:
  
    * d/rules: don't stop lxd-agent on upgrade (LP: #2078936, LP:
  #2079406)
  
- This changelog and associated changes are being proposed for merging in
- https://code.launchpad.net/~sdeziel/ubuntu/+source/lxd-agent-
+ This changelog and the associated changes are being proposed for merging
+ in https://code.launchpad.net/~sdeziel/ubuntu/+source/lxd-agent-
  loader/+git/lxd-agent-loader/+merge/472700
+ 
+ The changes themselves are simply to skip the stopping of the lxd-
+ agent.service unit on upgrade as otherwise, stopping that service is
+ risking to kill an active `lxc exec` session.
  
  As the d/changelog indicates, this is a bugfix-only update.
  
  Source build logs:
  
  $ dpkg-buildpackage --build=source --no-sign -sa
  dpkg-buildpackage: info: source package lxd-agent-loader
  dpkg-buildpackage: info: source version 0.8
  dpkg-buildpackage: info: source distribution oracular
  dpkg-buildpackage: info: source changed by Simon Deziel 
<simon.dez...@canonical.com>
   dpkg-source --before-build .
   debian/rules clean
  dh clean
     dh_clean
   dpkg-source -b .
  dpkg-source: info: using source format '3.0 (native)'
  dpkg-source: info: building lxd-agent-loader in lxd-agent-loader_0.8.tar.xz
  dpkg-source: info: building lxd-agent-loader in lxd-agent-loader_0.8.dsc
   dpkg-genbuildinfo --build=source -O../lxd-agent-loader_0.8_source.buildinfo
   dpkg-genchanges -sa --build=source -O../lxd-agent-loader_0.8_source.changes
  dpkg-genchanges: info: including full source code in upload
   dpkg-source --after-build .
  dpkg-buildpackage: info: source-only upload: Debian-native package
  
  Binary build logs:
  
  $ dpkg-buildpackage --build=binary --no-sign -sa
  dpkg-buildpackage: info: source package lxd-agent-loader
  dpkg-buildpackage: info: source version 0.8
  dpkg-buildpackage: info: source distribution oracular
  dpkg-buildpackage: info: source changed by Simon Deziel 
<simon.dez...@canonical.com>
  dpkg-buildpackage: info: host architecture amd64
   dpkg-source --before-build .
   debian/rules clean
  dh clean
     dh_clean
   debian/rules binary
  dh binary
     dh_update_autotools_config
     dh_autoreconf
     create-stamp debian/debhelper-build-stamp
     dh_prep
     dh_auto_install --destdir=debian/lxd-agent-loader/
     dh_install
     dh_installdocs
     dh_installchangelogs
     debian/rules override_dh_installsystemd
  make[1]: Entering directory '/home/ubuntu/lxd-agent-loader'
  # stopping lxd-agent.service kills the `lxc exec` session of a VM
  dh_installsystemd --no-stop-on-upgrade lxd-agent.service
  make[1]: Leaving directory '/home/ubuntu/lxd-agent-loader'
     dh_lintian
     dh_perl
     dh_link
     dh_strip_nondeterminism
     dh_compress
     dh_fixperms
     dh_missing
     dh_installdeb
     dh_gencontrol
     dh_md5sums
     dh_builddeb
  dpkg-deb: building package 'lxd-agent-loader' in 
'../lxd-agent-loader_0.8_all.deb'.
   dpkg-genbuildinfo --build=binary -O../lxd-agent-loader_0.8_amd64.buildinfo
   dpkg-genchanges -sa --build=binary -O../lxd-agent-loader_0.8_amd64.changes
  dpkg-genchanges: info: binary-only upload (no source code included)
   dpkg-source --after-build .
  dpkg-buildpackage: info: binary-only upload (no source included)
  
  Install logs from a LXD VM:
  
  $ lxc launch ubuntu-minimal-daily:24.10 --vm v2
  $ lxc file push lxd-agent-loader_0.8_all.deb v2/tmp/
  $ lxc exec v2 -- bash
  root@v2:~# apt-get install /tmp/lxd-agent-loader_0.8_all.deb
  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done
  Note, selecting 'lxd-agent-loader' instead of 
'/tmp/lxd-agent-loader_0.8_all.deb'
  The following packages will be upgraded:
    lxd-agent-loader
  1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  Need to get 0 B/4834 B of archives.
  After this operation, 0 B of additional disk space will be used.
  Get:1 /tmp/lxd-agent-loader_0.8_all.deb lxd-agent-loader all 0.8 [4834 B]
  debconf: delaying package configuration, since apt-utils is not installed
  (Reading database ... 14834 files and directories currently installed.)
  Preparing to unpack .../lxd-agent-loader_0.8_all.deb ...
  Unpacking lxd-agent-loader (0.8) over (0.7) ...
  Setting up lxd-agent-loader (0.8) ...
  lxd-agent.service is a disabled or a static unit, not starting it.
  root@v2:~#
  
  In the above, we see the `lxc exec` session was not disconnected thus
  confirming the bug fix.

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

Title:
  FFe: update lxd-agent-loader to avoid breaking the `lxc exec` session

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxd-agent-loader/+bug/2079406/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to