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
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: command line
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: 24.0
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
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
beaker-client-23.1-1.fc23.noarch


How reproducible:
Always

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
    context=self._context)
  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
http://gerrit.beaker-project.org/5293

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:

https://beaker-project.org/nightlies/develop/

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.