[Touch-packages] [Bug 1757529] Re: apt: after reboot, still wants to keep 3 kernels when it should only keep 2

2018-03-22 Thread Julian Andres Klode
** Changed in: apt (Ubuntu)
   Status: New => Triaged

** Changed in: apt (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1757529

Title:
  apt: after reboot, still wants to keep 3 kernels when it should only
  keep 2

Status in apt package in Ubuntu:
  Triaged

Bug description:
  The apt kernel autoremoval handling should by design keep at least 2
  and at most 3 kernels on the system.

  However, on my 17.10 system, I currently have 3 kernels marked for
  retention while the kernel I have booted is the newest of these.  This
  means that I'm not able to upgrade to 18.04 without manual
  intervention, because I have a /boot that's sized just large enough to
  fit 3 kernels, not 4, apt autoremove won't remove any of the kernels.

  The sequence here is that I was running 4.13.0-36-generic; I updated,
  which pulled 4.13.0-37-generic onto the system; I ran apt autoremove
  --purge, which removed any kernels older than -36- from the system; I
  did *not* reboot; I installed 4.13.0-38-generic (from artful-
  proposed); all three kernels present are now marked for retention.  I
  rebooted, and all three kernels are still marked for retention.

  If /etc/kernel/postinst.d/apt-auto-removal were run *now*, it would
  mark 4.13.0-36-generic as autoremovable.  But there is nothing that
  reruns this script on boot.  Maybe there should be?

  $ last
  vorlon   tty2 :0   Tue Mar 20 11:14   still logged in
  reboot   system boot  4.13.0-38-generi Tue Mar 20 10:34   still running
  vorlon   tty2 :0   Tue Mar  6 23:12 - down  (13+10:21)
  reboot   system boot  4.13.0-36-generi Tue Mar  6 23:10 - 10:33 (13+10:23)

  wtmp begins Tue Mar  6 23:09:27 2018
  $

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: apt 1.5.1
  ProcVersionSignature: Ubuntu 4.13.0-38.43-generic 4.13.16
  Uname: Linux 4.13.0-38-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
  ApportVersion: 2.20.7-0ubuntu3.7
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Mar 21 13:02:43 2018
  InstallationDate: Installed on 2010-09-24 (2735 days ago)
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 
(20100816.1)
  SourcePackage: apt
  UpgradeStatus: Upgraded to artful on 2018-03-21 (0 days ago)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1757529] Re: apt: after reboot, still wants to keep 3 kernels when it should only keep 2

2018-03-21 Thread Steve Langasek
Historical context (thanks, Julian):
http://paste.ubuntu.com/p/qFfThVFChK/

The original design would have left 37 marked for autoremoval after 38
was installed.  I think that is the correct behavior which should be
restored.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1757529

Title:
  apt: after reboot, still wants to keep 3 kernels when it should only
  keep 2

Status in apt package in Ubuntu:
  New

Bug description:
  The apt kernel autoremoval handling should by design keep at least 2
  and at most 3 kernels on the system.

  However, on my 17.10 system, I currently have 3 kernels marked for
  retention while the kernel I have booted is the newest of these.  This
  means that I'm not able to upgrade to 18.04 without manual
  intervention, because I have a /boot that's sized just large enough to
  fit 3 kernels, not 4, apt autoremove won't remove any of the kernels.

  The sequence here is that I was running 4.13.0-36-generic; I updated,
  which pulled 4.13.0-37-generic onto the system; I ran apt autoremove
  --purge, which removed any kernels older than -36- from the system; I
  did *not* reboot; I installed 4.13.0-38-generic (from artful-
  proposed); all three kernels present are now marked for retention.  I
  rebooted, and all three kernels are still marked for retention.

  If /etc/kernel/postinst.d/apt-auto-removal were run *now*, it would
  mark 4.13.0-36-generic as autoremovable.  But there is nothing that
  reruns this script on boot.  Maybe there should be?

  $ last
  vorlon   tty2 :0   Tue Mar 20 11:14   still logged in
  reboot   system boot  4.13.0-38-generi Tue Mar 20 10:34   still running
  vorlon   tty2 :0   Tue Mar  6 23:12 - down  (13+10:21)
  reboot   system boot  4.13.0-36-generi Tue Mar  6 23:10 - 10:33 (13+10:23)

  wtmp begins Tue Mar  6 23:09:27 2018
  $

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: apt 1.5.1
  ProcVersionSignature: Ubuntu 4.13.0-38.43-generic 4.13.16
  Uname: Linux 4.13.0-38-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
  ApportVersion: 2.20.7-0ubuntu3.7
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Mar 21 13:02:43 2018
  InstallationDate: Installed on 2010-09-24 (2735 days ago)
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 
(20100816.1)
  SourcePackage: apt
  UpgradeStatus: Upgraded to artful on 2018-03-21 (0 days ago)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1757529] Re: apt: after reboot, still wants to keep 3 kernels when it should only keep 2

