[Bug 786318] New: mkinitrd inefficiently called multiple times per updates session
https://bugzilla.novell.com/show_bug.cgi?id=786318 https://bugzilla.novell.com/show_bug.cgi?id=786318#c0 Summary: mkinitrd inefficiently called multiple times per updates session Classification: openSUSE Product: openSUSE Factory Version: 12.3 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 Found By: --- Blocker: --- Created an attachment (id=510522) --> (http://bugzilla.novell.com/attachment.cgi?id=510522) 12.2 zypp history mailing list thread starter: http://lists.opensuse.org/opensuse-kernel/2012-10/msg00048.html Each of the following packages triggered mkinitrd to build a new initrd for each installed kernel: mkinitrd udev mdadm lvm2 multipath-tools to reproduce: 1-zypper up or zypper dup where more than a few basesystem packages are updated actual behavior: 1-mkinitrd is called to product a new initrd for each installed kernel each time a package is installed that affects what goes into an initrd expected behavior: 1-mkinitrd is called no more than once per zypper dup or zypper up -- 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=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c1
andreas bittner
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c
Jiaying ren
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c2
Olaf Hering
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c3
Olaf Hering
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c4
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c5
--- Comment #5 from Felix Miata
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c6
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c7
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c8
--- Comment #8 from Felix Miata
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c9
--- Comment #9 from Felix Miata
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c10
--- Comment #10 from Michael Schröder
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c11
--- Comment #11 from Felix Miata
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c12
Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c13
Michael Andres
Now with mkinitrd being retired it is a dracut inefficiently being called multiple times per update session.
Scripts to execute (%pre/%post/%posttrans/..) are part of the packages. libzypp
now executes the defined scripts at the correct point in time.
It is not up to libzypp to decide whether scripts from different packages are
equal/equivalent:
%post a
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c14
--- Comment #14 from Felix Miata
(from libzypps POV the original 'called multiple times' issue is INVALID)
From user POV, what happens is what matters, not whose job it is to do whatever needs to be done, or its name. Original language "called multiple times" may not be technically what you want to hear, but that Fedora (and Mageia, and probably most other major distros) only writes to /boot one new initrd per hundreds of updates process (yum upgrade) while openSUSE builds as many as 5 initrds (per installed kernel) performing an essentially identical procedure (zypper dup) suggests an as yet though solvable openSUSE shortcoming that may indeed be better described than "called multiple times". Need there be a new bug opened with a summary such as "each installed kernel's initrd is rebuilt up to 5 times within less than an hour while various updates that might or do affect initrd content are installed", or something similarly wordy? I think that should not be necessary. The behavior described in comment 0 has not been perceptibly improved, and thus this bug is not fixed, unless it has happened in the past several days and hasn't made it to the oss mirrors yet.
-- 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=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c15
--- Comment #15 from Ulrich Windl
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c16
--- Comment #16 from Michael Schröder
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c17
--- Comment #17 from Michael Andres
Please create a new bug about the handling of mkinitrd in the kernel and kmp packages and assign it to the kernel folks.
That's covered by bug#858840 which was closed as dup of this, though it's rather been blocked by this. I already suggested to reopen it in case the scripts are not yet fixed. -- 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=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c18
--- Comment #18 from Felix Miata
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c19
--- Comment #19 from Michael Andres
There is as yet in Factory only marginal evidence this has been improved at all, with a zypper dup causing one run of initrd creation
To clarify: Executing %posttrans correctly will _NOT_ cause one run of initrd creation. The zypp fix only asserts that all %posttrans scripts are collected and executed correctly at the end of the transaction. But if N %posttrans scripts run initrd, it will be exectuted N times. It's task of the %posttrans script (thus of the package maintainer) to prevent superfluous actions. (e.g. touching an indicator file in each %postinstall and let the %posttrans perform only if the file exists; removing it afterwards) -- 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=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c20
--- Comment #20 from Felix Miata
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c21
--- Comment #21 from Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c22
--- Comment #22 from Felix Miata
See comment#17 here and bug#858840#8
Those really don't help much, more or less pointing to each other. The difference is this was filed against basesystem in Factory, which could be fixed, unlike 858840, filed against "update problems" in 12.3 , which would go out of support next month if 13.2's target released hadn't been postponed, and wouldn't make sense to fix unless 13.1 (future Evergreen) and/or Factory get fixed soon, and bringing the fix back to 12.3 would be simple. -- 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=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c23
--- Comment #23 from Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c24
Christian Boltz
To clarify: Executing %posttrans correctly will _NOT_ cause one run of initrd creation.
The zypp fix only asserts that all %posttrans scripts are collected and executed correctly at the end of the transaction. But if N %posttrans scripts run initrd, it will be exectuted N times.
It's task of the %posttrans script (thus of the package maintainer) to prevent superfluous actions. (e.g. touching an indicator file in each %postinstall and let the %posttrans perform only if the file exists; removing it afterwards)
Are you serious about this? It sounds like "broken by design" to me because it basically means all packages containing a %posttrans script need to be modified. IMHO at least %posttrans scripts that have exactly the same content should be de-duplicated automatically by libzypp. I'd guess this would catch most of the %posttrans scripts we have. And: yes, I'm also aware that it won't catch all duplicates. But it would improve the situation a lot without causing lots of work to the package maintainers. BTW: Even if you don't plan to change this behaviour, it should at least be documented in the wiki. The only page containing posttrans is http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets (well, and "Cron rename") so this sounds like a good place to document it. Reopening to make sure it's documented (or ideally the behaviour gets improved). -- 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=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c25
Michael Andres
IMHO at least %posttrans scripts that have exactly the same content should be de-duplicated
No, they are executed the same way as plain rpm does. Apart from that, there's no way for the installer to tell whether de-duplication is appropriate for a specific script or not.
it should at least be documented in the wiki
Authority for %posttrans is rpm and rpm is well documented. It's been a bug, that due to the way we use rpm, %posttrans scripts did not work as expected when transactions are executed by zypp. -- 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=786318
https://bugzilla.novell.com/show_bug.cgi?id=786318#c
Felix Miata
participants (1)
-
bugzilla_noreply@novell.com