Bug 1230251 - dnf-plugin-spacewalk should not launch when client is not registered to Spacewalk
Summary: dnf-plugin-spacewalk should not launch when client is not registered to Space...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space24
TreeView+ depends on / blocked
 
Reported: 2015-06-10 13:46 UTC by Tomáš Kašpárek
Modified: 2015-10-08 13:26 UTC (History)
1 user (show)

Fixed In Version: dnf-plugin-spacewalk-2.4.12-1
Clone Of:
Environment:
Last Closed: 2015-10-08 13:26:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Tomáš Kašpárek 2015-06-10 13:46:10 UTC
Description of problem:
dnf-plugin-spacewalk launches even if client is not registered into Spacewalk which leads to error in DNF which ends abnormally.

Version-Release number of selected component (if applicable):
dnf-1.0.0-1.fc22.noarch
dnf-plugin-spacewalk-2.4.11-1.fc22.noarch

How reproducible:
100%, tested on 1 system

Steps to Reproduce:
1. install dnf-plugin-spacewalk
2. dnf install $PACKAGE

Actual results:
Traceback (most recent call last):
  File "/usr/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 185, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 115, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1016, in configure
    self.base.plugins.run_config()
  File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/spacewalk.py", line 75, in config
    self.activate_channels(self.cli.demands.sack_activation)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/spacewalk.py", line 94, in activate_channels
    login_info = up2date_client.up2dateAuth.getLoginInfo(timeout=self.timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 227, in getLoginInfo
    login(timeout=timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 178, in login
    server = rhnserver.RhnServer(timeout=timeout)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 171, in __init__
    timeout=timeout)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 171, in getServer
    raise up2dateErrors.SSLCertificateFileNotFound(msg)
up2date_client.up2dateErrors.SSLCertificateFileNotFound: rhn-plugin: ERROR: can not find RHNS CA file: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT

as system is not registered into Spacewalk there's not RHNS CA file which leads to previous error

Expected results:
dnf should complete action normally with dnf-plugin-spacewalk disabled

Comment 1 Michael Mráka 2015-06-11 11:46:08 UTC
Fixed in master by
commit e1e0fe0545b117dfa15d3f11bd1fa3e72dc3453b
    bz1230251: do nothing if enabled=0

Comment 2 Jan Dobes 2015-10-08 13:26:17 UTC
Spacewalk 2.4 has been released.


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