Bug 1331088

Summary: "undefined method `strip' for nil:NilClass" displayed while adding rhevm provider with invalid crendentails
Product: Red Hat CloudForms Management Engine Reporter: Aziza Karol <akarol>
Component: UI - OPSAssignee: Greg Blomquist <gblomqui>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: high    
Version: 5.6.0CC: akarol, dajohnso, gblomqui, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: provider:validation
Fixed In Version: 5.6.0.6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 15:55:36 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
err none

Description Aziza Karol 2016-04-27 16:52:43 UTC
Created attachment 1151478 [details]
err

Description of problem:


Version-Release number of selected component (if applicable):
5.6.0.4-beta2.3.20160421172650_719e256 

How reproducible:
100%

Steps to Reproduce:
1.add rhevm provider with invalid credentials
2.
3.

Actual results:
"undefined method `strip' for nil:NilClass" in UI. see attached screeshot

Expected results:
Proper validation message should be displayed

Additional info:

Comment 3 Aparna Karve 2016-04-27 21:55:15 UTC
Aziza,

I could not reproduce this.

The message that I'm seeing for invalid credentials is -

"Credential validation was not successful. Login failed due to a bad username or password."

Can you provide me your appliance details so I can debug there?

Thanks.

Comment 4 Aparna Karve 2016-04-27 21:56:34 UTC
Adding needinfo for the above request.

Comment 8 Aparna Karve 2016-04-28 18:21:34 UTC
Aziza,

This time I tried it on your appliance, and still no luck.
Wonder what I'm doing different..

Can you retry and let me know?

Thanks,
Aparna

Comment 9 Aparna Karve 2016-04-28 23:47:22 UTC
It looks like the error occurs with saved records only.
I was trying to add a new record and hence did not see the issue earlier.

Comment 10 Aparna Karve 2016-04-29 19:19:55 UTC
This does seem like a backend problem.

Here are a couple things that I observed :

1. Happens only in Edit mode (not in Add mode)
2. Happens when you previously had the right credentials saved and then in the edit mode you put the wrong credentials in and hit the Validate button.

Comment 12 CFME Bot 2016-05-04 05:25:49 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/e71ea5f1d30f1eab02d3f64818615e4fb19ddc91

commit e71ea5f1d30f1eab02d3f64818615e4fb19ddc91
Author:     Greg Blomquist <gblomqui>
AuthorDate: Fri Apr 29 16:06:50 2016 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Fri Apr 29 16:15:31 2016 -0400

    Fix RHEVM Verify Creds error message
    
    Stop trying to process the login error message.
    
    Also, handle SocketError for RHEVM cred verification. Instead of saying that the
    credential verification failed, indicate that we had trouble connecting to RHEV
    on a SocketError
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1331088

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

Comment 14 Ilanit Stein 2016-05-29 13:35:59 UTC
Verified on 5.6.0.7-beta2.6.20160516171555_b1be31f

Following steps from comment #10.

For wrong credentials, get the following error:
 
"Credential validation was not successful. Login failed due to a bad username or password."

Comment 16 errata-xmlrpc 2016-06-29 15:55:36 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:1348