Bug 1921063
Summary: | dnf autoremove wants to remove "kernel-modules-extra" if you have a rawhide kernel installed | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | doubtee |
Component: | dnf | Assignee: | Jaroslav Mracek <jmracek> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 33 | CC: | dmach, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | dnf-4.7.0-1.fc33 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-05-03 01:48:21 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
doubtee
2021-01-27 13:21:54 UTC
I got the latest stable kernel update on my machine and updated. I got the same issue but when I tried to update my VM I couldn't reproduce it so I changed the "Reproducible" status to "Happens sometimes, but not always.". At this point I am afraid I don't know the root cause of this so I am going to explain in what state my system is, so it may help. Since I figured out I have a kernel issue on the latest versions I decided to use an older kernel and try to use a RC kernel, so that's where it all started. I started to play with kernels update/remove etc. and I noticed this issue. When I got the latest stable kernel update today running "sudo dnf autoremove" wanted to remove "kernel-modules-extra" again. I installed the rawhide kernel again and now dnf autoremove doesn't want to remove "kernel-modules-extra" anymore. I am not sure if I will see this issue again in the next kernel update. One more thing I want to add here is I did run "sudo rpm --rebuilddb" on the VM before today's latest stable kernel update could that explain why I couldn't reproduce this on the VM meanwhile I could on my main system? Please could you provide an output from: dnf repoquery 'kernel*' --qf '%{name}-%{epoch}:%{version}-%{release}.%{arch} %{reason}' --installed dnf repoquery --whatrequires 'kernel-modules-extra' --installed Output from "dnf repoquery 'kernel*' --qf '%{name}-%{epoch}:%{version}-%{release}.%{arch} %{reason}' --installed": kernel-0:5.10.12-200.fc33.x86_64 user kernel-0:5.10.8-200.fc33.x86_64 user kernel-0:5.11.0-0.rc6.141.fc34.x86_64 user kernel-core-0:5.10.12-200.fc33.x86_64 user kernel-core-0:5.10.8-200.fc33.x86_64 user kernel-core-0:5.11.0-0.rc6.141.fc34.x86_64 user kernel-headers-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-0:5.10.12-200.fc33.x86_64 user kernel-modules-0:5.10.8-200.fc33.x86_64 user kernel-modules-0:5.11.0-0.rc6.141.fc34.x86_64 user kernel-modules-extra-0:5.10.12-200.fc33.x86_64 user kernel-modules-extra-0:5.10.8-200.fc33.x86_64 user kernel-modules-extra-0:5.11.0-0.rc6.141.fc34.x86_64 user Output from "dnf repoquery --whatrequires 'kernel-modules-extra' --installed": (There is no output) One thing I want to add is when I was running these commands "sudo dnf autoremove" don't wanted to uninstall "kernel-modules-extra" I saved those commands and next time when I can reproduce that "sudo dnf autoremove" wants to remove "kernel-modules-extra" I will share output from that scenario too. I removed some of my kernels and downgraded to latest stable and could reproduce it. Output from "dnf repoquery 'kernel*' --qf '%{name}-%{epoch}:%{version}-%{release}.%{arch} %{reason}' --installed": kernel-0:5.10.11-200.fc33.x86_64 dependency kernel-0:5.10.8-200.fc33.x86_64 dependency kernel-core-0:5.10.11-200.fc33.x86_64 dependency kernel-core-0:5.10.8-200.fc33.x86_64 dependency kernel-headers-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-0:5.10.8-200.fc33.x86_64 dependency kernel-modules-extra-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-extra-0:5.10.8-200.fc33.x86_64 dependency Output from "dnf repoquery --whatrequires 'kernel-modules-extra' --installed": (Still here is no output) Here is an image: https://i.imgur.com/VrLLaPp.png (can see all the commands + sudo dnf autoremove) https://i.vgy.me/qJllNS.png (alternative image link in case one hoster as an issue) Please could you provide all steps that you performed to get from state from commend 3 to state in comment 4? Minimal reproducer will be very helpful. To get to state in comment 3 you can run `dnf mark install kernel kernel-core kernel-modules-extra kernel-modules` I can confirm that there is an issue in dnf, but a different one that was reported. When kernels are user installed and I remove one of kernels, the all remaining have reason unknown. But I am unable to reproduce switch from user to dependency reason. I could finally reproduce! So the issue is that when you are in unknown state and then install "sudo dnf config-manager --add-repo=http://dl.fedoraproject.org/pub/alt/rawhide-kernel-nodebug/fedora-rawhide-kernel-nodebug.repo" nodebug repository and run "sudo dnf upgrade" it will install the kernel and when you run "dnf repoquery 'kernel*' --qf '%{name}-%{epoch}:%{version}-%{release}.%{arch} %{reason}' --installed" you then should be in the dependency state. At that point running "sudo dnf autoremove" will try to uninstall "kernel-modules-extra" packages. A more step by step: 1) My current state: kernel-0:5.10.11-200.fc33.x86_64 user kernel-0:5.10.8-200.fc33.x86_64 user kernel-0:5.11.0-0.rc6.141.fc34.x86_64 user kernel-core-0:5.10.11-200.fc33.x86_64 user kernel-core-0:5.10.8-200.fc33.x86_64 user kernel-core-0:5.11.0-0.rc6.141.fc34.x86_64 user kernel-headers-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-0:5.10.11-200.fc33.x86_64 user kernel-modules-0:5.10.8-200.fc33.x86_64 user kernel-modules-0:5.11.0-0.rc6.141.fc34.x86_64 user kernel-modules-extra-0:5.10.11-200.fc33.x86_64 user kernel-modules-extra-0:5.10.8-200.fc33.x86_64 user kernel-modules-extra-0:5.11.0-0.rc6.141.fc34.x86_64 user 2) "sudo dnf remove kernel-core-5.11.0-0.rc6.141.fc34.x86_64" (this was a locally installed one) 3) Removing that locally installed kernel will make you fall into unknown state. kernel-0:5.10.11-200.fc33.x86_64 unknown kernel-0:5.10.8-200.fc33.x86_64 unknown kernel-core-0:5.10.11-200.fc33.x86_64 unknown kernel-core-0:5.10.8-200.fc33.x86_64 unknown kernel-headers-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-0:5.10.11-200.fc33.x86_64 unknown kernel-modules-0:5.10.8-200.fc33.x86_64 unknown kernel-modules-extra-0:5.10.11-200.fc33.x86_64 unknown kernel-modules-extra-0:5.10.8-200.fc33.x86_64 unknown 4) "sudo dnf config-manager --add-repo=http://dl.fedoraproject.org/pub/alt/rawhide-kernel-nodebug/fedora-rawhide-kernel-nodebug.repo" and "sudo dnf upgrade" (install the kernel) 5) After installation of the nodebug kernel from the repository you should be in the dependency state. kernel-0:5.10.11-200.fc33.x86_64 dependency kernel-0:5.10.8-200.fc33.x86_64 dependency kernel-0:5.11.0-0.rc6.141.fc34.x86_64 dependency kernel-core-0:5.10.11-200.fc33.x86_64 dependency kernel-core-0:5.10.8-200.fc33.x86_64 dependency kernel-core-0:5.11.0-0.rc6.141.fc34.x86_64 dependency kernel-headers-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-0:5.10.8-200.fc33.x86_64 dependency kernel-modules-0:5.11.0-0.rc6.141.fc34.x86_64 dependency kernel-modules-extra-0:5.10.11-200.fc33.x86_64 dependency kernel-modules-extra-0:5.10.8-200.fc33.x86_64 dependency kernel-modules-extra-0:5.11.0-0.rc6.141.fc34.x86_64 dependency 6) Try to run "sudo dnf autoremove" and see that it will try to remove "kernel-modules-extra" Hope this one helps. Thanks. Thanks a lot for detail information. I can reproduce it and we are looking for a solution. I create a patch that helps with the problem (https://github.com/rpm-software-management/ci-dnf-stack/pull/958). It prevents reason change from unknown to dependency, therefore the issue with autoremove will disappear. But there is still a problem with change from user to unknown. Tests: rpm-software-management/ci-dnf-stack#958 Also requires: Requires: https://github.com/rpm-software-management/dnf#1728 I forget to add a reference for main part of the patch - https://github.com/rpm-software-management/libdnf/pull/1141 FEDORA-2021-447fb19490 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-447fb19490 FEDORA-2021-447fb19490 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-447fb19490` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-447fb19490 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-447fb19490 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. |