Bug 1295219 - UX: AssertionError: Can not load repo.
UX: AssertionError: Can not load repo.
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
23
x86_64 Linux
low Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: Triaged, UserExperience
: 1298495 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-03 13:08 EST by G. Michael Carter
Modified: 2016-12-20 12:34 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 12:34:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description G. Michael Carter 2016-01-03 13:08:12 EST
Description of problem:

I've created local mirrors as I did with yum.

...but using dnf reposync and createrepo_c

dnf reposync --config=/tmp/$repoName.repo --repoid=$repoName  --download-path=/u2/Repositories/$ARCH/

createrepo_c -pd --compatibility --workers=8 -g /usr/share/revisor/comps/$repoName-comps.xml /u2/Repositories/$ARCH/$repoName
Version-Release number of selected component (if applicable):

When trying to connect to the local mirrors I get this on the fedora-everything and fedora-updates repos only:

dnf makecache -v
cachedir: /var/cache/dnf
Loaded plugins: noroot, reposync, langpacks, builddep, config-manager, playground, repograph, debuginfo-install, generate_completion_cache, repoclosure, download, needs-restarting, copr, Query, repomanage, protected_packages, system-upgrade
langpacks: No languages are enabled
Adding en_US.UTF-8 to language list
initialized Langpacks plugin
DNF version: 1.1.5
Making cache files for all metadata files.
google-chrome: will expire after 169430 seconds.
cf-config-generic: will expire after 170796 seconds.
cf-software-proprietary-generic: will expire after 170836 seconds.
cf-crossover-bottles-free: will expire after 170957 seconds.
updates: will expire after 161069 seconds.
rpmfusion-nonfree-updates: will expire after 168796 seconds.
negativo17-nvidia: will expire after 172371 seconds.
opensource-generic: will expire after 170796 seconds.
cf-software-proprietary-games: will expire after 170837 seconds.
rpmfusion-free-updates: will expire after 169241 seconds.
adobe-linux: will expire after 169241 seconds.
virtualbox: will expire after 169430 seconds.
fedora: has expired and will be refreshed.
google-earth: will expire after 168796 seconds.
negativo17-HandBrake: will expire after 169249 seconds.
google-talkplugin: will expire after 168796 seconds.
cf-classic-games: will expire after 170957 seconds.
cf-software-opensource: will expire after 170957 seconds.
cf-config-releases: will expire after 170676 seconds.
cf-crossover-bottles-nonfree: will expire after 170836 seconds.
negativo17-steam: will expire after 170796 seconds.
rpmfusion-nonfree: will expire after 169241 seconds.
google: will expire after 169240 seconds.
rpmfusion-free: will expire after 169249 seconds.
repo: using cache for: google-chrome
not found deltainfo for: google-chrome
not found updateinfo for: google-chrome
repo: using cache for: cf-config-generic
not found deltainfo for: CF Generic Configuration/Setup Scripts - 23 - x86_64
not found updateinfo for: CF Generic Configuration/Setup Scripts - 23 - x86_64
repo: using cache for: cf-software-proprietary-generic
not found deltainfo for: Proprietary Software (before using you need to agree to any licenses required)
not found updateinfo for: Proprietary Software (before using you need to agree to any licenses required)
repo: using cache for: cf-crossover-bottles-free
not found deltainfo for: CF Crossover Free Bottles (Software which doesn't require a license)
not found updateinfo for: CF Crossover Free Bottles (Software which doesn't require a license)
repo: using cache for: updates
not found deltainfo for: Fedora 23 - x86_64 - Updates
Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main
    cli.run()
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/makecache.py", line 87, in run
    self.base.fill_sack() # performs the md sync
  File "/usr/lib/python3.4/site-packages/dnf/base.py", line 256, in fill_sack
    self._add_repo_to_sack(r.id)
  File "/usr/lib/python3.4/site-packages/dnf/base.py", line 134, in _add_repo_to_sack
    load_updateinfo=True)
AssertionError: Can not load repo.


Realize that the above is probably not a bug with dnf but something I'm missing on my side.  However can't seems to figure out what's triggering the "Can not load repo" error... and would be good if there was a way of getting more detail.
Comment 1 Honza Silhan 2016-01-04 07:27:38 EST
The repodata seems to be invalid. With just `createrepo_c` without additional flags works fine. Does yum loads it?
Comment 2 G. Michael Carter 2016-01-04 12:12:10 EST
Here's the status so far.

ran: strace -e access,open dnf makecache -v

This was allowing me to guess at what files it was having issues with.  Would be nice if dnf could report more about why it can't load the repo.  Would make troubleshooting a little easier.

Building with createrepo (yum) on fedora 21...yum worked find, dnf failed.  So I revised my upgrade plans and upgraded the server where the repo mirror sits to fedora 23.

Now with createrepo_c was getting same results yum worked dnf worked some times... then stopped all together.

Then found that dnf reposync deletes rpms after downloading them... so the mirrors were all screwed up.  (which turns out dnf wasn't using the keepcache from any of the config files... ended up having to add --setopt keepcache=1 to the command line)

Also found if createrepo_c crashes/stops... it can leave the repo in a weird way.   Just noticed this .repodata exists message in my logs.

"Temporary repodata directory /u2/Repositories/x86_64/f23-everything/.repodata/ already exists! (Another createrepo process is running?)"

which seems to have deleted the repodata directory at some point.

Now I'm hitting this:

# /usr/bin/createrepo_c /u2/Repositories/x86_64/f23-everything
Directory walk started
Directory walk done - 46074 packages
Temporary output repo path: /u2/Repositories/x86_64/f23-everything/.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Segmentation fault (core dumped)
Comment 3 G. Michael Carter 2016-01-08 14:48:00 EST
still working on this... got createrepo_c to create the repos no problem but still have one failing.  

As I said would be nice to know why "Can not load repo".
Comment 4 Honza Silhan 2016-01-19 09:34:05 EST
*** Bug 1298495 has been marked as a duplicate of this bug. ***
Comment 5 G. Michael Carter 2016-01-19 10:18:47 EST
In my case managed to track down the problem to this updateinfo file.   I temporarily changed the load_updateinfo=True to load_updateinfo=False and things started to work.
Comment 6 Fedora Admin XMLRPC Client 2016-07-08 05:37:04 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 7 Honza Silhan 2016-07-27 05:50:05 EDT
It should print better output message. What was wrong, which metadata file is broken, etc.
Comment 8 Fedora End Of Life 2016-11-24 09:40:45 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Honza Silhan 2016-11-30 05:00:07 EST
It works in our testing instance without updateinfo data. Probably there's the issue is in repo generation in createrepo_c (-pd, --compatibility)
Comment 10 Fedora End Of Life 2016-12-20 12:34:36 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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