Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1502106
Summary: | dnf packages update breaks package removal via ansible | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Milan Zink <mzink> |
Component: | dnf | Assignee: | Jaroslav Mracek <jmracek> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 26 | CC: | cohoe.grant, dmach, ignatenko, jmracek, mhatina, msuchy, mzink, packaging-team-maint, rpm-software-management, vmukhame |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | dnf-2.7.5-1.fc26 dnf-2.7.5-1.fc27 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-10-21 22:21:48 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: |
Description
Milan Zink
2017-10-14 08:59:17 UTC
This should be fixed by https://github.com/rpm-software-management/dnf/pull/946 I've tried to replace dnf/base.py by file take from upstream/github. But still getting the same error. I do not understand some part from report: It is reported, that it happens for removal operation, but it fails on check of checksum of some packages from local repository (this is new feature). It means that base.transaction.install_set was not empty (for removal ?). Additionally why some local repositories have packages with incorrect checksums? Yes, it's complaining about checksum. But it should not. Works w/o issues with older python-dnf package version. Can I provide some more details? I have some local packages installed (like bluejeans), but why this should affect removal of htop package? In ansible modules/packaging/os/dnf.py line 465 ``` base.download_packages(base.transaction.install_set) ``` please can you investigate content of base.transaction.install_set like "print(base.transaction.install_set)" Probably it can reveal the problem here. I created a copr repo ("dnf copr enable jmracek/test") that have DNF (dnf-2.7.4-1.git.7981.1ce857e.fc2*) with patch that should solve the issue. Please could you test it? If it will not work I will create version for discover the primary cause. The version with patch is dnf-2.7.4-1.git.7981.6b56aaf.fc2* print(base.transaction.install_set) gives "module_stdout": "set([])\n" base.transaction.install_set seems to be empty. BTW: Simple comment out line 465 #base.download_packages(base.transaction.install_set) is a workaround: ~ > ansible localhost --connection local --become -m dnf -a 'name=htop state=absent' localhost | SUCCESS => { "changed": true, "failed": false, "results": [ "Removed: htop-2.0.2-4.fc27.x86_64" ] } I'm going to try your dnf-2.7.4-1.git.7981.6b56aaf.fc2* packages. Will post an update soon. No issues with your testing packages: dnf-2.7.4-1.git.7981.6b56aaf.fc2* ~ > ansible localhost --connection local --become -m dnf -a 'name=htop state=absent' [WARNING]: Could not match supplied host pattern, ignoring: all [WARNING]: provided hosts list is empty, only localhost is available localhost | SUCCESS => { "changed": true, "failed": false, "results": [ "Removed: htop-2.0.2-4.fc27.x86_64" ] } Works as expected. Here is a link with the patch https://github.com/rpm-software-management/dnf/pull/956. dnf-2.7.5-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d2e8fdf5d8 dnf-2.7.5-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ee5c678e8b (In reply to Milan Zink from comment #8) > print(base.transaction.install_set) gives > > "module_stdout": "set([])\n" > > base.transaction.install_set seems to be empty. > > BTW: Simple comment out line > 465 #base.download_packages(base.transaction.install_set) > is a workaround: > > ~ > ansible localhost --connection local --become -m dnf -a 'name=htop > state=absent' > > localhost | SUCCESS => { > "changed": true, > "failed": false, > "results": [ > "Removed: htop-2.0.2-4.fc27.x86_64" > ] > } > > > I'm going to try your dnf-2.7.4-1.git.7981.6b56aaf.fc2* packages. Will post > an update soon. Re: the workaround by commenting out L465 of ansible/modules/packaging/os/dnf.py, that seems to have negative implications when installing packages. With the line commented out I get an error such as: IOError: [Errno 2] No such file or directory: '/var/cache/dnf/(path-to-an-RPM)' Uninstall works just fine. Un-comment the line (restoring to original) and install behavior returns to normal. I know a proper fix is coming but just a heads up for anyone who may have applied the workaround as a stopgap measure. Yes, L465 of ansible/modules/packaging/os/dnf.py works only with uninstaling and it's more dirty hack, than workaround. Gonig to test bodhi packages. dnf-2.7.5-1.fc27 has been pushed to the Fedora 27 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-ee5c678e8b dnf-2.7.5-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-d2e8fdf5d8 I've tested bodhi packages. No issues. Thanks for a quick fix. dnf-2.7.5-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. *** Bug 1506907 has been marked as a duplicate of this bug. *** dnf-2.7.5-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. |