Bug 1887502 - After dnf upgrade to dnf-4.4.0-1.fc33.noarch, dnf is unusable
Summary: After dnf upgrade to dnf-4.4.0-1.fc33.noarch, dnf is unusable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: amatej
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1886765 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-12 16:02 UTC by Jan Pazdziora
Modified: 2020-10-23 22:13 UTC (History)
15 users (show)

Fixed In Version: dnf-4.4.0-2.fc32 dnf-4.4.0-3.fc32 dnf-4.4.0-2.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-15 22:33:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2020-10-12 16:02:15 UTC
Description of problem:

After dnf upgrade to dnf-4.4.0-1.fc33.noarch, dnf starts to fail with

AttributeError: '<class 'dnf.conf.config.MainConf'>' object has no attribute 'tempfiles'

Version-Release number of selected component (if applicable):

dnf-4.4.0-1.fc33.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. dnf upgrade -y dnf
2. dnf upgrade -y dnf

Actual results:

Fedora 33 openh264 (From Cisco) - x86_64        2.0 kB/s | 2.5 kB     00:01    
Fedora Modular 33 - x86_64                      4.6 MB/s | 3.3 MB     00:00    
Fedora Modular 33 - x86_64 - Updates            338  B/s | 257  B     00:00    
Fedora Modular 33 - x86_64 - Test Updates       2.1 MB/s | 1.3 MB     00:00    
Fedora 33 - x86_64 - Test Updates                26 MB/s |  20 MB     00:00    
Fedora 33 - x86_64 - Updates                    2.6 kB/s | 257  B     00:00    
Fedora 33 - x86_64                              8.6 MB/s |  62 MB     00:07    
Dependencies resolved.
================================================================================
 Package                     Arch    Version             Repository        Size
================================================================================
Upgrading:
 dnf                         noarch  4.4.0-1.fc33        updates-testing  445 k
 dnf-data                    noarch  4.4.0-1.fc33        updates-testing   46 k
 python3-dnf                 noarch  4.4.0-1.fc33        updates-testing  411 k
 yum                         noarch  4.4.0-1.fc33        updates-testing   43 k
Installing dependencies:
 dbus-libs                   x86_64  1:1.12.20-2.fc33    fedora           154 k
 libevent                    x86_64  2.1.8-10.fc33       fedora           257 k
 unbound-libs                x86_64  1.10.1-4.fc33       fedora           512 k
Installing weak dependencies:
 deltarpm                    x86_64  3.6.2-7.fc33        fedora            89 k
 python3-unbound             x86_64  1.10.1-4.fc33       fedora           101 k
 rpm-plugin-systemd-inhibit  x86_64  4.16.0-1.fc33       updates-testing   23 k

Transaction Summary
================================================================================
Install  6 Packages
Upgrade  4 Packages