2018-03-21 Thread Steve Langasek
As an alternative to running /etc/kernel/postinst.d/apt-auto-removal on
boot, the code could be changed so that 37 is not retained once 38 is
installed.  I can't remember now if there was a rationale for marking
second-newest kernel for retention, in the case where that kernel had
never been booted.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1757529

Title:
  apt: after reboot, still wants to keep 3 kernels when it should only
  keep 2

Status in apt package in Ubuntu:
  New

Bug description:
  The apt kernel autoremoval handling should by design keep at least 2
  and at most 3 kernels on the system.

  However, on my 17.10 system, I currently have 3 kernels marked for
  retention while the kernel I have booted is the newest of these.  This
  means that I'm not able to upgrade to 18.04 without manual
  intervention, because I have a /boot that's sized just large enough to
  fit 3 kernels, not 4, apt autoremove won't remove any of the kernels.

  The sequence here is that I was running 4.13.0-36-generic; I updated,
  which pulled 4.13.0-37-generic onto the system; I ran apt autoremove
  --purge, which removed any kernels older than -36- from the system; I
  did *not* reboot; I installed 4.13.0-38-generic (from artful-
  proposed); all three kernels present are now marked for retention.  I
  rebooted, and all three kernels are still marked for retention.

  If /etc/kernel/postinst.d/apt-auto-removal were run *now*, it would
  mark 4.13.0-36-generic as autoremovable.  But there is nothing that
  reruns this script on boot.  Maybe there should be?

  $ last
  vorlon   tty2 :0   Tue Mar 20 11:14   still logged in
  reboot   system boot  4.13.0-38-generi Tue Mar 20 10:34   still running
  vorlon   tty2 :0   Tue Mar  6 23:12 - down  (13+10:21)
  reboot   system boot  4.13.0-36-generi Tue Mar  6 23:10 - 10:33 (13+10:23)

  wtmp begins Tue Mar  6 23:09:27 2018
  $

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: apt 1.5.1
  ProcVersionSignature: Ubuntu 4.13.0-38.43-generic 4.13.16
  Uname: Linux 4.13.0-38-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
  ApportVersion: 2.20.7-0ubuntu3.7
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Mar 21 13:02:43 2018
  InstallationDate: Installed on 2010-09-24 (2735 days ago)
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 
(20100816.1)
  SourcePackage: apt
  UpgradeStatus: Upgraded to artful on 2018-03-21 (0 days ago)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1757529] Re: apt: after reboot, still wants to keep 3 kernels when it should only keep 2

2018-03-21 Thread Steve Langasek
Attached apt term.log shows the history:
- 36 is running
- 31 is purged
- 37 is installed
- 32 is purged
- 38 is installed
- 37 is *not* purged
- rebooted to 38
- 36 and 37 are still not purged

** Attachment added: "term.log"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1757529/+attachment/5086261/+files/term.log

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1757529

Title:
  apt: after reboot, still wants to keep 3 kernels when it should only
  keep 2

Status in apt package in Ubuntu:
  New

