[Bug 1125327] New: /sbin/purge-kernels is in endless loop since last maintenance update
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Bug ID: 1125327 Summary: /sbin/purge-kernels is in endless loop since last maintenance update Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.0 Hardware: Other OS: Other Status: NEW Severity: Critical Priority: P5 - None Component: Bootloader Assignee: jsrain@suse.com Reporter: adrian@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- /sbin/purge-kernels is permanent trying to purge my kernel since last maintainenace update. However, it always fails since it is not taking into accoung that another package may depend on it: /sbin/purge-kernels: virtualbox-host-kmp = 5.2.22 is needed by (installed) virtualbox-5.2.22-lp150.4.23.1.x86_64 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Adrian Schröter <adrian@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jsrain@suse.com |daniel.molkentin@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c1 --- Comment #1 from Daniel Molkentin <daniel.molkentin@suse.com> --- That change was introduced here: Mon Sep 10 16:38:12 UTC 2018 - msuchanek@suse.com - Add kernel-syms to list of packages to remove with purge-kernels (bsc#1104090). Michal, how should we deal with this? Can we just remove the kmps as well? If so, can you come up with a patch? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msuchanek@suse.com Flags| |needinfo?(msuchanek@suse.co | |m) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c2 --- Comment #2 from Michal Suchanek <msuchanek@suse.com> --- In this case the kernel should be kept. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c3 Michal Suchanek <msuchanek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED Assignee|daniel.molkentin@suse.com |msuchanek@suse.com Flags|needinfo?(msuchanek@suse.co | |m) | --- Comment #3 from Michal Suchanek <msuchanek@suse.com> --- We have two kABI versions of virtualbox-host-kmp. If you install sufficiently old virtualbox (ie the oldest you can find) you get the old kABI version and an old kernel. With this you can reproduce the issue. There was a workaround added for kernels on which a package might depend and the kernel is removed from the list of kernels to remove when something depends on it. This however does not work if something depends on the kernel indirectly: old kernel - old kmp - old virtualbox In this case attempt to remove the kernel triggers removing the kmp and attempt removing the kmp fails because virtualbox depends on it. The old kmp is removed from the list of packages to remove and the operation is retried. However, the old kernel is still on the list of packages to remove and attempting to remove it adds the old kmp as well. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c4 --- Comment #4 from Michal Suchanek <msuchanek@suse.com> --- Created attachment 797444 --> http://bugzilla.suse.com/attachment.cgi?id=797444&action=edit patch for purge-kernels -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Michal Suchanek <msuchanek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|msuchanek@suse.com |daniel.molkentin@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c5 --- Comment #5 from Michal Suchanek <msuchanek@suse.com> --- It should be fine to just copy the factory purge-kernels into all dracut versions. There are kgraft packages in some distributions and livepatch in others. Including both in the list of kernel-dependent packages should be fine. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c6 Michal Suchanek <msuchanek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.molkentin@suse.com Flags| |needinfo?(daniel.molkentin@ | |suse.com) --- Comment #6 from Michal Suchanek <msuchanek@suse.com> --- Daniel, do you want me to submit dracut MUs with this change only or will you pick it for future updates? The script is not tracked in git so it needs to be handled specially, unfortunately. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c7 Daniel Molkentin <daniel.molkentin@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(daniel.molkentin@ | |suse.com) | --- Comment #7 from Daniel Molkentin <daniel.molkentin@suse.com> --- Just providing the patch here will do nicely. I will make sure it ends up where it needs to be. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c8 --- Comment #8 from Daniel Molkentin <daniel.molkentin@suse.com> --- I will take it from here. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c9 Daniel Molkentin <daniel.molkentin@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #9 from Daniel Molkentin <daniel.molkentin@suse.com> --- Submitted to Factory and SLE12-SP2 up to SLE15-SP0-1. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c10 --- Comment #10 from Swamp Workflow Management <swamp@suse.de> --- This is an autogenerated message for OBS integration: This bug (1125327) was mentioned in https://build.opensuse.org/request/show/678954 Factory / dracut -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c12 --- Comment #12 from Michal Suchanek <msuchanek@suse.com> --- SLE 12 SP0/SP1 also have the code queued in an update so this should be put on top I guess. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c15 Martin Wilck <martin.wilck@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.wilck@suse.com --- Comment #15 from Martin Wilck <martin.wilck@suse.com> --- Test of Michal's patch under SLE11-SP4-GA. TL;DR: It all works as designed.
# uncomment and edit the "multiversion" settings in zypp.conf, like this: $ grep ^multiversion /etc/zypp/zypp.conf multiversion = provides:multiversion(kernel) multiversion.kernels = latest,latest-1,running # install test package with patch from Michal $ zypper in mkinitrd-2.4.2-106.12.1.x86_64.rpm # add SLE11-SP3 repo to simulate a system with old kernels $ zypper ar http://dist.suse.de/update/build-ncc.suse.de/SUSE/Updates/SLE-SERVER/11-SP3/... sp3-update # install a test package that requires "xen-kmp-default" $ zypper in ineed-0.1-2.1.noarch.rpm # install two kernels from SLE-11-SP3 (running kernel is SP4 one). $ rpm -qa kernel-default-base kernel-default xen-kmp-default | sort kernel-default-base-3.0.101-0.8.1 kernel-default-base-3.0.101-0.15.1 kernel-default-base-3.0.101-63.1 kernel-default-3.0.101-0.8.1 kernel-default-3.0.101-0.15.1 kernel-default-3.0.101-63.1 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9 $ rpm -q --whatrequires xen-kmp-default ineed-0.1-2.1
Now purge-kernels should uninstall the oldest kernel, as the requirements of xen-kmp-default are met by the latest-1 kernel (3.0.101-0.15.1). This succeeds:
$ /sbin/purge-kernels Removed: kernel-default-base-3.0.101-0.8.1.x86_64 kernel-default-3.0.101-0.8.1.x86_64 $ /sbin/purge-kernels /sbin/purge-kernels: Nothing to do.
Now I remove "latest-1" from the multiversion configuration.
$ sed -i 's/multiversion.kernels = latest,latest-1,running/multiversion.kernels = latest,running/' /etc/zypp/zypp.conf $ grep ^multiversion.kernels /etc/zypp/zypp.conf multiversion.kernels = latest,running $ /sbin/purge-kernels error: Failed dependencies: xen-kmp-default is needed by (installed) ineed-0.1-2.1.noarch /sbin/purge-kernels: giving up.
This is expected because of the ineed -> xen-kmp-default -> kernel-default-base- 3.0.101-0.8.1.x86_64 dependency chain. Note that this happens only if a newer xen-kmp-default package (for the SP4 kernel) is not installed. If I install that package, the SP3 kernel can be uninstalled:
$ zypper in xen-kmp-default-4.4.2_08_3.0.101_63-1.7.x86_64 $ rpm -qa kernel-default-base kernel-default xen-kmp-default|sort kernel-default-3.0.101-0.15.1 kernel-default-3.0.101-63.1 kernel-default-base-3.0.101-0.15.1 kernel-default-base-3.0.101-63.1 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9 xen-kmp-default-4.4.2_08_3.0.101_63-1.7 $ /sbin/purge-kernels Removed: kernel-default-3.0.101-0.15.1.x86_64 kernel-default-base-3.0.101-0.15.1.x86_64 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9.x86_64
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c16 --- Comment #16 from Martin Wilck <martin.wilck@suse.com> --- Created attachment 798413 --> http://bugzilla.suse.com/attachment.cgi?id=798413&action=edit test package used in previous comment A dummy package simply requiring "xen-kmp-default". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c17 --- Comment #17 from Martin Wilck <martin.wilck@suse.com> --- Forgot to document this test in comment 15, without the "ineed" package the KMP is auto-removed as it should:
$ zypper remove ineed Removing ineed-0.1-2.1 [done] $ rpm -qa kernel-default-base kernel-default xen-kmp-default|sort kernel-default-3.0.101-0.8.1 kernel-default-3.0.101-63.1 kernel-default-base-3.0.101-0.8.1 kernel-default-base-3.0.101-63.1 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9 $ /sbin/purge-kernels --test Removed: kernel-default-base-3.0.101-0.8.1.x86_64 kernel-default-3.0.101-0.8.1.x86_64 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9.x86_64
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c19 --- Comment #19 from Martin Wilck <martin.wilck@suse.com> --- Info for QA: in case you are trying to verify the bug fix, look at comment 15 and comment 17. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Marcus Meissner <meissner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |meissner@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c20 --- Comment #20 from Michal Suchanek <msuchanek@suse.com> --- Created attachment 798584 --> http://bugzilla.suse.com/attachment.cgi?id=798584&action=edit Handle unversioned dependency in purge-kernels This patch is needed when using the above package for testing. The dependency in the testing package is not versioned which purge-kernels cannot parse. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c21 --- Comment #21 from Martin Wilck <martin.wilck@suse.com> --- FTR, comment 20 refers to this part of comment 15:
$ /sbin/purge-kernels error: Failed dependencies: xen-kmp-default is needed by (installed) ineed-0.1-2.1.noarch /sbin/purge-kernels: giving up.
This is expected because of the ineed -> xen-kmp-default -> kernel-default-base- 3.0.101-0.8.1.x86_64 dependency chain.
I was wrong here - this was not expected. Rather than "giving up", purge-kernels should detect the situation and exit with success status. The end result (kernel and KMP not being uninstalled) would be the same. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c22 --- Comment #22 from Martin Wilck <martin.wilck@suse.com> --- Looking correct with latest patch:
root@sles11-sp3-gm-01:mwilck# rpm -qa kernel-default xen-kmp-default kernel-default-3.0.101-0.8.1 kernel-default-3.0.76-0.11.1 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9 kernel-default-3.0.101-0.47.106.59.1 kernel-default-3.0.101-0.15.1 kernel-default-3.0.101-63.1 root@sles11-sp3-gm-01:mwilck# grep '^multiversion.kernels' /etc/zypp/zypp.conf multiversion.kernels = latest,running
reboot ...
purge-kernels start
Removing old kernel packages... /sbin/purge-kernels: xen-kmp-default is needed by (installed) ineed-0.1-2.1.noarch /sbin/purge-kernels: Keeping xen-kmp-default (xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9.x86_64) /sbin/purge-kernels: kernel(default:kernel_irq_manage) = df116b2af1994bcf is needed by (installed) xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9.x86_64 /sbin/purge-kernels: Keeping kernel(default:kernel_irq_manage) = df116b2af1994bcf (kernel-default-base-3.0.101-0.47.106.59.1.x86_64) Removed: kernel-default-3.0.76-0.11.1.x86_64 kernel-default-base-3.0.76-0.11.1.x86_64 kernel-default-3.0.101-0.8.1.x86_64 kernel-default-base-3.0.101-0.8.1.x86_64 kernel-default-base-3.0.101-0.15.1.x86_64 kernel-default-3.0.101-0.15.1.x86_64 kernel-default-3.0.101-0.47.106.59.1.x86_64 done
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c23 Martin Wilck <martin.wilck@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(msuchanek@suse.co | |m) --- Comment #23 from Martin Wilck <martin.wilck@suse.com> --- Note in previous comment that kernel-default-3.0.101-0.47.106.59.1.x86_64 was also removed - only kernel-default-base is required to fulfil the xen module's dependencies. @Michal I reckon this is intended, right? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c24 Michal Suchanek <msuchanek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(msuchanek@suse.co | |m) | --- Comment #24 from Michal Suchanek <msuchanek@suse.com> --- (In reply to Martin Wilck from comment #23)
Note in previous comment that kernel-default-3.0.101-0.47.106.59.1.x86_64 was also removed - only kernel-default-base is required to fulfil the xen module's dependencies.
@Michal I reckon this is intended, right?
That's not really intended. The sorting is by version normally but kernel-default-NNN sorts before kernel-default-base-NNN so kernel-default-base is kept. It does not remove things that should not be removed, though. I don't want to add another workaround specifically for SLE11 unless somebody complains. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c25 --- Comment #25 from Martin Wilck <martin.wilck@suse.com> --- (In reply to Michal Suchanek from comment #24)
I don't want to add another workaround specifically for SLE11 unless somebody complains.
Sure, full ack. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c27 --- Comment #27 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2019:0544-1: An update that has one recommended fix can now be installed. Category: recommended (moderate) Bug References: 1125327 CVE References: Sources used: SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src): dracut-044.1-18.21.1 SUSE Linux Enterprise Module for Basesystem 15 (src): dracut-044.1-18.21.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c28 --- Comment #28 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2019:0546-1: An update that has 14 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1008352,1013573,1053248,1055834,1090884,1098448,1110519,1112327,1113712,1119499,1121251,1124088,1125327,937555 CVE References: Sources used: SUSE Linux Enterprise Server 12-SP3 (src): dracut-044.1-114.25.1 SUSE Linux Enterprise Desktop 12-SP3 (src): dracut-044.1-114.25.1 SUSE CaaS Platform ALL (src): dracut-044.1-114.25.1 SUSE CaaS Platform 3.0 (src): dracut-044.1-114.25.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c29 --- Comment #29 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2019:0547-1: An update that has 5 recommended fixes can now be installed. Category: recommended (important) Bug References: 1008352,1019938,1048551,1104090,1125327 CVE References: Sources used: SUSE OpenStack Cloud 7 (src): dracut-044.1-109.37.1 SUSE Linux Enterprise Server for SAP 12-SP2 (src): dracut-044.1-109.37.1 SUSE Linux Enterprise Server 12-SP2-LTSS (src): dracut-044.1-109.37.1 SUSE Linux Enterprise Server 12-SP2-BCL (src): dracut-044.1-109.37.1 SUSE Enterprise Storage 4 (src): dracut-044.1-109.37.1 OpenStack Cloud Magnum Orchestration 7 (src): dracut-044.1-109.37.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c30 --- Comment #30 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2019:0545-1: An update that has three recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1113712,1124088,1125327 CVE References: Sources used: SUSE Linux Enterprise Server 12-SP4 (src): dracut-044.1-10.9.1 SUSE Linux Enterprise Desktop 12-SP4 (src): dracut-044.1-10.9.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c31 --- Comment #31 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2019:13986-1: An update that has one recommended fix can now be installed. Category: recommended (moderate) Bug References: 1125327 CVE References: Sources used: SUSE Linux Enterprise Server 11-SP4 (src): mkinitrd-2.4.2-106.11.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): mkinitrd-2.4.2-106.11.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard| |ibs:running:9153:moderate | |ibs:running:9152:moderate -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|ibs:running:9153:moderate |ibs:running:9153:moderate |ibs:running:9152:moderate |ibs:running:9152:moderate | |ibs:running:10759:moderate -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|ibs:running:9153:moderate |ibs:running:9153:moderate |ibs:running:9152:moderate |ibs:running:9152:moderate |ibs:running:10759:moderate | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1125327 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|ibs:running:9153:moderate |ibs:running:9153:moderate |ibs:running:9152:moderate | -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1125327 Maintenance Robot <maint-coord+maintenance_robot@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|ibs:running:9153:moderate | -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com