Bug 1481991 - Clicking "Load DataCenters" with no url on a new compute resource causes an error instead of validation message
Summary: Clicking "Load DataCenters" with no url on a new compute resource causes an e...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Adam Ruzicka
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-16 08:50 UTC by orabin
Modified: 2019-08-12 14:38 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 17:07:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Submitting RHEV compute resource with no url (17.47 KB, image/png)
2017-08-16 08:50 UTC, orabin
no flags Details
after applying patch (44.39 KB, image/png)
2017-08-22 07:56 UTC, Adam Ruzicka
no flags Details
screenshot of UI (62.48 KB, image/png)
2017-12-07 06:56 UTC, Nikhil Kathole
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21718 0 None None None 2017-11-21 11:21:02 UTC
Red Hat Bugzilla 1467664 0 unspecified CLOSED RHEV compute resource submission fails on name has already been taken error correction 2021-02-22 00:41:40 UTC

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


Note You need to log in before you can comment on or make changes to this bug.