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
Keywords: EasyFix, Patch, Triaged
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)

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 "hp-dl380pgen8-02-vm-16.lab.bos.redhat.com"
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/main.py", line 83, in main
    return cmd.run(*cmd_args, **cmd_opts.__dict__)
  File "/usr/lib/python2.7/site-packages/bkr/client/commands/cmd_system_details.py", line 75, in run
    print urlopener.open(self.hub._hub_url + system_url).read()
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1242, in https_open
  File "/usr/lib64/python2.7/urllib2.py", 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.