Total download size: 2.0 M
Downloading Packages:
(1/10): rpm-plugin-systemd-inhibit-4.16.0-1.fc3 2.3 MB/s |  23 kB     00:00    
(2/10): dbus-libs-1.12.20-2.fc33.x86_64.rpm     8.3 MB/s | 154 kB     00:00    
(3/10): libevent-2.1.8-10.fc33.x86_64.rpm        13 MB/s | 257 kB     00:00    
(4/10): python3-unbound-1.10.1-4.fc33.x86_64.rp 7.2 MB/s | 101 kB     00:00    
(5/10): unbound-libs-1.10.1-4.fc33.x86_64.rpm    28 MB/s | 512 kB     00:00    
(6/10): dnf-4.4.0-1.fc33.noarch.rpm              24 MB/s | 445 kB     00:00    
(7/10): dnf-data-4.4.0-1.fc33.noarch.rpm        9.6 MB/s |  46 kB     00:00    
(8/10): yum-4.4.0-1.fc33.noarch.rpm              11 MB/s |  43 kB     00:00    
(9/10): python3-dnf-4.4.0-1.fc33.noarch.rpm      43 MB/s | 411 kB     00:00    
(10/10): deltarpm-3.6.2-7.fc33.x86_64.rpm        16 kB/s |  89 kB     00:05    
--------------------------------------------------------------------------------
Total                                           333 kB/s | 2.0 MB     00:06     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : libevent-2.1.8-10.fc33.x86_64                         1/14 
  Running scriptlet: unbound-libs-1.10.1-4.fc33.x86_64                     2/14 
  Installing       : unbound-libs-1.10.1-4.fc33.x86_64                     2/14 
  Running scriptlet: unbound-libs-1.10.1-4.fc33.x86_64                     2/14 
  Installing       : python3-unbound-1.10.1-4.fc33.x86_64                  3/14 
  Upgrading        : dnf-data-4.4.0-1.fc33.noarch                          4/14 
  Installing       : deltarpm-3.6.2-7.fc33.x86_64                          5/14 
  Installing       : dbus-libs-1:1.12.20-2.fc33.x86_64                     6/14 
  Installing       : rpm-plugin-systemd-inhibit-4.16.0-1.fc33.x86_64       7/14 
  Upgrading        : python3-dnf-4.4.0-1.fc33.noarch                       8/14 
  Upgrading        : dnf-4.4.0-1.fc33.noarch                               9/14 
  Running scriptlet: dnf-4.4.0-1.fc33.noarch                               9/14 
  Upgrading        : yum-4.4.0-1.fc33.noarch                              10/14 
  Cleanup          : yum-4.2.23-2.fc33.noarch                             11/14 
  Running scriptlet: dnf-4.2.23-2.fc33.noarch                             12/14 
  Cleanup          : dnf-4.2.23-2.fc33.noarch                             12/14 
  Running scriptlet: dnf-4.2.23-2.fc33.noarch                             12/14 
  Cleanup          : python3-dnf-4.2.23-2.fc33.noarch                     13/14 
  Cleanup          : dnf-data-4.2.23-2.fc33.noarch                        14/14 
  Running scriptlet: dnf-data-4.2.23-2.fc33.noarch                        14/14 
  Verifying        : rpm-plugin-systemd-inhibit-4.16.0-1.fc33.x86_64       1/14 
  Verifying        : dbus-libs-1:1.12.20-2.fc33.x86_64                     2/14 
  Verifying        : deltarpm-3.6.2-7.fc33.x86_64                          3/14 
  Verifying        : libevent-2.1.8-10.fc33.x86_64                         4/14 
  Verifying        : python3-unbound-1.10.1-4.fc33.x86_64                  5/14 
  Verifying        : unbound-libs-1.10.1-4.fc33.x86_64                     6/14 
  Verifying        : dnf-4.4.0-1.fc33.noarch                               7/14 
  Verifying        : dnf-4.2.23-2.fc33.noarch                              8/14 
  Verifying        : dnf-data-4.4.0-1.fc33.noarch                          9/14 
  Verifying        : dnf-data-4.2.23-2.fc33.noarch                        10/14 
  Verifying        : python3-dnf-4.4.0-1.fc33.noarch                      11/14 
  Verifying        : python3-dnf-4.2.23-2.fc33.noarch                     12/14 
  Verifying        : yum-4.4.0-1.fc33.noarch                              13/14 
  Verifying        : yum-4.2.23-2.fc33.noarch                             14/14 

Upgraded:
  dnf-4.4.0-1.fc33.noarch                  dnf-data-4.4.0-1.fc33.noarch         
  python3-dnf-4.4.0-1.fc33.noarch          yum-4.4.0-1.fc33.noarch              

Installed:
  dbus-libs-1:1.12.20-2.fc33.x86_64                                             
  deltarpm-3.6.2-7.fc33.x86_64                                                  
  libevent-2.1.8-10.fc33.x86_64                                                 
  python3-unbound-1.10.1-4.fc33.x86_64                                          
  rpm-plugin-systemd-inhibit-4.16.0-1.fc33.x86_64                               
  unbound-libs-1.10.1-4.fc33.x86_64                                             

Complete!
# dnf upgrade -y dnf
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 201, in user_main
    errcode = main(args)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 66, in main
    with dnf.cli.cli.BaseCli(conf_class()) as base:
  File "/usr/lib/python3.9/site-packages/dnf/conf/config.py", line 210, in __init__
    config = libdnf.conf.ConfigMain()
  File "/usr/lib64/python3.9/site-packages/libdnf/conf.py", line 1065, in __init__
    _conf.ConfigMain_swiginit(self, _conf.new_ConfigMain())
