Bug 1638689 - dnf system-upgrade errors when excluding weak dependencies
Summary: dnf system-upgrade errors when excluding weak dependencies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-extras
Version: 28
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Pavla Kratochvilova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-12 09:25 UTC by Matt Fagnani
Modified: 2018-12-05 02:33 UTC (History)
5 users (show)

Fixed In Version: dnf-plugins-extras-4.0.0-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-05 02:33:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journalctl output from when "Installing weak dependencies:" was shown to the system rebooting (31.23 KB, text/plain)
2018-10-12 09:25 UTC, Matt Fagnani
no flags Details
dnf.log from when "Installing weak dependencies:" was shown to the system rebooting (12.92 KB, text/plain)
2018-10-12 09:27 UTC, Matt Fagnani
no flags Details

Description Matt Fagnani 2018-10-12 09:25:37 UTC
Created attachment 1493181 [details]
journalctl output from when "Installing weak dependencies:" was shown to the system rebooting

Description of problem:
I tried to upgrade from F28 to F29 while excluding weak dependencies using
sudo dnf system-upgrade download --refresh --releasever=29 --setopt=install_weak_deps=False  The resolved packages didn't include the weak dependencies, the packages were downloaded and the command completed correctly. 

After I ran sudo dnf system-upgrade reboot and the system rebooted, during the system upgrade process dnf output "Installing weak dependencies:" followed by the list of weak dependencies. dnf then output errors of the following form for each weak dependency package:
dnf[674]: Error opening file for checksum: /var/lib/dnf/system-upgrade/fedora-b80ee773d578c9a3/packages/network-scripts-ppp-2.4.7-26.fc29.i686.rpm
dnf[674]: Package "network-scripts-ppp-2.4.7-26.fc29.i686" from repository "fedora" has incorrect checksum

The weak dependency packages couldn't be downloaded as the network connection hadn't been started by the system upgrade process. The following errors occurred in the journal

Oct 09 16:52:35 dimension dnf[674]: Error: Some packages have invalid cache, but cannot be downloaded due to "--cacheonly" option
Oct 09 16:52:36 dimension systemd[1]: dnf-system-upgrade.service: Main process exited, code=exited, status=1/FAILURE
Oct 09 16:52:36 dimension systemd[1]: dnf-system-upgrade.service: Failed with result 'exit-code'.
Oct 09 16:52:36 dimension systemd[1]: Failed to start System Upgrade using DNF.
Oct 09 16:52:36 dimension systemd[1]: dnf-system-upgrade.service: Triggering OnFailure= dependencies.
Oct 09 16:52:36 dimension audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dnf-system-upgrade comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Oct 09 16:52:36 dimension kernel: kauditd_printk_skb: 8 callbacks suppressed
Oct 09 16:52:36 dimension kernel: audit: type=1130 audit(1539118356.413:93): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dnf-system-upgrade comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Oct 09 16:52:36 dimension systemd[1]: Starting System Upgrade using DNF failed...

/var/log/dnf.log included the following trace and errors

2018-10-09T20:52:35Z SUBDEBUG 
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 222, in do_transaction
    self.download_packages(install_pkgs, self.output.progress, total_cb)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 1190, in download_packages
    remote_pkgs, local_repository_pkgs = self._select_remote_pkgs(pkglist)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 2486, in _select_remote_pkgs
    _('Some packages have invalid cache, but cannot be downloaded due to '
dnf.exceptions.Error: Some packages have invalid cache, but cannot be downloaded due to "--cacheonly" option
2018-10-09T20:52:35Z CRITICAL Error: Some packages have invalid cache, but cannot be downloaded due to "--cacheonly" option

I'll attach the journal messages and /var/log/dnf.log from the point where "Installing weak dependencies:" was shown until the system rebooted. The system then rebooted into F28. I ran sudo dnf system-upgrade download --refresh --releasever=29 which downloaded the weak dependencies and completed correctly. I ran sudo dnf system-upgrade reboot and the system upgrade process completed without the errors above. F29 has been running normally. 

Version-Release number of selected component (if applicable):
python3-dnf-plugin-system-upgrade-2.0.5-3.fc28.noarch
dnf-2.7.5-12.fc28.noarch

How reproducible:
The errors happened once.

Steps to Reproduce:
1. sudo dnf upgrade --refresh (from F28 with updates-testing enabled)
2. sudo dnf system-upgrade download --refresh --releasever=29 --setopt=install_weak_deps=False
3. sudo dnf system-upgrade reboot
4. errors during the system upgrade process showed up in the messages

Actual results:
The dnf system upgrade process tried to install weak dependencies that had been excluded and weren't downloaded. Errors relating to the weak dependencies occurred which led to the upgrade not completing and the system rebooting.

Expected results:
The system upgrade completes without installing the weak dependencies.

Additional info:

Comment 1 Matt Fagnani 2018-10-12 09:27:21 UTC
Created attachment 1493182 [details]
dnf.log from when "Installing weak dependencies:" was shown to the system rebooting

Comment 3 Pavla Kratochvilova 2018-10-18 13:39:03 UTC
The PR https://github.com/rpm-software-management/dnf-plugins-extras/pull/135 has been merged.

Comment 4 Fedora Update System 2018-11-22 18:56:38 UTC
libdnf-0.22.3-1.fc29 dnf-4.0.9-1.fc29 dnf-plugins-core-4.0.2-1.fc29 dnf-plugins-extras-4.0.0-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-17cbc3c616

Comment 5 Fedora Update System 2018-11-23 02:56:14 UTC
dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 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-2018-17cbc3c616

Comment 6 Fedora Update System 2018-12-05 02:33:12 UTC
dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, 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.