Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366175 - bkr system-details doesn't use CA_CERT from client.conf
Summary: bkr system-details doesn't use CA_CERT from client.conf
Alias: None
Product: Beaker
Classification: Community
Component: command line
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified vote
Target Milestone: 24.0
Assignee: Dan Callaghan
QA Contact: tools-bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2016-08-11 08:48 UTC by Martin Bacovsky
Modified: 2017-02-21 18:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-02-21 18:49:41 UTC

Attachments (Terms of Use)

Description Martin Bacovsky 2016-08-11 08:48:13 UTC
Description of problem:

bkr system-details doesn't use CA_CERT specified in client.conf. It uses systemwide ca bundle only.

bkr whoami works properly

Version-Release number of selected component (if applicable):
rpm -q beaker-client

How reproducible:

Steps to Reproduce:
1. Make sure the CA cert is not in /etc/pki/tls/cert.pem
2. Add the CA cert to client.conf A_CERT = "/etc/beaker/RedHatInternalCA.pem"
3. bkr system-details <system>

Actual results:
$ bkr system-details ""
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==23.1', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.7/site-packages/bkr/client/", line 83, in main
    return*cmd_args, **cmd_opts.__dict__)
  File "/usr/lib/python2.7/site-packages/bkr/client/commands/", line 75, in run
    print + system_url).read()
  File "/usr/lib64/python2.7/", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/", line 1242, in https_open
  File "/usr/lib64/python2.7/", line 1199, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

Expected results:
Work as expected

Additional info:

Comment 1 Dan Callaghan 2016-08-12 00:01:15 UTC
We need to switch system-details from urllib2 to requests like the other newer commands.

Comment 2 Dan Callaghan 2016-10-04 07:04:40 UTC

Comment 3 Dan Callaghan 2016-10-05 23:57:36 UTC
This bug fix is included in beaker-client-24.0-0.git.123.c4a89ef which is currently available for download here:

Comment 5 Dan Callaghan 2017-02-21 18:49:41 UTC
Beaker 24.0 has been released.

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