[Bug 792925] New: Multiversion and kernel purge
https://bugzilla.novell.com/show_bug.cgi?id=792925 https://bugzilla.novell.com/show_bug.cgi?id=792925#c0 Summary: Multiversion and kernel purge Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: x86-64 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: andrea.turrini@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 I have enabled multiversion for kernel and I have found this strange thing: if I have understood correctly the multiversion approach, when the kernel is installed, the empty file /boot/do_purge_kernels is created and then, on the following boot, /sbin/purge-kernels is run in order to remove old kernels that are not to be kept according to the value of multiversion.kernels. The file /etc/init.d/purge-kernels refers to /boot/do_purge_kernels while /etc/systemd/system/multi-user.target.wants/purge-kernels.service (link to /lib/systemd/system/purge-kernels.service) checks for /boot/do_pure_kernels. Note the "pure" instead of "purge" in the filename. As a result, purge-kernels.service fails as reported by systemctl: orodruin:~ # systemctl status purge-kernels.service purge-kernels.service - Purge old kernels Loaded: loaded (/lib/systemd/system/purge-kernels.service; enabled) Active: inactive (dead) start condition failed at Wed, 05 Dec 2012 14:08:40 +0100; 6min ago CGroup: name=systemd:/system/purge-kernels.service and /boot/do_purge_kernels is still existing. This means that now I have 5 installed kernels: orodruin:~ # zypper se -si --match-exact kernel-desktop Verbosity: 2 Non-option program arguments: 'kernel-desktop' Initializing Target Loading repository data... Reading installed packages... Force resolution: No S | Name | Type | Version | Arch | Repository --+----------------+---------+---------------+--------+--------------------- i | kernel-desktop | package | 3.6.9-1.1 | x86_64 | Kernel-Stable i | kernel-desktop | package | 3.4.11-2.16.1 | x86_64 | openSUSE-12.2-Update i | kernel-desktop | package | 3.6.8-1.1 | x86_64 | (System Packages) i | kernel-desktop | package | 3.6.7-1.1 | x86_64 | (System Packages) i | kernel-desktop | package | 3.6.6-1.1 | x86_64 | (System Packages) even if orodruin:~ # grep multiversion /etc/zypp/zypp.conf ## provides:multiversion(kernel) - all packages providing 'multiversion(kernel)' multiversion = provides:multiversion(kernel) ## above multiversion variable is set. Packages can be specified as ## Default: Do not delete any kernels if multiversion = provides:multiversion(kernel) is set multiversion.kernels = latest-2,latest-1,latest,running If I edit /lib/systemd/system/purge-kernels.service and I fix the filenames, then the kernels are purged correcly. I have tried by running "systemctl start purge-kernels.service" so it should work also on boot, and the now installed kernels are: orodruin:~ # zypper se -si --match-exact kernel-desktop Verbosity: 2 Non-option program arguments: 'kernel-desktop' Initializing Target Loading repository data... Reading installed packages... Force resolution: No S | Name | Type | Version | Arch | Repository --+----------------+---------+-----------+--------+------------------ i | kernel-desktop | package | 3.6.9-1.1 | x86_64 | Kernel-Stable i | kernel-desktop | package | 3.6.8-1.1 | x86_64 | (System Packages) i | kernel-desktop | package | 3.6.7-1.1 | x86_64 | (System Packages) and systemctl reports: orodruin:~ # systemctl status purge-kernels.service purge-kernels.service - Purge old kernels Loaded: loaded (/lib/systemd/system/purge-kernels.service; enabled) Active: inactive (dead) since Wed, 05 Dec 2012 14:25:12 +0100; 11min ago Process: 2160 ExecStart=/sbin/purge-kernels (code=exited, status=0/SUCCESS) Process: 2156 ExecStartPre=/bin/rm -f /boot/do_purge_kernels (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/purge-kernels.service Dec 05 14:25:11 orodruin.lotr os-prober[5654]: debug: running /usr/lib/os-probes/mounted/10freedos on mounted /dev/sda4 Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: Removed: Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-desktop-3.4.11-2.16.1.x86_64 Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-desktop-devel-3.4.11-2.16.1.x86_64 Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-desktop-3.6.6-1.1.x86_64 Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-desktop-devel-3.6.6-1.1.x86_64 Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-source-3.4.11-2.16.1.noarch Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-devel-3.4.11-2.16.1.noarch Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-devel-3.6.6-1.1.noarch Dec 05 14:25:12 orodruin.lotr purge-kernels[2160]: kernel-source-3.6.6-1.1.noarch This problem occurs in both mkinitrd-2.7.1-62.6.1 (as shipped by oS 12.2) and mkinitrd-2.7.2-189.1 (available in kernel:stable). Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c
Jiaying ren
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c1
Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c2
Benjamin Brunner
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c3
--- Comment #3 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c4
Paolo Panto
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c5
Lars Müller
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c6
Lars Müller
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c7
--- Comment #7 from Lars Müller
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c8
--- Comment #8 from Paolo Panto
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c9
Andrea Turrini
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c10
--- Comment #10 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c11
Lars Müller
https://bugzilla.novell.com/show_bug.cgi?id=792925
https://bugzilla.novell.com/show_bug.cgi?id=792925#c12
--- Comment #12 from Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com