[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
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c1
--- Comment #1 from Daniel Molkentin
http://bugzilla.suse.com/show_bug.cgi?id=1125327
Benjamin Brunner
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c2
--- Comment #2 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c3
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c4
--- Comment #4 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c5
--- Comment #5 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c6
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c7
Daniel Molkentin
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c8
--- Comment #8 from Daniel Molkentin
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c9
Daniel Molkentin
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
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c12
--- Comment #12 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c15
Martin Wilck
# 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
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c17
--- Comment #17 from Martin Wilck
$ 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
http://bugzilla.suse.com/show_bug.cgi?id=1125327
Marcus Meissner
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c20
--- Comment #20 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c21
--- Comment #21 from Martin Wilck
$ /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
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
http://bugzilla.suse.com/show_bug.cgi?id=1125327
http://bugzilla.suse.com/show_bug.cgi?id=1125327#c24
Michal Suchanek
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
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
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
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
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
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
http://bugzilla.suse.com/show_bug.cgi?id=1125327
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1125327
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1125327
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1125327
Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1125327
Maintenance Robot
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com