Bug 965897
Summary: | systemd's kernel-install calls new-kernel-pkg with wrong parameters | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Brendan Conoboy <blc> | ||||
Component: | systemd | Assignee: | systemd-maint | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | awilliam, bruno, harald, johannbg, kevin, lnykryn, msekleta, notting, pbrobinson, plautrba, systemd-maint, vpavlin, zbyszek | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | systemd-204-4.fc19 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-05-28 09:27:39 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 245418 | ||||||
Attachments: |
|
systemd-204-3.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/systemd-204-3.fc19 Package systemd-204-3.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-204-3.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-8993/systemd-204-3.fc19 then log in and leave karma (feedback). Hum. [root@jelerak ~]# /bin/kernel-install add 3.10.0-0.rc2.git1.1.fc20.x86_64 /boot/vmlinuz-3.10.0-0.rc2.git1.1.fc20.x86_64 depmod: WARNING: could not open /lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.builtin: No such file or directory depmod: WARNING: could not open /var/tmp/initramfs.RES8tO/lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/initramfs.RES8tO/lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.builtin: No such file or directory [root@jelerak ~]# grep kernel-3.10.0-0.rc2.git1.1 /etc/grub2.cfg Doesn't seem to be working right here. :( This is rawhide, but same systemd version: systemd-204-3.fc20.x86_64 I see. The patch was never actually applied in the spec file. ;) If you like I can do so, or you can and push out a new rawhide / f19 versions? I *edited* the patch, not *added* it. :) Why would it be used in F19, this should only affect rawhide, doesn't it? Initialized empty Git repository in /home/kay/data/fedora/systemd/systemd-204/.git/ + git config user.email systemd-maint + git config user.name 'Fedora systemd team' + git add . + git commit -a -q -m '204 baseline.' + git am /home/kay/data/fedora/systemd/kernel-install-grubby.patch Applying: kernel-install: add fedora specific callouts to new-kernel-pkg + exit 0 Alot of us in the QA community have fedora-rawhide-kernel-nodebug repo install or just generally run the latest kernel to test on our workstation and doing so on F18 yields this these days since the kernel has started to have hard dependency on specific dracut/systemd releases --> Finished Dependency Resolution Error: Package: kernel-3.10.0-0.rc2.git0.4.fc20.x86_64 (fedora-rawhide-kernel-nodebug) Requires: systemd >= 203-2 Installed: systemd-201-2.fc18.7.x86_64 (@updates-testing) systemd = 201-2.fc18.7 Available: systemd-195-15.fc18.x86_64 (fedora) systemd = 195-15.fc18 Error: Package: kernel-3.10.0-0.rc2.git0.4.fc20.x86_64 (fedora-rawhide-kernel-nodebug) Requires: dracut >= 027 Installed: dracut-024-25.git20130205.fc18.x86_64 (@updates) dracut = 024-25.git20130205.fc18 Available: dracut-024-18.git20130102.fc18.x86_64 (fedora) dracut = 024-18.git20130102.fc18 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest so we should or rather need to start considering syncing better the updates strategy of the core/base OS releases to GA ( F18/F19+ ) at least come up with somekind of strategy/plan involving updating the kernel/dracut/systemd/util-linux etc.probably an topic for guadec if all the relevant parties are there. (In reply to Kay Sievers from comment #6) > I *edited* the patch, not *added* it. :) > > Why would it be used in F19, this should only affect rawhide, doesn't it? ok. I see the setup now... :) So, yes, the patch was changed was applied, but doesn't seem to work here. It never adds the new kernel to grub. [root@jelerak ~]# sh -x /bin/kernel-install add 3.10.0-0.rc2.git1.1.fc20.x86_64 /boot/vmlinuz-3.10.0-0.rc2.git1.1.fc20.x86_64 + [[ -x /sbin/new-kernel-pkg ]] + case "$1" in + /sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --update 3.10.0-0.rc2.git1.1.fc20.x86_64 depmod: WARNING: could not open /lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.builtin: No such file or directory depmod: WARNING: could not open /var/tmp/initramfs.cuyYn4/lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/initramfs.cuyYn4/lib/modules/3.10.0-0.rc2.git1.1.fc20.x86_64/modules.builtin: No such file or directory + /sbin/new-kernel-pkg --package kernel --rpmposttrans 3.10.0-0.rc2.git1.1.fc20.x86_64 + [[ -d /boot/loader/entries ]] + [[ -L /boot/loader/entries ]] + exit 0 So, this seems now to be a bug in /sbin/new-kernel-pkg / grubby? systemd-204-3.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. I don't think grubby has changed since things starting breaking. For a while kernel-install was sort of working (not for PAE kernels, see bug 964023), but now grub.conf files are not getting updated. This is still not right. ;) Old kernels: postinstall scriptlet (using /bin/sh): if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] && [ -f /etc/sysconfig/kernel ]; then /bin/sed -r -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel || exit $? fi /sbin/new-kernel-pkg --package kernel --install 3.9.4-200.fc18.x86_64 || exit $? preuninstall scriptlet (using /bin/sh): /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove 3.9.4-200.fc18.x86_64 || exit $? posttrans scriptlet (using /bin/sh): /sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --update 3.9.4-200.fc18.x86_64 || exit $? /sbin/new-kernel-pkg --package kernel --rpmposttrans 3.9.4-200.fc18.x86_64 || exit $? new kernels: postinstall scriptlet (using /bin/sh): if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] && [ -f /etc/sysconfig/kernel ]; then /bin/sed -r -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel || exit $? fi preuninstall scriptlet (using /bin/sh): /bin/kernel-install remove 3.10.0-0.rc2.git1.2.fc20.x86_64 /boot/vmlinuz-3.10.0-0.rc2.git1.2.fc20.x86_64 || exit $? posttrans scriptlet (using /bin/sh): /bin/kernel-install add 3.10.0-0.rc2.git1.2.fc20.x86_64 /boot/vmlinuz-3.10.0-0.rc2.git1.2.fc20.x86_64 || exit $? system's /bin/kernel-install is only being called in posttrans now, and only doing 'update' which does nothing at all since the entry was never added. Old kernels called install in post, then update in posttrans. So, either the kernel needs to call /bin/kernel-install with a install argument in post, or /bin/kernel-install needs to install and update in posttrans. Happy to gather more info or whatnot, but rawhide kernels are never updating now, which is kinda anoying. ;) kay: in addition to what others have said, F19 will certainly be rebased to kernel 3.10 post-release, so we may as well fix this there now. (In reply to Adam Williamson from comment #12) > kay: in addition to what others have said, F19 will certainly be rebased to > kernel 3.10 post-release, so we may as well fix this there now. When the kernel is rebased the kernel.spec or major changes generally are not so the mechanism used for kernel installs should remain as it is now for the lifecycle of F-19. (In reply to Kevin Fenzi from comment #11) > system's /bin/kernel-install is only being called in posttrans now, and only > doing 'update' which does nothing at all since the entry was never added. > Old kernels called install in post, then update in posttrans. So, either the > kernel needs to call /bin/kernel-install with a install argument in post, or > /bin/kernel-install needs to install and update in posttrans. kernel-install now does "--install" and "--update" and "--posttrans" in posttrans. 3 calls to /sbin/new-kernel-pkg to do a simple job :-/ People have been encouraged to test rawhide kernels in f19. It would be nice to keep it easy to keep using them. (Copying over the config entries by hand is a pain.) Does the new mechanism respect configuration set in /etc/sysconfig/kernel ? Please also queue this fix for F19. (In reply to Brendan Conoboy from comment #17) > Please also queue this fix for F19. kernel-install is currently only being used on rawhide so there is no fix needed for F-19 The kernel-install script is being used by the 3.10 kernel which will land in F19 post-release. (In reply to Brendan Conoboy from comment #19) > The kernel-install script is being used by the 3.10 kernel which will land > in F19 post-release. Not necessarily. It's a patch being applied to the rawhide kernel that won't necessarily be merged back to F-19. It was my understanding that the request was just for rawhide to get wider testing. Maybe the kernel team can clarify this [1] http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?id=6d752ab3ea52e9562776f850f7b884824aea7a21 (In reply to Peter Robinson from comment #20) > (In reply to Brendan Conoboy from comment #19) > > The kernel-install script is being used by the 3.10 kernel which will land > > in F19 post-release. > > Not necessarily. It's a patch being applied to the rawhide kernel that won't > necessarily be merged back to F-19. It was my understanding that the request > was just for rawhide to get wider testing. Maybe the kernel team can clarify > this > > [1] > http://pkgs.fedoraproject.org/cgit/kernel.git/commit/ > ?id=6d752ab3ea52e9562776f850f7b884824aea7a21 3.10 has nothing to do with kernel-install. kernel-install is an F20 and beyond change. (In reply to Josh Boyer from comment #21) > (In reply to Peter Robinson from comment #20) > > (In reply to Brendan Conoboy from comment #19) > > > The kernel-install script is being used by the 3.10 kernel which will land > > > in F19 post-release. > > > > Not necessarily. It's a patch being applied to the rawhide kernel that won't > > necessarily be merged back to F-19. It was my understanding that the request > > was just for rawhide to get wider testing. Maybe the kernel team can clarify > > this > > > > [1] > > http://pkgs.fedoraproject.org/cgit/kernel.git/commit/ > > ?id=6d752ab3ea52e9562776f850f7b884824aea7a21 > > 3.10 has nothing to do with kernel-install. kernel-install is an F20 and > beyond change. That being said, if it continues to remain broken in rawhide we'll revert the kernel.spec changes. The intention is to get it working in rawhide ASAP so that it's fixed well before F20 is released. It looks like a fixed systemd got built for f19 today. Thanks. |
Created attachment 751443 [details] Call new-kernel-pkg with --update instead of --install The 3.9 kernel series and earlier called /sbin/new-kernel-pkg directly as part of posttrans. As of 3.10 the kernel calls /bin/kernel-install which then calls /sbin/new-kernel-pkg. The invocation of new-kernel-pkg uses a different, incompatible, set of arguments than were used in 3.9. How it was handled in 3.9's posttrans: /sbin/new-kernel-pkg --package $kernelpkg --mkinitrd --dracut --depmod --update $kernelnvr || exit $? /sbin/new-kernel-pkg --package $kernelpkg--rpmposttrans $kernelnvr || exit $? How it is handled in kernel-install: /sbin/new-kernel-pkg --package $kernelpkg --mkinitrd --dracut --depmod --install "$2" || exit $? /sbin/new-kernel-pkg --package $kernelpkg --rpmposttrans "$2" || exit $? As you can see, new-kernel-pkg is being called with --install instead of with --update. This breaks, at minimum, installing kernels on ARM systems since some of the necessary configuration management only runs when --update is used. The attached one-liner fixes the issue.