Bug 1696086

Summary: [Kubevirt-Foreman] wrong validation on x509 certificate
Product: Red Hat Satellite Reporter: Vatsal Parekh <vparekh>
Component: Compute Resources - CNVAssignee: Shira Maximov <mshira>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: dvoss, egolov, lhellebr, masayag, mmccune, pkliczew, vsedmik
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-fog-kubevirt-1.1.1 Doc Type: If docs needed, set a value
Doc Text:
Incorrect x509 certificates specified in the settings fields for Kubevirt Compute Resources can still show 'Test connection was successful'. If unable to view list of virtual machines after creating the Compute Resource, verify the x509 certificate is valid.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:24:10 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:
Bug Depends On: 1746434    
Bug Blocks:    

Description Vatsal Parekh 2019-04-04 06:50:41 UTC
Description of problem:
Even when the cert value was given wrong, the validation shows that `Test connection was successful`
And adding compute resource with that wrong value worked as well, was able to see the list of VMs, which reflects some wrong logic there.

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

How reproducible:


Steps to Reproduce:
1.Add a wrong value in x509 cert
2.Test connection and add that compute resource
3.Still seeing the list of VMs

Actual results:
Compute resource works with wrong x509 cert, error in the logic

Expected results:
Should show failed validation at first, and should not be working if cert was wrong

Additional info:

Comment 3 Vatsal Parekh 2019-04-04 07:12:49 UTC
Also seeing the issue with positive flow, not able to add it anymore with updated gem
Getting `wrong number of arguments (given 1, expected 0)`

Comment 4 Vatsal Parekh 2019-04-12 06:59:29 UTC
This seems working on latest nightly Foreman + plugin master

Comment 6 Lukáš Hellebrandt 2019-08-01 13:58:04 UTC
Wrong cert now causes Test Connection to fail.

However, it is still possible to submit the form and the CR is added. It doesn't work then. This isn't necessarily wrong but it's inconsistent with other CRs. For example, it's not possible to add a RHEV CR with invalid cert at all. I think it shouldn't be possible to add Kubevirt when Test Connection fails.

Comment 19 errata-xmlrpc 2020-04-14 13:24:10 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/RHSA-2020:1454