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 1481991

Summary: Clicking "Load DataCenters" with no url on a new compute resource causes an error instead of validation message
Product: Red Hat Satellite Reporter: orabin
Component: Compute Resources - RHEVAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: aruzicka, bbuckingham, ehelms, inecas, nkathole, pcreech
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 17:07:15 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
Submitting RHEV compute resource with no url
none
after applying patch
none
screenshot of UI none

Description orabin 2017-08-16 08:50:08 UTC
Created attachment 1314014 [details]
Submitting RHEV compute resource with no url

Description of problem: Creating a new RHEV compute resource with no url presents an error message "undefined method `+' for nil:NilClass" instead of showing a validation error about the empty url.


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


Steps to Reproduce:
1. Go to "Infrastructure" -> "Compute resources"
2. Click "Create compute resource"
3. Choose "Provider" RHEV
4. Click "Load Datacenters"

Actual results: undefined method `+' for nil:NilClass


Expected results: validation message: url can't be blank


Additional info: When clicking submit instead of "Load Datacenters" the same message appears with "Oops, we're sorry but something went wrong undefined method `+' for nil:NilClass" (screenshot attached)

Comment 2 Adam Ruzicka 2017-08-22 07:56:17 UTC
Created attachment 1316553 [details]
after applying patch

Apparently the we try to establish the connection before the validations are run, basically making this a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1467664, after switching before_validation to after_validation I'm getting validations on the URL, but the undefined method + still persists as it is caused by older restclient.

Comment 3 Adam Ruzicka 2017-08-22 08:16:26 UTC
Validations are added by https://bugzilla.redhat.com/show_bug.cgi?id=1467664, undefined method '+' for NilClass is fixed in rest-client > 2.

Currently rest-client is locked to 1.8.0 by runcible (pulled in by katello). The dependency is raised by runcible-2.0.0.

Moving to POST because both issues described here are fixed in upstream.

Comment 6 Adam Ruzicka 2017-11-21 11:21:00 UTC
Created redmine issue http://projects.theforeman.org/issues/21718 from this bug

Comment 7 Satellite Program 2017-11-21 13:22:50 UTC
Upstream bug assigned to aruzicka

Comment 8 Satellite Program 2017-11-21 13:22:54 UTC
Upstream bug assigned to aruzicka

Comment 9 Ivan Necas 2017-11-22 08:34:42 UTC
Adam: would the fix upstream apply also to sat 6.3?

Comment 10 Adam Ruzicka 2017-11-22 09:01:47 UTC
Yes, it applies cleanly and seems to fix the issue for me.

Comment 11 Satellite Program 2017-11-22 15:23:57 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21718 has been resolved.

Comment 12 Patrick Creech 2017-11-30 16:25:37 UTC
Adam,

This didn't cherry-pick cleanly for me, and I'm not that familiar with foreman's codebase.  Could you do the pick for me?

Thanks,
Patrick

Comment 13 Adam Ruzicka 2017-11-30 19:47:10 UTC
Hello, I opened the MR, hope there's everything alright with it.

Comment 14 Nikhil Kathole 2017-12-07 06:56:30 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 27

clicking load datacenter while creating new rhev compute resource without URL shows Validation message URL can't be blank and is invalid. (see attachment)

Comment 15 Nikhil Kathole 2017-12-07 06:56:58 UTC
Created attachment 1364058 [details]
screenshot of UI

Comment 16 Bryan Kearney 2018-02-21 17:07:15 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-2018:0336