Bug 1330759

Summary: engine-log-collector --insecure option does not work
Product: Red Hat Enterprise Virtualization Manager Reporter: Marina Kalinin <mkalinin>
Component: ovirt-log-collectorAssignee: Rafael Martins <rmartins>
Status: CLOSED ERRATA QA Contact: Gonza <grafuls>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.5CC: dfediuck, pbrilla, sbonazzo, ylavi
Target Milestone: ovirt-4.0.4Keywords: TestOnly, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-28 22:18:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1371405    

Description Marina Kalinin 2016-04-26 21:40:10 UTC
Description of problem:
engine-log-collector --insecure option does not work

Reading the help for log collector, I understand that insecure option would not verify the ssl certificate:
~~~
  --cert-file=/etc/pki/ovirt-engine/ca.pem
                        The CA certificate used to validate the engine.
                        (default=/etc/pki/ovirt-engine/ca.pem)
  --insecure            Do not make an attempt to verify the engine.
~~~

However, when I run it with that option, it fails:
~~~
# engine-log-collector --insecure list
...
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to skip): 
ERROR: Problem connecting to the REST API.Is the service available and does the CA certificate exist?
ERROR: _get_hypervisors_from_api: [ERROR]::RHEV API connection failure, (60, 'Peer certificate cannot be authenticated with known CA certificates')
INFO: No hypervisors were found, therefore no hypervisor data will be listed.
~~~


Version-Release number of selected component (if applicable):
3.6.5 and below

How reproducible:
100%

Steps to Reproduce:
1. Run:
# engine-log-collector --insecure list
2. Provide correct API password.


Actual results:
Fails and cannot connect to restAPI.

Expected results:
Should list the hosts info collected from restAPI.

Comment 1 Yaniv Lavi 2016-05-09 11:01:38 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 5 Rafael Martins 2016-08-01 10:04:53 UTC
I've just tested this on 4.0.1 and it works, can QE please check?

Thanks

Comment 6 Gonza 2016-08-29 14:47:27 UTC
Verified with:
ovirt-log-collector-4.0.0-1.el7ev.noarch

# ovirt-log-collector --insecure list
This command will collect system configuration and diagnostic
information from this system.
The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before
being passed to any third party.
No changes will be made to system configuration.
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to skip): 
WARNING: This ovirt-log-collector call will collect logs from all available hosts. This may take long time, depending on the size of your deployment
Host list (datacenter=None, cluster=None, host=None):
Data Center          | Cluster              | Hostname/IP Address
golden_env_mixed     | golden_env_mixed_1   | x1.redhat.com
golden_env_mixed     | golden_env_mixed_1   | x2.redhat.com
golden_env_mixed     | golden_env_mixed_1   | x3.redhat.com

Comment 8 errata-xmlrpc 2016-09-28 22:18:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1952.html