What were you trying to do that didn't work?
It looks like it's possible to run {{dnf clean packages }}while a DNF is downloading a package from a URI; this will result in the transaction failing because the package suddenly disappears.
What is the impact of this issue to you?
We hit this on multiple production systems where dnf clean packages is periodically run by configuration management, and this happened to overlap with a dnf install <URI> operation.
Please provide the package NVR for which the bug is seen:
dnf-4.14.0-25.el9.noarch
How reproducible is this bug?:
always
Steps to reproduce
- mock -r centos-stream-9-aarch64 --install dnf tmux
- mock -r centos-stream-9-aarch64 --shell --enable-network
- run tmux, make two panes
- in pane 1, run dnf install https://kojihub.stream.centos.org/kojifiles/packages/kernel/5.14.0/571.el9/aarch64/kernel-5.14.0-571.el9.aarch64.rpm https://kojihub.stream.centos.org/kojifiles/packages/kernel/5.14.0/571.el9/aarch64/kernel-core-5.14.0-571.el9.aarch64.rpm https://kojihub.stream.centos.org/kojifiles/packages/kernel/5.14.0/571.el9/aarch64/kernel-modules-core-5.14.0-571.el9.aarch64.rpm
- wait for the download to start, then in pane 2 run dnf clean packages
- observe the failure (either Can not load RPM file or Could not open) depending on timing)
Expected results
The install should probably lock the cache, and dnf clean packages should wait until the lock is cleared (which shouldn't happen until the transaction is completed).
Actual results
either Can not load RPM file or Could not open depending on timing