Bug description:
  The apt kernel autoremoval handling should by design keep at least 2
  and at most 3 kernels on the system.

  However, on my 17.10 system, I currently have 3 kernels marked for
  retention while the kernel I have booted is the newest of these.  This
  means that I'm not able to upgrade to 18.04 without manual
  intervention, because I have a /boot that's sized just large enough to
  fit 3 kernels, not 4, apt autoremove won't remove any of the kernels.

  The sequence here is that I was running 4.13.0-36-generic; I updated,
  which pulled 4.13.0-37-generic onto the system; I ran apt autoremove
  --purge, which removed any kernels older than -36- from the system; I
  did *not* reboot; I installed 4.13.0-38-generic (from artful-
  proposed); all three kernels present are now marked for retention.  I
  rebooted, and all three kernels are still marked for retention.

  If /etc/kernel/postinst.d/apt-auto-removal were run *now*, it would
  mark 4.13.0-36-generic as autoremovable.  But there is nothing that
  reruns this script on boot.  Maybe there should be?

  $ last
  vorlon   tty2 :0   Tue Mar 20 11:14   still logged in
  reboot   system boot  4.13.0-38-generi Tue Mar 20 10:34   still running
  vorlon   tty2 :0   Tue Mar  6 23:12 - down  (13+10:21)
  reboot   system boot  4.13.0-36-generi Tue Mar  6 23:10 - 10:33 (13+10:23)

  wtmp begins Tue Mar  6 23:09:27 2018
  $

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: apt 1.5.1
  ProcVersionSignature: Ubuntu 4.13.0-38.43-generic 4.13.16
  Uname: Linux 4.13.0-38-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
  ApportVersion: 2.20.7-0ubuntu3.7
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Mar 21 13:02:43 2018
  InstallationDate: Installed on 2010-09-24 (2735 days ago)
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 
(20100816.1)
  SourcePackage: apt
  UpgradeStatus: Upgraded to artful on 2018-03-21 (0 days ago)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1757529] Re: apt: after reboot, still wants to keep 3 kernels when it should only keep 2

2018-03-21 Thread Steve Langasek
** Attachment added: "01autoremove-kernels"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1757529/+attachment/5086252/+files/01autoremove-kernels

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1757529

Title:
  apt: after reboot, still wants to keep 3 kernels when it should only
  keep 2

Status in apt package in Ubuntu:
  New

Bug description:
  The apt kernel autoremoval handling should by design keep at least 2
  and at most 3 kernels on the system.

  However, on my 17.10 system, I currently have 3 kernels marked for
  retention while the kernel I have booted is the newest of these.  This
  means that I'm not able to upgrade to 18.04 without manual
  intervention, because I have a /boot that's sized just large enough to
  fit 3 kernels, not 4, apt autoremove won't remove any of the kernels.

  The sequence here is that I was running 4.13.0-36-generic; I updated,
  which pulled 4.13.0-37-generic onto the system; I ran apt autoremove
  --purge, which removed any kernels older than -36- from the system; I
  did *not* reboot; I installed 4.13.0-38-generic (from artful-
  proposed); all three kernels present are now marked for retention.  I
  rebooted, and all three kernels are still marked for retention.

  If /etc/kernel/postinst.d/apt-auto-removal were run *now*, it would
  mark 4.13.0-36-generic as autoremovable.  But there is nothing that
  reruns this script on boot.  Maybe there should be?

  $ last
  vorlon   tty2 :0   Tue Mar 20 11:14   still logged in
  reboot   system boot  4.13.0-38-generi Tue Mar 20 10:34   still running
  vorlon   tty2 :0   Tue Mar  6 23:12 - down  (13+10:21)
  reboot   system boot  4.13.0-36-generi Tue Mar  6 23:10 - 10:33 (13+10:23)

  wtmp begins Tue Mar  6 23:09:27 2018
  $

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: apt 1.5.1
  ProcVersionSignature: Ubuntu 4.13.0-38.43-generic 4.13.16
  Uname: Linux 4.13.0-38-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
  ApportVersion: 2.20.7-0ubuntu3.7
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Mar 21 13:02:43 2018
  InstallationDate: Installed on 2010-09-24 (2735 days ago)
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 
(20100816.1)
  SourcePackage: apt
  UpgradeStatus: Upgraded to artful on 2018-03-21 (0 days ago)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp