Bug 1391582 - dnf on Fedora 23 cannot make cache of Spacewalk repository
Summary: dnf on Fedora 23 cannot make cache of Spacewalk repository
Keywords:
Status: CLOSED DUPLICATE of bug 1331494
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2016-11-03 15:16 UTC by Gennadii Altukhov
Modified: 2017-09-28 18:07 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-27 12:11:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Gennadii Altukhov 2016-11-03 15:16:08 UTC
Description of problem:
When I'm trying to make a cache of Spacewalk Channel, I see an exception.

Version-Release number of selected component (if applicable):
Spacewalk client 2.5 and 2.6 nightly on Fedora 23

How reproducible:
always

Steps to Reproduce:
1. dnf clean all
2. dnf makecache


Actual results:
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.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 1099, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/makecache.py", line 89, in run
    self.base.fill_sack() # performs the md sync
  File "/usr/lib/python3.4/site-packages/dnf/base.py", line 239, in fill_sack
    self._add_repo_to_sack(r)
  File "/usr/lib/python3.4/site-packages/dnf/base.py", line 111, in _add_repo_to_sack
    repo.load()
  File "/usr/lib/python3.4/site-packages/dnf/repo.py", line 832, in load
    handle = self._handle_new_remote(tmpdir)
  File "/usr/lib/python3.4/site-packages/dnf-plugins/spacewalk.py", line 277, in _handle_new_remote
    self.add_http_headers(handle)
  File "/usr/lib/python3.4/site-packages/dnf-plugins/spacewalk.py", line 259, in add_http_headers
    if not header in self.login_info:
TypeError: argument of type 'NoneType' is not iterable

Expected results:
no errors

Additional info:

If I run 'dnf repolist' cache will be created w/o problems.
Look at line 83 in dnf-plugin-spacewalk/spacewalk.py (class Spacewalk(dnf.Plugin)):

self.activate_channels(self.cli.demands.sack_activation)

if self.cli.demands.sack_activation is False, we do not load login_info from up2date_client.up2dateAuth.getLoginInfo. In case of 'dnf makecache' it is False, in case of 'dnf repolist' it is True.

Comment 1 Gennadii Altukhov 2016-11-03 15:20:06 UTC
and yes, we need to change 'raise dnf.Error.RepoError(error)' to 'raise dnf.exceptions.RepoError(error)'

Comment 2 Ondrej Gajdusek 2017-08-27 12:11:19 UTC
This bug is not present in the latest version dnf-plugin-spacewalk-2.7.9-1. Resolution of this bug has been mentioned in bug 1331494, closing this as duplicate.

*** This bug has been marked as a duplicate of bug 1331494 ***

Comment 3 Eric Herget 2017-09-28 18:07:32 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


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