Bug 1443344
Summary: | dnf removes currently running kernel | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Yu Watanabe <watanabe.yu> |
Component: | dnf | Assignee: | rpm-software-management |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 25 | CC: | dmach, jmracek, mhatina, packaging-team-maint, rpm-software-management, vmukhame, watanabe.yu |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dnf-2.5.0-2.fc26 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-06-09 19:06:57 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: | |||
Attachments: |
Description
Yu Watanabe
2017-04-19 06:28:07 UTC
Please, update dnf to dnf-2.3.0, can you try to reproduce this problem with new dnf? I've also tested with dnf-2.3.0-1.fc27.noarch. However, the problem still exist. Please can you try it with dnf-2.4 and provide output from: 1. "dnf repoquery --userinstalled kernel*" 2. "dnf repoquery kernel*" 3. "dnf upgrade" # where it tries to remove running kernel 4. also setting of koji repo could help (just to know the origin of packages) (/etc/yum.repos.d/<repo koji>.repo) 5. Please also ensure that that you run certain kernel version and provide exact version of that kernel I ask so meny questions because I am unable to reproduce the problem on my VM. Sorry for late reply. 1. Now I use dnf-2.4.0-2.fc26.noarch, and it seems not to have the option '--userinstalled'. Are there any rpm I can test with the following commit? https://github.com/rpm-software-management/dnf/commit/bb5ed9a97588ba8d418bc1b72c9c7de9f0d1b89f Instead of '--userinstalled', I tried '--installed' option, and the output is ============= $ sudo dnf repoquery --installed kernel* kernel-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-0:4.11.0-0.rc7.git0.1.fc26.x86_64 kernel-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-core-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-core-0:4.11.0-0.rc7.git0.1.fc26.x86_64 kernel-core-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-headers-0:4.11.0-1.fc26.x86_64 kernel-modules-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-modules-0:4.11.0-0.rc7.git0.1.fc26.x86_64 kernel-modules-0:4.11.0-0.rc8.git0.1.fc26.x86_64 ============= 2. ============= $ sudo dnf repoquery kernel* Last metadata expiration check: 0:00:00 ago on Mon May 08 11:02:16 2017 JST. kernel-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-0:4.11.0-1.fc26.x86_64 kernel-PAE-devel-0:4.11.0-1.fc26.i686 kernel-PAEdebug-devel-0:4.11.0-1.fc26.i686 kernel-core-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-core-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-core-0:4.11.0-1.fc26.x86_64 kernel-cross-headers-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-cross-headers-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-cross-headers-0:4.11.0-1.fc26.x86_64 kernel-debug-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-debug-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-debug-0:4.11.0-1.fc26.x86_64 kernel-debug-core-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-debug-core-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-debug-core-0:4.11.0-1.fc26.x86_64 kernel-debug-devel-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-debug-devel-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-debug-devel-0:4.11.0-1.fc26.i686 kernel-debug-devel-0:4.11.0-1.fc26.x86_64 kernel-debug-modules-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-debug-modules-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-debug-modules-0:4.11.0-1.fc26.x86_64 kernel-debug-modules-extra-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-debug-modules-extra-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-debug-modules-extra-0:4.11.0-1.fc26.x86_64 kernel-devel-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-devel-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-devel-0:4.11.0-1.fc26.x86_64 kernel-headers-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-headers-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-headers-0:4.11.0-1.fc26.x86_64 kernel-modules-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-modules-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-modules-0:4.11.0-1.fc26.x86_64 kernel-modules-extra-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-modules-extra-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-modules-extra-0:4.11.0-1.fc26.x86_64 kernel-rpm-macros-0:63-1.fc26.noarch kernel-tools-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-tools-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-tools-0:4.11.0-1.fc26.x86_64 kernel-tools-libs-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-tools-libs-0:4.11.0-0.rc8.git0.1.fc26.i686 kernel-tools-libs-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-tools-libs-0:4.11.0-1.fc26.i686 kernel-tools-libs-0:4.11.0-1.fc26.x86_64 kernel-tools-libs-devel-0:4.11.0-0.rc6.git0.1.fc26.x86_64 kernel-tools-libs-devel-0:4.11.0-0.rc8.git0.1.fc26.i686 kernel-tools-libs-devel-0:4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-tools-libs-devel-0:4.11.0-1.fc26.i686 kernel-tools-libs-devel-0:4.11.0-1.fc26.x86_64 kernelshark-0:2.6-4.fc26.x86_64 ============= 3. ============= $ uname -a Linux werewolf.vlan.kuins.net 4.11.0-0.rc6.git0.1.fc26.x86_64 #1 SMP Mon Apr 10 19:45:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ sudo dnf upgrade --assumeno Last metadata expiration check: 0:01:23 ago on Mon May 08 11:02:16 2017 JST. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 4.11.0-1.fc26 updates-testing 56 k kernel-core x86_64 4.11.0-1.fc26 updates-testing 21 M kernel-modules x86_64 4.11.0-1.fc26 updates-testing 23 M Removing: kernel x86_64 4.11.0-0.rc6.git0.1.fc26 @koji 0 kernel-core x86_64 4.11.0-0.rc6.git0.1.fc26 @koji 54 M kernel-modules x86_64 4.11.0-0.rc6.git0.1.fc26 @koji 22 M Transaction Summary ================================================================================ Install 3 Packages Remove 3 Packages Total download size: 43 M Operation aborted. ============= 4. The koji repository stores downloaded rpms from koji. ============= $ cat /etc/yum.repos.d/koji.repo [koji] name=Fedora $releasever - $basearch - Koji failovermethod=priority baseurl=http://www2.yukawa.kyoto-u.ac.jp/~yu.watanabe/repo/koji/$releasever/$basearch/ enabled=1 metadata_expire=6h gpgcheck=0 [koji-source] name=Fedora $releasever - Koji Source failovermethod=priority baseurl=http://www2.yukawa.kyoto-u.ac.jp/~yu.watanabe/repo/koji/$releasever/SRPMS/ enabled=0 metadata_expire=6h gpgcheck=0 [koji-rawhide] name=Fedora Rawhide - $basearch - Koji failovermethod=priority baseurl=http://www2.yukawa.kyoto-u.ac.jp/~yu.watanabe/repo/koji/rawhide/$basearch/ enabled=0 metadata_expire=6h gpgcheck=0 [koji-rawhide-source] name=Fedora Rawhide - Koji Source failovermethod=priority baseurl=http://www2.yukawa.kyoto-u.ac.jp/~yu.watanabe/repo/koji/rawhide/SRPMS/ enabled=0 metadata_expire=6h gpgcheck=0 ============= 5. As already shown in the answer for 3, ============= $ uname -a Linux werewolf.vlan.kuins.net 4.11.0-0.rc6.git0.1.fc26.x86_64 #1 SMP Mon Apr 10 19:45:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux ============= I create patch for kernel removal logic that could help. Please to test it do as follows: # please start with running the newest kernel. 1. "dnf copr enable rpmsoftwaremanagement/rpm-gitoverlay-1494315254.398449" # it enable copr repository with patch 2. "sudo dnf --repo rpmsoftwaremanagement-rpm-gitoverlay-1494315254.398449 upgrade dnf libdnf libsolv" # To upgrade to dnf-2.4.0_1-7gca0f46b.fc25.noarch, libdnf-0.8.2-3gc54f4fd.fc25.x86_64, libsolv-0.6.27-1.fc25.x86_64 3. Try "dnf upgrade --assumeno" to check if transaction is possible with update of new kernel and which kernel is remove. 4. Reboot with oldest kernel and then run again "dnf upgrade --assumeno" Expected result: Install new kernel Removes oldest kernel that is not running. I hope that it will work for you, because I cannot reproduce your problem on my side. Please report the result of this test. Unfortunately, the copr packages does not fix this issue. I've tested the procedure written in comment #3 with the copr dnf. Note that, in the comment #4, I've tested on Fedora 26, however the following results is tested on Fedora 25, because the copr dnf is build for Fedora 25. 1. ============= $ sudo dnf repoquery --installed kernel* kernel-0:4.10.13-200.fc25.x86_64 kernel-0:4.10.14-200.fc25.x86_64 kernel-0:4.9.13-201.fc25.x86_64 kernel-core-0:4.10.13-200.fc25.x86_64 kernel-modules-0:4.10.13-200.fc25.x86_64 ============= 2. ============= $ sudo dnf repoquery kernel* Last metadata expiration check: 0:04:33 ago on Wed May 10 15:28:49 2017 JST. kernel-0:4.10.13-200.fc25.x86_64 kernel-0:4.10.14-200.fc25.x86_64 kernel-0:4.10.15-200.fc25.x86_64 kernel-0:4.8.6-300.fc25.x86_64 kernel-0:4.9.13-201.fc25.x86_64 kernel-PAE-devel-0:4.10.13-200.fc25.i686 kernel-PAE-devel-0:4.10.14-200.fc25.i686 kernel-PAEdebug-devel-0:4.10.13-200.fc25.i686 kernel-PAEdebug-devel-0:4.10.14-200.fc25.i686 kernel-core-0:4.10.13-200.fc25.x86_64 kernel-core-0:4.10.14-200.fc25.x86_64 kernel-core-0:4.10.15-200.fc25.x86_64 kernel-core-0:4.8.6-300.fc25.x86_64 kernel-core-0:4.9.13-201.fc25.x86_64 kernel-cross-headers-0:4.10.13-200.fc25.x86_64 kernel-cross-headers-0:4.10.14-200.fc25.x86_64 kernel-cross-headers-0:4.10.15-200.fc25.x86_64 kernel-cross-headers-0:4.8.6-300.fc25.x86_64 kernel-cross-headers-0:4.9.13-201.fc25.x86_64 kernel-debug-0:4.10.13-200.fc25.x86_64 kernel-debug-0:4.10.14-200.fc25.x86_64 kernel-debug-0:4.10.15-200.fc25.x86_64 kernel-debug-0:4.8.6-300.fc25.x86_64 kernel-debug-0:4.9.13-201.fc25.x86_64 kernel-debug-core-0:4.10.13-200.fc25.x86_64 kernel-debug-core-0:4.10.14-200.fc25.x86_64 kernel-debug-core-0:4.10.15-200.fc25.x86_64 kernel-debug-core-0:4.8.6-300.fc25.x86_64 kernel-debug-core-0:4.9.13-201.fc25.x86_64 kernel-debug-devel-0:4.10.13-200.fc25.i686 kernel-debug-devel-0:4.10.13-200.fc25.x86_64 kernel-debug-devel-0:4.10.14-200.fc25.i686 kernel-debug-devel-0:4.10.14-200.fc25.x86_64 kernel-debug-devel-0:4.10.15-200.fc25.x86_64 kernel-debug-devel-0:4.8.6-300.fc25.x86_64 kernel-debug-devel-0:4.9.13-201.fc25.x86_64 kernel-debug-modules-0:4.10.13-200.fc25.x86_64 kernel-debug-modules-0:4.10.14-200.fc25.x86_64 kernel-debug-modules-0:4.10.15-200.fc25.x86_64 kernel-debug-modules-0:4.8.6-300.fc25.x86_64 kernel-debug-modules-0:4.9.13-201.fc25.x86_64 kernel-debug-modules-extra-0:4.10.13-200.fc25.x86_64 kernel-debug-modules-extra-0:4.10.14-200.fc25.x86_64 kernel-debug-modules-extra-0:4.10.15-200.fc25.x86_64 kernel-debug-modules-extra-0:4.8.6-300.fc25.x86_64 kernel-debug-modules-extra-0:4.9.13-201.fc25.x86_64 kernel-devel-0:4.10.13-200.fc25.x86_64 kernel-devel-0:4.10.14-200.fc25.x86_64 kernel-devel-0:4.10.15-200.fc25.x86_64 kernel-devel-0:4.8.6-300.fc25.x86_64 kernel-devel-0:4.9.13-201.fc25.x86_64 kernel-headers-0:4.10.13-200.fc25.x86_64 kernel-headers-0:4.10.14-200.fc25.x86_64 kernel-headers-0:4.10.15-200.fc25.x86_64 kernel-headers-0:4.8.6-300.fc25.x86_64 kernel-headers-0:4.9.13-201.fc25.x86_64 kernel-modules-0:4.10.13-200.fc25.x86_64 kernel-modules-0:4.10.14-200.fc25.x86_64 kernel-modules-0:4.10.15-200.fc25.x86_64 kernel-modules-0:4.8.6-300.fc25.x86_64 kernel-modules-0:4.9.13-201.fc25.x86_64 kernel-modules-extra-0:4.10.13-200.fc25.x86_64 kernel-modules-extra-0:4.10.14-200.fc25.x86_64 kernel-modules-extra-0:4.10.15-200.fc25.x86_64 kernel-modules-extra-0:4.8.6-300.fc25.x86_64 kernel-modules-extra-0:4.9.13-201.fc25.x86_64 kernel-rpm-macros-0:44-1.fc25.noarch kernel-rpm-macros-0:45-1.fc25.noarch kernel-tools-0:4.10.13-200.fc25.x86_64 kernel-tools-0:4.10.14-200.fc25.x86_64 kernel-tools-0:4.10.15-200.fc25.x86_64 kernel-tools-0:4.8.6-300.fc25.x86_64 kernel-tools-0:4.9.13-201.fc25.x86_64 kernel-tools-libs-0:4.10.13-200.fc25.i686 kernel-tools-libs-0:4.10.13-200.fc25.x86_64 kernel-tools-libs-0:4.10.14-200.fc25.i686 kernel-tools-libs-0:4.10.14-200.fc25.x86_64 kernel-tools-libs-0:4.10.15-200.fc25.x86_64 kernel-tools-libs-0:4.8.6-300.fc25.i686 kernel-tools-libs-0:4.8.6-300.fc25.x86_64 kernel-tools-libs-0:4.9.13-201.fc25.x86_64 kernel-tools-libs-devel-0:4.10.13-200.fc25.i686 kernel-tools-libs-devel-0:4.10.13-200.fc25.x86_64 kernel-tools-libs-devel-0:4.10.14-200.fc25.i686 kernel-tools-libs-devel-0:4.10.14-200.fc25.x86_64 kernel-tools-libs-devel-0:4.10.15-200.fc25.x86_64 kernel-tools-libs-devel-0:4.8.6-300.fc25.i686 kernel-tools-libs-devel-0:4.8.6-300.fc25.x86_64 kernel-tools-libs-devel-0:4.9.13-201.fc25.x86_64 kernelshark-0:2.6-2.1.fc25.x86_64 kernelshark-0:2.6-2.fc25.x86_64 ============= 3. ============= $ uname -a Linux hk11.yukawa.kyoto-u.ac.jp 4.9.13-201.fc25.x86_64 #1 SMP Tue Mar 7 23:47:11 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ sudo dnf upgrade --assumeno Last metadata expiration check: 0:07:26 ago on Wed May 10 15:28:49 2017 JST. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 4.10.15-200.fc25 koji 99 k kernel-core x86_64 4.10.15-200.fc25 koji 20 M kernel-modules x86_64 4.10.15-200.fc25 koji 23 M Upgrading: kernel-headers x86_64 4.10.15-200.fc25 koji 1.1 M Installing dependencies: kernel-devel x86_64 4.10.15-200.fc25 koji 11 M Removing: kernel x86_64 4.9.13-201.fc25 @koji 0 kernel-core x86_64 4.9.13-201.fc25 @koji 53 M kernel-modules x86_64 4.9.13-201.fc25 @koji 22 M Transaction Summary ================================================================================ Install 4 Packages Upgrade 1 Package Remove 3 Packages Total size: 55 M Operation aborted. ============= On Fedora 26, I've tested dnf-2.4.0_1-10gc75dba0.fc26.noarch provided by rpmsoftwaremanagement/dnf-nightly. However, the situation is the same. Ok, please can you provide output from ``ls /boot/ -l``? I suppose that you performed steps from Comment 5. Also output of ``sudo dnf repoquery --installed -l kernel-core | grep /boot`` would be handy. > Ok, please can you provide output from ``ls /boot/ -l``? On Fedora 25 machine, ======== $ ls /boot -l total 12 drwxr-xr-x 5 root root 4096 May 10 15:25 d0a67e4dcc65405f8fe069407a8e6e54 drwxr-xr-x 4 root root 4096 Feb 12 16:27 EFI drwxr-xr-x 3 root root 4096 Feb 12 16:27 loader $ tree /boot /boot ├── d0a67e4dcc65405f8fe069407a8e6e54 │ ├── 4.10.13-200.fc25.x86_64 │ │ ├── initrd │ │ └── linux │ ├── 4.10.14-200.fc25.x86_64 │ │ ├── initrd │ │ └── linux │ └── 4.9.13-201.fc25.x86_64 │ ├── initrd │ └── linux ├── EFI │ ├── BOOT │ │ └── BOOTX64.EFI │ └── systemd │ └── systemd-bootx64.efi └── loader ├── entries │ ├── d0a67e4dcc65405f8fe069407a8e6e54-4.10.13-200.fc25.x86_64.conf │ ├── d0a67e4dcc65405f8fe069407a8e6e54-4.10.14-200.fc25.x86_64.conf │ └── d0a67e4dcc65405f8fe069407a8e6e54-4.9.13-201.fc25.x86_64.conf └── loader.conf 9 directories, 12 files $ sudo dnf repoquery --installed -l kernel-core | grep /boot /boot/.vmlinuz-4.10.13-200.fc25.x86_64.hmac /boot/System.map-4.10.13-200.fc25.x86_64 /boot/config-4.10.13-200.fc25.x86_64 /boot/initramfs-4.10.13-200.fc25.x86_64.img /boot/vmlinuz-4.10.13-200.fc25.x86_64 /boot/.vmlinuz-4.10.14-200.fc25.x86_64.hmac /boot/System.map-4.10.14-200.fc25.x86_64 /boot/config-4.10.14-200.fc25.x86_64 /boot/initramfs-4.10.14-200.fc25.x86_64.img /boot/vmlinuz-4.10.14-200.fc25.x86_64 /boot/.vmlinuz-4.9.13-201.fc25.x86_64.hmac /boot/System.map-4.9.13-201.fc25.x86_64 /boot/config-4.9.13-201.fc25.x86_64 /boot/initramfs-4.9.13-201.fc25.x86_64.img /boot/vmlinuz-4.9.13-201.fc25.x86_64 ======== and on Fedora 26 machine, ======== $ sudo ls -l /boot total 16 drwx------ 6 root root 4096 May 9 12:49 7f641fcfd6914589aa994554498907bb drwx------ 4 root root 4096 Feb 15 16:03 EFI drwx------ 3 root root 4096 Oct 19 2016 loader -rwx------ 1 root root 53 Oct 18 2016 loader.conf $ sudo tree /boot /boot ├── 7f641fcfd6914589aa994554498907bb │ ├── 0-rescue │ │ ├── initrd │ │ └── linux │ ├── 4.11.0-0.rc7.git0.1.fc26.x86_64 │ │ ├── initrd │ │ └── linux │ ├── 4.11.0-0.rc8.git0.1.fc26.x86_64 │ │ ├── initrd │ │ └── linux │ └── 4.11.0-1.fc26.x86_64 │ ├── initrd │ └── linux ├── EFI │ ├── BOOT │ │ └── BOOTX64.EFI │ └── systemd │ └── systemd-bootx64.efi ├── loader │ ├── entries │ │ ├── 7f641fcfd6914589aa994554498907bb-0-rescue.conf │ │ ├── 7f641fcfd6914589aa994554498907bb-4.11.0-0.rc7.git0.1.fc26.x86_64.conf │ │ ├── 7f641fcfd6914589aa994554498907bb-4.11.0-0.rc8.git0.1.fc26.x86_64.conf │ │ └── 7f641fcfd6914589aa994554498907bb-4.11.0-1.fc26.x86_64.conf │ └── loader.conf └── loader.conf 10 directories, 16 files $ sudo dnf repoquery --installed -l kernel-core | grep /boot /boot/.vmlinuz-4.11.0-0.rc7.git0.1.fc26.x86_64.hmac /boot/System.map-4.11.0-0.rc7.git0.1.fc26.x86_64 /boot/config-4.11.0-0.rc7.git0.1.fc26.x86_64 /boot/initramfs-4.11.0-0.rc7.git0.1.fc26.x86_64.img /boot/vmlinuz-4.11.0-0.rc7.git0.1.fc26.x86_64 /boot/.vmlinuz-4.11.0-0.rc8.git0.1.fc26.x86_64.hmac /boot/System.map-4.11.0-0.rc8.git0.1.fc26.x86_64 /boot/config-4.11.0-0.rc8.git0.1.fc26.x86_64 /boot/initramfs-4.11.0-0.rc8.git0.1.fc26.x86_64.img /boot/vmlinuz-4.11.0-0.rc8.git0.1.fc26.x86_64 /boot/.vmlinuz-4.11.0-1.fc26.x86_64.hmac /boot/System.map-4.11.0-1.fc26.x86_64 /boot/config-4.11.0-1.fc26.x86_64 /boot/initramfs-4.11.0-1.fc26.x86_64.img /boot/vmlinuz-4.11.0-1.fc26.x86_64 ======== Note that I use systemd-boot as the EFI bootloader, not grub2. > I suppose that you performed steps from Comment 5. Yes, the outputs in comment #6 are given by dnf-2.4.0_1-7gca0f46b.fc25.noarch from the copr repository rpmsoftwaremanagement-rpm-gitoverlay-1494315254.398449. It looks like that your system cannot correctly detect running kernel that is handled by libdnf package. We detect package that provide a running kernel like that - that we looked for pakage that provides file '/boot/vmlinuz- + version of running kernel like '4.10.14-200.fc25.x86_64' therefore we search for string '/boot/vmlinuz-4.10.14-200.fc25.x86_64'. Please can you try to create such a string with version of running kernel for your computer (like /boot/vmlinuz-4.9.13-201.fc25.x86_64) and try sudo dnf repoquery --installed --whatprovides '<string>' Also I do not have access to your koji repo, therefore please can you provide kernel packages in oldest version that makes a problem (running kernel that is oldest). Please can you report version of libdnf and libsolv on your systems? Hope that I will be able to reproduce your problem on my site. (In reply to Jaroslav Mracek from comment #11) > It looks like that your system cannot correctly detect running kernel that > is handled by libdnf package. We detect package that provide a running > kernel like that - that we looked for pakage that provides file > '/boot/vmlinuz- + version of running kernel like '4.10.14-200.fc25.x86_64' > therefore we search for string '/boot/vmlinuz-4.10.14-200.fc25.x86_64'. Oh, I got it. The function running_kernel() in hy-iutil.c https://github.com/rpm-software-management/libdnf/blob/master/libdnf/hy-iutil.c#L362 is I guess not suitable for my systems. If the machine does not use grub2, more precisely, grubby is not installed, then /boot/vmlinuz-$(uname -r) does not exist. The file is created by the post-install script of kernel-core.rpm only if grubby is installed. If grubby is not installed, post-install script creates /boot/$(cat /etc/machine-id)/$(uname -r)/linux and the corresponding initrd. But the file is not detected by libdnf. So, actually, by touching /boot/vmlinuz-$(uname -r), updating kernel works as expected. See the following outputs. =========== $ rpm -q dnf libdnf libsolv dnf-2.4.1-1.fc26.noarch libdnf-0.8.2-1.fc26.x86_64 libsolv-0.6.27-1.fc26.x86_64 $ rpm -q kernel kernel-4.11.0-0.rc7.git0.1.fc26.x86_64 kernel-4.11.0-0.rc8.git0.1.fc26.x86_64 kernel-4.11.0-1.fc26.x86_64 $ sudo dnf repoquery --installed --whatprovides /boot/vmlinuz-4.11.0-0.rc7.git0.1.fc26.x86_64 kernel-core-0:4.11.0-0.rc7.git0.1.fc26.x86_64 $ uname -r 4.11.0-0.rc7.git0.1.fc26.x86_64 $ sudo ls -l /boot total 16 drwx------ 6 root root 4096 May 9 12:49 7f641fcfd6914589aa994554498907bb drwx------ 4 root root 4096 Feb 15 16:03 EFI drwx------ 3 root root 4096 Oct 19 2016 loader -rwx------ 1 root root 53 Oct 18 2016 loader.conf $ sudo dnf update --assumeno Last metadata expiration check: 0:04:08 ago on Fri May 12 17:16:42 2017 JST. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 4.11.0-2.fc26 updates-testing 56 k kernel-core x86_64 4.11.0-2.fc26 updates-testing 21 M kernel-modules x86_64 4.11.0-2.fc26 updates-testing 23 M Upgrading: kernel-headers x86_64 4.11.0-2.fc26 updates-testing 1.1 M Removing: kernel x86_64 4.11.0-0.rc7.git0.1.fc26 @updates-testing 0 kernel-core x86_64 4.11.0-0.rc7.git0.1.fc26 @updates-testing 54 M kernel-modules x86_64 4.11.0-0.rc7.git0.1.fc26 @updates-testing 22 M Transaction Summary ================================================================================ Install 3 Packages Upgrade 1 Package Remove 3 Packages Total download size: 45 M Operation aborted. $ sudo touch /boot/vmlinuz-$(uname -r) $ sudo ls -l /boot total 16 drwx------ 6 root root 4096 May 9 12:49 7f641fcfd6914589aa994554498907bb drwx------ 4 root root 4096 Feb 15 16:03 EFI drwx------ 3 root root 4096 Oct 19 2016 loader -rwx------ 1 root root 53 Oct 18 2016 loader.conf -rwx------ 1 root root 0 May 12 17:22 vmlinuz-4.11.0-0.rc7.git0.1.fc26.x86_64 $ sudo dnf update --assumeno Last metadata expiration check: 0:06:43 ago on Fri May 12 17:16:42 2017 JST. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 4.11.0-2.fc26 updates-testing 56 k kernel-core x86_64 4.11.0-2.fc26 updates-testing 21 M kernel-modules x86_64 4.11.0-2.fc26 updates-testing 23 M Upgrading: kernel-headers x86_64 4.11.0-2.fc26 updates-testing 1.1 M Removing: kernel x86_64 4.11.0-0.rc8.git0.1.fc26 @updates-testing 0 kernel-core x86_64 4.11.0-0.rc8.git0.1.fc26 @updates-testing 54 M kernel-modules x86_64 4.11.0-0.rc8.git0.1.fc26 @updates-testing 22 M Transaction Summary ================================================================================ Install 3 Packages Upgrade 1 Package Remove 3 Packages Total download size: 45 M Operation aborted. ============ (In reply to Jaroslav Mracek from comment #11) > Also I do not have access to your koji repo, therefore please can you > provide kernel packages in oldest version that makes a problem (running > kernel that is oldest). I enabled indexes option in my repository, so now you can access my koji repo. http://www2.yukawa.kyoto-u.ac.jp/~yu.watanabe/repo/koji/26/x86_64/ But all the rpm files are just retrieved from https://koji.fedoraproject.org/koji/packageinfo?packageID=8 by using koji command. So, I guess the reproductivity of the problem is not related to the repository. The file /boot/vmlinuz-$(uname -r) is labeled as %ghost file in the kernel-core package. Instead of the file, how about using /lib/modules/$(uname -r)/vmlinuz ? The file is identical to /boot/vmlinuz-$(uname -r) and /boot/$(cat /etc/machine-id)/$(uname -r)/linux if they exist. Created attachment 1278113 [details]
Patch to use /lib/modules/$(uname -r)/vmlinuz for detecting the running kernel
Thanks for the patch, but still dont know the root of your problem. I create a special testing version of libdnf just for you (dnf copr enable jmracek/kernel-test). Please install from that repo libdnf and python3-hawkey both in version 0.8.2-1.git.1511.8b133bf.fc25 or 0.8.2-1.git.1511.8b133bf.fc26. Then try in case whet it removes running kernel and provide output from it, and uname -a as attachment. (filename ) Also output from script could help, but replace <filename> with string from ``/boot/vmlinuz-$(uname -r)`` #!/usr/bin/python3 -tt import dnf, base = dnf.Base() base.read_all_repos() base.fill_sack() print(base.sack.query().installed().filter(file=<filename>).run()) Thanks a lot. I guess that file ``/boot/vmlinuz-$(uname -r)`` is provided by two installed packages therefore the first package in query could be not running kernel. Created attachment 1278389 [details]
4.11.0-0.rc7.git0.1.fc26.x86_64.txt
Created attachment 1278390 [details]
4.11.0-0.rc7.git0.1.fc26.x86_64-touch.txt
Created attachment 1278391 [details]
4.11.0-1.fc26.x86_64.txt
Created attachment 1278392 [details]
4.11.0-1.fc26.x86_64-touch.txt
The above 4 files contain the output of 'dnf update' with libdnf-0.8.2-1.git.1511.8b133bf.fc26.x86_64. The file its name ends with -touch.txt is the case /boot/vmlinuz-$(uname -r) exists. Thanks a lot. The problem is in hy-iutils.c line 364.: ``` if (access(fn, F_OK)) { g_debug("running_kernel(): no matching file: %s.", fn); return -1; ``` It checks if file is there. It is possible to solve it by using your solution or by removal of this part. Thanks a lot for your cooperation and i believe it will be fixed soon. I created patch that should help https://github.com/rpm-software-management/libdnf/pull/285. Please if you can test it here is copr repo with patch - libdnf ("dnf copr enable rpmsoftwaremanagement/rpm-gitoverlay-1494835397.199814" ) Thanks for cooperation. Thanks a lot! It seems to work fine for me. ========== $ uname -r 4.9.13-201.fc25.x86_64 $ rpm -q kernel kernel-4.9.13-201.fc25.x86_64 kernel-4.10.14-200.fc25.x86_64 kernel-4.10.13-200.fc25.x86_64 $ rpm -q dnf libdnf libsolv dnf-2.4.1_1-1ge909bc4.fc25.noarch libdnf-0.8.2-6g2031d90.fc25.x86_64 libsolv-0.6.27-2gd947474.fc25.x86_64 $ sudo dnf update --assumeno Last metadata expiration check: 0:01:24 ago on Tue May 16 17:42:18 2017 JST. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 4.10.15-200.fc25 updates-testing 99 k kernel-core x86_64 4.10.15-200.fc25 updates-testing 20 M kernel-modules x86_64 4.10.15-200.fc25 updates-testing 23 M Upgrading: kernel-headers x86_64 4.10.15-200.fc25 updates-testing 1.1 M Installing dependencies: kernel-devel x86_64 4.10.15-200.fc25 updates-testing 11 M Removing: kernel x86_64 4.10.13-200.fc25 @updates 0 kernel-core x86_64 4.10.13-200.fc25 @updates 53 M kernel-modules x86_64 4.10.13-200.fc25 @updates 22 M Transaction Summary ================================================================================ Install 4 Packages Upgrade 1 Package Remove 3 Packages Total size: 55 M Operation aborted. dnf-plugins-extras-2.0.1-1.fc26 dnf-plugins-core-2.1.0-1.fc26 libdnf-0.9.0-1.fc26 dnf-2.5.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8 dnf-2.5.0-1.fc26, dnf-plugins-core-2.1.0-1.fc26, dnf-plugins-extras-2.0.1-1.fc26, libdnf-0.9.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8 dnf-2.5.0-1.fc26 dnf-plugins-core-2.1.0-1.fc26 dnf-plugins-extras-2.0.1-1.fc26 dnfdaemon-0.3.17-3.fc26 libdnf-0.9.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8 dnf-2.5.0-2.fc26 dnf-plugins-core-2.1.0-1.fc26 dnf-plugins-extras-2.0.1-1.fc26 dnfdaemon-0.3.18-1.fc26 libdnf-0.9.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8 dnf-2.5.0-2.fc26, dnf-plugins-core-2.1.0-1.fc26, dnf-plugins-extras-2.0.1-1.fc26, dnfdaemon-0.3.18-2.fc26, libdnf-0.9.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8 dnf-2.5.0-2.fc26, dnf-plugins-core-2.1.0-1.fc26, dnf-plugins-extras-2.0.1-1.fc26, dnfdaemon-0.3.18-2.fc26, libdnf-0.9.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |