Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1343391

Summary: Unable to add compute resource of type RHEV
Product: Red Hat Satellite Reporter: Sanket Jagtap <sjagtap>
Component: Compute ResourcesAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, kbidarka, mhulan, ohadlevy, sjagtap
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/15344
Whiteboard:
Fixed In Version: foreman-1.11.0.38-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1447837 (view as bug list) Environment:
Last Closed: 2016-07-27 11:43:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
error on gui none

Description Sanket Jagtap 2016-06-07 09:06:25 UTC
Created attachment 1165556 [details]
error on gui

Description of problem:
Build: satellite 6.2 snap 14.1

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


How reproducible:
Try to add compute resource of type RHEV using required parameters

Actual results:
Unable to save
ERF56-1309 [Foreman::FingerprintException]: The remote system presented a public key signed by an unidentified certificate authority. If you are sure the remote system is authentic, go to the compute resource edit page, press the 'Test Connection' or 'Load Datacenters' button and submit

Expected results:
Compute resource should be added successfully

Additional info:
Added screenshot.

Comment 1 Kedar Bidarkar 2016-06-07 09:39:23 UTC
Upon submitting we get the below error in /var/log/foreman/production.log

2016-06-07 05:36:39 [app] [I] Started POST "/compute_resources" for 10.65.223.75 at 2016-06-07 05:36:39 -0400
2016-06-07 05:36:39 [app] [I] Processing by ComputeResourcesController#create as HTML
2016-06-07 05:36:39 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"7abvJK1ZYeDKsXP0ZdNozbelPpB1QJdKuyB7poy79vI=", "compute_resource"=>{"name"=>"rhevm-serverredhat.com", "provider"=>"Ovirt", "description"=>"", "url"=>"https://rhevm-server.redhat.com/api", "user"=>"admin@internal", "password"=>"[FILTERED]", "public_key"=>"", "location_ids"=>[""], "organization_ids"=>["", "1"]}, "commit"=>"Submit"}
2016-06-07 05:36:39 [app] [W] Action failed
 | Foreman::FingerprintException: ERF56-1309 [Foreman::FingerprintException]: The remote system presented a public key signed by an unidentified certificate authority. If you are sure the remote system is authentic, go to the compute resource edit page, press the 'Test Connection' or 'Load Datacenters' button and submit
 | /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:328:in `rescue in client'
 | /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:315:in `client'
 | /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:367:in `update_available_operating_systems'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'

Comment 2 Kedar Bidarkar 2016-06-07 13:36:23 UTC
RHEV compute resource, currently being added is "Red Hat Enterprise Virtualization Manager Version: 3.5.7-0.1.el6ev".

This fails with only Sat6.2 and was added fine with Sat6.1.9 zstream build.

Comment 4 Lukas Zapletal 2016-06-07 14:24:12 UTC
It looks like RHEV server certificate was regenerated and it does not present valid CA certificate. Please verify that server HTTPS certificate is signed with CA certificate that is available for download at

http://rhev.instance/ca.crt

There was no change in this regard in the latest snap or even Satellite release.

Comment 5 Kedar Bidarkar 2016-06-07 15:37:16 UTC
The RHEV CA crt does not appear to be regenerated 

~]# openssl x509 -in ca.crt -noout -startdate -enddate
notBefore=Jul 29 15:08:43 2014
notAfter=Jul 27 15:08:43 2024 GMT

----------------------------------------------------------------

Wondering could this be somehow related to the recent "operatingsystem changes" brought in for RHEV3.6?

As it works fine with sat6.1.9 and  sat6.2-snap(GA)13.0 , the issue is seen only with sat6.2-snap(GA)-14.1 build.

Comment 6 Marek Hulan 2016-06-07 15:54:09 UTC
It seems that the new request for detecting os feature does not respect custom certificate.

Comment 9 Marek Hulan 2016-06-08 11:10:43 UTC
As an easy workaround you can specify the public key of CA that issued a certificate for oVirt/RHEV instance manually. You can usually find it at https://$ovirt_hostname/ca.crt. If you set it in public_key field, you can load data centers and save the compute resource.

Comment 10 Marek Hulan 2016-06-08 11:53:28 UTC
Created redmine issue http://projects.theforeman.org/issues/15344 from this bug

Comment 12 Bryan Kearney 2016-06-09 08:17:19 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15344 has been closed

Comment 13 Sanket Jagtap 2016-06-20 10:04:58 UTC
build : Satellite 6 snap 16.0

Compute resource of type RHEV added successfully

Comment 14 Bryan Kearney 2016-07-27 11:43:18 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://access.redhat.com/errata/RHBA-2016:1501