[Bug 881780] New: dracut inefficiently called multiple times per zypper [dup|up|in] command
https://bugzilla.novell.com/show_bug.cgi?id=881780 https://bugzilla.novell.com/show_bug.cgi?id=881780#c0 Summary: dracut inefficiently called multiple times per zypper [dup|up|in] command Classification: openSUSE Product: openSUSE Factory Version: 13.2 Milestone 0 Platform: PC OS/Version: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: mrmazda@earthlink.net QAContact: qa-bugs@suse.de CC: hare@suse.com, ma@suse.com, tiwai@suse.com, trenn@suse.com, werner@suse.com, Ulrich.Windl@rz.uni-regensburg.de, suse-beta@cboltz.de, abittner@abittner.de, nfbrown@suse.com, mmarek@suse.com, dmzhang@suse.com, arvidjaar@gmail.com, sfalken@opensuse.org Depends on: 786318 Found By: --- Blocker: --- If they ever had this problem, Fedora, Mageia & Buntu solved it many many moons ago, by during upgrade processes *not* automatically rebuilding initrds for previously installed kernels. +++ This bug was initially created as a clone of Bug #786318 +++ and Bug #858840 +++ This is filed to finish what was started there but closed after the libzypp foundation was "fixed". mailing list thread starter: http://lists.opensuse.org/opensuse-kernel/2012-10/msg00048.html see also Novell access only FATE 313506 Each of the following packages triggers dracut to build a new initrd for each installed kernel: device-mapper dracut (sometimes? already fixed? never?) lvm2 mdadm multipath-tools udev To reproduce: 1a-zypper up or zypper dup where any of the above listed packages are upgraded, or 1b-zypper in one or more of the above listed packages Actual behavior: 1-dracut is called to product a new initrd for each installed kernel each time a package is installed that ever affects what goes into an initrd (today's session, with lock kernel* set, nearly 3 months after 786318 was marked fixed, on a 64 bit Factory installation last upgraded 10 days ago: -rw------- 1 root root 5974312 Jun 6 17:27 /boot/initrd-3.14.0-2-desktop6 -rw------- 1 root root 5974432 Jun 6 17:29 /boot/initrd-3.14.0-2-desktop7 -rw------- 1 root root 5972896 Jun 6 17:30 /boot/initrd-3.14.0-2-desktop8 -rw------- 1 root root 5974668 Jun 6 17:40 /boot/initrd-3.14.0-2-desktop9 -rw------- 1 root root 5974668 Jun 6 17:40 /boot/initrd-3.14.0-2-desktop) Expected behavior: 1a-[minimum] dracut is called no more than once per kernel per zypper [in|up|dup], or 1b-[better] dracut is never automatically called against a previously installed kernel According to comment 13 and following in 786318, the packages calling dracut need modifications to their scripting to defer the call until after all callers have registered desire, hence this bug to complete a fix. CCs to maintainers of affecting packages and/or those in the changelogs of packages whose maintainers don't show up in the changelogs, plus selected CCs from parent bugs. -- 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=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c
Xiyuan Liu
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c1
Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c2
Felix Miata
So what exactly should be put in the spec file to make it work nicely?
I think Michael Andres thinks he explained when he twice closed bug 786318. I have little idea how most scripting works, much less scripts included in rpms. Nor do I know anything meaningful about even building an rpm, thus no way to know if in fact he really did explain, and no way I can answer your question. -- 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=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c3
--- Comment #3 from Michael Andres
So what exactly should be put in the spec file to make it work nicely?
E.g: rpm -qp device-mapper-1.02.78-0.15.5.x86_64.rpm --scripts ... postinstall scriptlet (using /bin/sh): [ -x /sbin/mkinitrd ] && /sbin/mkinitrd Running mkinitrd in a packages %postinstall script results in a mkinitrd call for each package requesting it, _immediately_ after the package was installed. As mkinitrd seems to be longrunning, the question is whether running mkinitrd could be delayed until all packages in one transaction are installed? - In this case mkinitrd should be executed by the packages %posttrans script rather than by the packages %post(install) script. - If N package request execution of mkinitrd in their %posttrans scripts, this will still result in N invocations of mkinitrd, but between these call no new packages are installed. It would be great if mkinitrd was smart enough to detect this, so you get a first long running call and fast N-1 calls, as there is nothing more to do. If mkinitrd is not that smart, package maintainers could e.g. negotiate an indicator file which is touched in a packages %post(install) script, telling that mkinitrd needs to be run. In the %posttrans scripts mkinitrd is called only if the indicator file exists and the file is removed afterwards. This way subsequent %posttrans scripts executed in the same transaction will not call mkinitrd again. Obvoiously a 'smart' mkinitrd would be preferred. -- 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=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c4
Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c5
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c6
--- Comment #6 from Ulrich Windl
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c7
--- Comment #7 from Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c8
--- Comment #8 from Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c9
--- Comment #9 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c11
--- Comment #11 from Thomas Renninger
https://bugzilla.novell.com/show_bug.cgi?id=881780
https://bugzilla.novell.com/show_bug.cgi?id=881780#c12
--- Comment #12 from Thomas Renninger
http://bugzilla.novell.com/show_bug.cgi?id=881780
Martin Pluskal
http://bugzilla.novell.com/show_bug.cgi?id=881780
Michal Marek
http://bugzilla.novell.com/show_bug.cgi?id=881780
--- Comment #17 from Takashi Iwai
participants (1)
-
bugzilla_noreply@novell.com