RuntimeError: SWIG director method error. Error detected when calling 'Logger.write'
Exception ignored in: <function MainConf.__del__ at 0x7fb87f813430>
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/dnf/conf/config.py", line 236, in __del__
    for file_name in self.tempfiles:
  File "/usr/lib/python3.9/site-packages/dnf/conf/config.py", line 66, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(self.__class__, name))
AttributeError: '<class 'dnf.conf.config.MainConf'>' object has no attribute 'tempfiles'
#

Expected results:

No error when running the command the second time.

Additional info:

I run this in vanilla registry.fedoraproject.org/fedora:33 container which initially has dnf-4.2.23-2.fc33.noarch, should it matter.

Comment 1 Jan Pazdziora 2020-10-13 05:31:40 UTC
Adding python3-libdnf to the dnf upgrade command makes the subsequent dnf operation pass.

It adds python3-libdnf-0.54.2-1.fc33.x86_64 (and python3-hawkey-0.54.2-1.fc33.x86_64) to the transaction, upgrading it from python3-libdnf-0.48.0-4.fc33.x86_64 ... so it looks like dnf is missing some versioned dependencies.

Comment 2 amatej 2020-10-13 09:03:15 UTC
It is indeed missing a dependency on new libdnf. We will make a new build.

Thank you for the report!

Comment 3 amatej 2020-10-13 09:51:19 UTC
*** Bug 1886765 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2020-10-13 10:50:27 UTC
FEDORA-2020-3d0c0ec81a has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3d0c0ec81a

Comment 5 Fedora Update System 2020-10-13 10:50:28 UTC
FEDORA-2020-47a7fbf50d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-47a7fbf50d

Comment 6 Fedora Update System 2020-10-13 20:18:57 UTC
FEDORA-2020-47a7fbf50d has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-47a7fbf50d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-47a7fbf50d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-10-13 22:39:27 UTC
FEDORA-2020-3d0c0ec81a has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-3d0c0ec81a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-3d0c0ec81a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-10-15 22:33:18 UTC
FEDORA-2020-47a7fbf50d has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2020-10-19 08:02:23 UTC
FEDORA-2020-9765318e8b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9765318e8b

Comment 10 Fedora Update System 2020-10-19 17:07:30 UTC
FEDORA-2020-9765318e8b has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9765318e8b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9765318e8b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Raman Gupta 2020-10-19 21:15:28 UTC
What is the fastest way to restore a non-working system with this issue?

`dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9765318e8b` just fails with the same error because dnf is broken.

Comment 12 Raman Gupta 2020-10-19 21:18:26 UTC
Ok, downloading python3-libdnf and libdnf from https://koji.fedoraproject.org/koji/buildinfo?buildID=1627240 and manually doing `rpm -ivh --force` on each got me back to a working state.

Comment 13 Rob Newton 2020-10-20 00:47:34 UTC
(In reply to Raman Gupta from comment #12)
> Ok, downloading python3-libdnf and libdnf from
> https://koji.fedoraproject.org/koji/buildinfo?buildID=1627240 and manually
> doing `rpm -ivh --force` on each got me back to a working state.

Thanks Raman for this fix.

The comment from the Fedora Update System that we can install the update using "dnf" is not very helpful, given that dnf is broken and cannot install updates.  :-/

Comment 14 Panu Matilainen 2020-10-20 08:02:17 UTC
> `rpm -ivh --force`

This is bad advice. It can leave orphan files and duplicate packages left behind, not to mention actually severely break things. Never ever use -i except for kernels, and --force is almost never needed to sort out a problem, don't use it unless you really know what you're doing.

Comment 15 Raman Gupta 2020-10-20 09:44:36 UTC
Don't break DNF and we won't have to run commands like that. :) All cheek aside what is the right command to run in this situation? Should it have been rpm -U?

Comment 16 Fedora Update System 2020-10-20 19:56:08 UTC
FEDORA-2020-9765318e8b has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Jan Pazdziora 2020-10-22 07:25:53 UTC
Running rpm -U (or rpm -Uvh) is probably the cleanest way.

Comment 18 Fedora Update System 2020-10-23 22:13:12 UTC
FEDORA-2020-3d0c0ec81a has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.