Bug 1406443

Summary: SSH RSA key validation fails with error for OpenStack Infra Provider
Product: Red Hat CloudForms Management Engine Reporter: Petr Blaho <pblaho>
Component: ProvidersAssignee: Petr Blaho <pblaho>
Status: CLOSED CURRENTRELEASE QA Contact: Omri Hochman <ohochman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: cpelland, dajohnso, jfrey, jhardy, obarenbo, tzumainn
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1413210 (view as bug list) Environment:
Last Closed: 2017-06-12 17:31:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1413210    

Description Petr Blaho 2016-12-20 14:30:07 UTC
Description of problem:
SSH RSA key validation fails with

"Validation failed: error, comparison of NilClass with 34000000000001 failed"

when there is a Host with no EmsCluster (Deployment Role on OS side).

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

How reproducible:
Always

Steps to Reproduce:
1. Deploy Undercloud and have some Hosts (nodes) without any Deployment Role assigned.
2. Add OpenStack Infra Provider into CFME.
3. Wait for the refresh.
4. Try add or change SSH RSA key for that Provider and hit validate button.

Actual results:
Validation error notification is seen with "Credential validation was not successful: comparison of NilClass with 34000000000001 failed" and "Validation failed: error, comparison of NilClass with 34000000000001 failed" appears in evm.log of CFME.

Expected results:
Validation should go and pass or fail as when all Hosts have their Deployment Role (Ems Cluster)

Additional info:
The issue is caused by code selecting Hosts to run ssh key validation on. This code do not count on Host to no have EmsCluster. Easy to fix.

Comment 4 Petr Blaho 2017-01-11 16:50:57 UTC
New PR solving this is the last one - https://github.com/ManageIQ/manageiq/pull/13445

Code from previous one is used in the last one.

Comment 5 CFME Bot 2017-01-13 20:01:24 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/47c753976235bba324f725bd54da64d73deacddd

commit 47c753976235bba324f725bd54da64d73deacddd
Author:     Petr Blaho <pblaho>
AuthorDate: Tue Dec 20 16:19:00 2016 +0100
Commit:     Petr Blaho <pblaho>
CommitDate: Wed Jan 11 15:38:10 2017 +0100

    Check ems_cluster_id - OS Infra SSH KEY validation
    
    This adds ems_cluster_id checking when selecting Hosts for ssh key
    validation on OpenStack Infra Provider.
    
    Solves
    https://bugzilla.redhat.com/show_bug.cgi?id=1406443

 app/models/manageiq/providers/openstack/infra_manager.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comment 7 Ronnie Rasouli 2017-03-09 09:12:24 UTC
verified on 5.8.0.4