Bug 1387136 - Local repository breaks upgrade
Summary: Local repository breaks upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-extras
Version: 26
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-20 08:29 UTC by Remi Collet
Modified: 2017-08-09 16:00 UTC (History)
6 users (show)

Fixed In Version: dnf-plugins-extras-2.0.2-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-09 16:00:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dnf.log (848.63 KB, application/x-gzip)
2016-10-20 13:49 UTC, Remi Collet
no flags Details

Description Remi Collet 2016-10-20 08:29:09 UTC
During download phase, local repository are available, and no problem detected, so reboot is suggested.

During reboot, local repository are not available, and upgrade fails.


Workaround: switch to online repository for the upgrade.


P.S. probably a very minor issue, at least bug open for documentation purpose.

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-10-20 12:48:19 UTC
The transaction to execute is prepared before upgrade, so it should work just fine to have a local repository. What exactly fails and how? Can you attach logs?

Comment 2 Remi Collet 2016-10-20 13:11:38 UTC
I use 

    baseurl=file:///home/rpmbuild/site/rpms/fedora/$releasever/remi/$basearch/

During "download" phase, dnf found:

     php-intl     x86_64      7.0.12-2.fc25.remi     remi              210 k

(but, per optimization for local repo, it doesn't download it)

Download phase is OK (all deps ok)

During reboot phase:

    package php-intl-7.0.12-2.fc23.remi.x86_64 requires libicuuc.so.54()(64bit), but none of the providers can be installed.

(which is the installed version).

After switching to 

    baseurl=http://rremirepo.net/fedora/$releasever/remi/$basearch/

Everything works.

Comment 3 Remi Collet 2016-10-20 13:21:21 UTC
Digging a bit more in the "big" dnf.log

During the 1st reboot (which fails..)

Oct 20 09:46:16 INFO --- logging initialized ---
Oct 20 09:46:16 DDEBUG timer: config: 4 ms
Oct 20 09:46:16 DEBUG cachedir: /var/cache/dnf
Oct 20 09:46:16 DEBUG Loaded plugins: system-upgrade, needs-restarting, reposync, config-manager, noroot, generate_completion_cache, Query, protected_packages, repomanage, builddep, download, debuginfo-install, playground, copr
Oct 20 09:46:16 DEBUG DNF version: 1.1.10
Oct 20 09:46:16 DDEBUG Command: dnf makecache timer 
Oct 20 09:46:16 DDEBUG Installroot: /
Oct 20 09:46:16 DDEBUG Releasever: 23
Oct 20 09:46:16 DDEBUG Base command: makecache
....
Oct 20 09:46:16 DDEBUG repo: downloading from remote: remi, _Handle: metalnk: None, mlist: None, urls ['file:///home/rpmbuild/site/rpms/fedora/23/remi/x86_64/'].
...
Oct 20 09:48:12 INFO --- logging initialized ---
Oct 20 09:48:12 DDEBUG timer: config: 4 ms
Oct 20 09:48:12 DEBUG cachedir: /var/cache/dnf
Oct 20 09:48:12 DEBUG Loaded plugins: config-manager, copr, reposync, repomanage, generate_completion_cache, needs-restarting, playground, system-upgrade, Query, debuginfo-install, download, protected_packages, builddep, noroot
Oct 20 09:48:12 DEBUG DNF version: 1.1.10
Oct 20 09:48:12 DDEBUG Command: dnf system-upgrade reboot 
Oct 20 09:48:12 DDEBUG Installroot: /
Oct 20 09:48:12 DDEBUG Releasever: 23
Oct 20 09:48:12 DDEBUG Base command: system-upgrade
Oct 20 09:48:12 DDEBUG Extra commands: ['reboot']

Oct 20 09:48:48 INFO --- logging initialized ---
Oct 20 09:48:48 DDEBUG timer: config: 4 ms
Oct 20 09:48:48 DEBUG cachedir: /var/cache/dnf
Oct 20 09:48:48 DEBUG Loaded plugins: system-upgrade, noroot, config-manager, copr, debuginfo-install, needs-restarting, playground, reposync, repomanage, builddep, protected_packages, Query, download, generate_completion_cache
Oct 20 09:48:48 DEBUG DNF version: 1.1.10
Oct 20 09:48:48 DDEBUG Command: dnf --releasever=25 system-upgrade upgrade 
Oct 20 09:48:48 DDEBUG Installroot: /
Oct 20 09:48:48 DDEBUG Releasever: 25
Oct 20 09:48:48 DDEBUG Base command: system-upgrade
Oct 20 09:48:48 DDEBUG Extra commands: ['upgrade']
Oct 20 09:48:48 DDEBUG timer: sack setup: 24 ms
Oct 20 09:48:50 DEBUG --> Début de la résolution des dépendances
Oct 20 09:48:50 DEBUG --> Résolution des dépendances terminée
Oct 20 09:48:50 DDEBUG timer: depsolve: 251 ms
Oct 20 09:48:50 SUBDEBUG 
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 120, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 139, in resolving
    base.resolve(cli.demands.allow_erasing)
  File "/usr/lib/python3.4/site-packages/dnf/base.py", line 541, in resolve
    raise exc
dnf.exceptions.DepsolveError:
package ImageMagick7-libs-7.0.3.4-1.fc23.remi.x86_64 requires libwebp.so.5()(64bit), but none of the providers can be installed.
package php-cli-7.0.12-2.fc23.remi.x86_64 requires libtinfo.so.5()(64bit), but none of the providers can be installed.
package php-intl-7.0.12-2.fc23.remi.x86_64 requires libicuuc.so.54()(64bit), but none of the providers can be installed.

Comment 4 Remi Collet 2016-10-20 13:41:17 UTC
I'm quite sure the packages have not been download (using local repo), as after switching to online repo, the same "dnf --releasever=25 system-upgrade download" command, they were been downloaded.

Comment 5 Remi Collet 2016-10-20 13:49:53 UTC
Created attachment 1212522 [details]
dnf.log

Full content of /var/log/dnf.log

Comment 6 Zbigniew Jędrzejewski-Szmek 2016-10-20 15:52:11 UTC
Hm, I see. And is the local repository available (mounted) during the upgrade?

Comment 7 Remi Collet 2016-10-20 16:13:35 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #6)
> Hm, I see. And is the local repository available (mounted) during the
> upgrade?

Sorry, I'm not sure (don't know which FS are available during the upgrade process)

Comment 8 Remi Collet 2016-10-20 16:26:24 UTC
Thanks to journalctl

During failed upgrade

oct. 20 09:48:12 builder.remirepo.net python3[32265]: Rebooting to perform upgrade.

-- Reboot --

oct. 20 09:48:44 builder.remirepo.net systemd[1]: Mounted /home/rpmbuild/site/rpms.

oct. 20 09:48:50 builder.remirepo.net dnf[1173]: package php-intl-7.0.12-2.fc23.remi.x86_64 requires libicuuc.so.54()(64bit), but none of the providers can be installed.


So, yes, it is mounted

Comment 9 Fedora Admin XMLRPC Client 2017-02-13 21:14:52 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Igor Gnatenko 2017-02-14 11:29:42 UTC
Thanks for the report. We don't "download" packages from local repos. So it just ignores them after reboot.

Comment 11 Fedora End Of Life 2017-02-28 10:28:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 12 Jaroslav Mracek 2017-06-21 09:16:28 UTC
I created a pull-request that should help with issue (https://github.com/rpm-software-management/dnf-plugins-extras/pull/97).

Comment 13 Will Woods 2017-06-23 18:25:30 UTC
(In reply to Remi Collet from comment #7)
> (In reply to Zbigniew Jędrzejewski-Szmek from comment #6)
> > Hm, I see. And is the local repository available (mounted) during the
> > upgrade?
> 
> Sorry, I'm not sure (don't know which FS are available during the upgrade
> process)

The upgrade process uses system-update.target, which Requires sysinit.target, which is After local-fs.target. So if your repo is a) on a local disk and b) has "auto" set in fstab, it will be mounted during upgrade. (See systemd.special(7) and systemd.offline-updates(7) for details.)

I don't know of a good way for the plugin to ask systemd whether a given path (say, your repo) is on a local mountpoint, but here's how you could check in shell:

  # find the mountpoint for $REPODIR
  mnt=$(findmnt -n -o TARGET --target "$REPODIR")

  # convert it to the correct unit name
  unit=$(systemd-escape --suffix=mount --path "$mnt")

  # is it listed as a dependency for system-update.target?
  systemctl list-dependencies system-update.target --plain | grep -qwe $unit || \
    echo WARNING: $REPODIR will not be mounted during upgrade.

Comment 14 Fedora Update System 2017-08-07 12:51:47 UTC
dnf-2.6.3-1.fc26 dnf-plugins-extras-2.0.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96

Comment 15 Fedora Update System 2017-08-08 01:25:04 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-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-4813633f96

Comment 16 Fedora Update System 2017-08-09 16:00:32 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 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.