Bug 1353104

Summary: Validation for Domain and OS Parameters tab stopped to work
Product: Red Hat Satellite Reporter: Oleksandr Shtaier <oshtaier>
Component: WebUIAssignee: orabin
Status: CLOSED ERRATA QA Contact: Renzo Nuccitelli <rnuccite>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, bkearney, inecas, jcallaha, rnuccite
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:44: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:
Bug Depends On: 1296662    
Bug Blocks:    
Attachments:
Description Flags
Large domain validation on sat 6.3 snap 6
none
Domain with invalid parameter none

Description Oleksandr Shtaier 2016-07-06 06:26:29 UTC
Description of problem:
When you input invalid values into 'Name' and 'Value' fields for new Domain or Operating System entity and push submit button, parameter entry just disappear without any error shown

Version-Release number of selected component (if applicable):
6.2 SNAP 18.2

How reproducible:
Always

Steps to Reproduce:
1. Create new Domain entity
2. Open it and go to 'Parameters' tab
3. Push '+Add Parameter' button
4. Input invalid values (longer than 256 characters) in both fields
5. Push 'Submit' button


Actual results:
Parameter entry is disappeared and no error is shown

Expected results:
Proper (just usual one) error is shown

Additional info:

Comment 1 Oleksandr Shtaier 2016-07-06 06:28:08 UTC
Regression is introduced in latest SNAP (don't see any errors like that in automation runs for SNAP 17)

Comment 3 jcallaha 2016-07-07 17:58:23 UTC
The error is shown in production.log, but doesn't make it to the UI.

2016-07-07 13:53:36 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"54c/rNIrD587VYgQAS9monLcGJIf+vwrkafz3n+oKp0=", "domain"=>{"name"=>"google.com", "fullname"=>"", "dns_id"=>"", "domain_parameters_attributes"=>{"1467914013432"=>{"name"=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false"}}, "location_ids"=>[""], "organization_ids"=>["", "1"]}, "id"=>"2-google-com"}
2016-07-07 13:53:36 [app] [I] Failed to save: Name is too long (maximum is 255 characters)

Comment 6 Ivan Necas 2016-07-08 15:09:22 UTC
This beahaviour was introduced by https://bugzilla.redhat.com/show_bug.cgi?id=1296662 and is caused by the fact, that we check the permissions in the form, which causes the data from form not survive the reload in form.

Comment 8 Ivan Necas 2016-07-08 15:40:11 UTC
Created redmine issue http://projects.theforeman.org/issues/15629 from this bug

Comment 10 Bryan Kearney 2016-07-08 16:14:48 UTC
Upstream bug component is Provisioning

Comment 11 Bryan Kearney 2016-07-11 08:15:08 UTC
Upstream bug component is WebUI

Comment 12 Bryan Kearney 2016-07-11 12:15:13 UTC
Upstream bug assigned to orabin

Comment 13 Bryan Kearney 2016-07-11 12:15:17 UTC
Upstream bug assigned to orabin

Comment 15 Bryan Kearney 2016-07-12 13:26:08 UTC
Replacing this with the simpllified version from https://bugzilla.redhat.com/show_bug.cgi?id=1354572. In 6.3 we should re-apply this bug.

Comment 16 Bryan Kearney 2016-07-12 20:15:24 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15629 has been closed

Comment 19 Renzo Nuccitelli 2016-11-09 19:05:45 UTC
Created attachment 1219050 [details]
Large domain validation on sat 6.3 snap 6

Comment 20 Renzo Nuccitelli 2016-11-09 19:25:29 UTC
While verifying this bug the validation is ok. Inputs are red and user is redirected to parameters tab when submitting form. But there is no message explaining what the error actually is. Important noticing the error message appear on log:

[root@foo ~]# grep "Name is too long" /var/log/foreman/production.log 
2016-11-09 20:20:46 0a17d5b6 [app] [I] Failed to save: Name is too long (maximum is 255 characters)

So am setting it back to assigned.

Comment 21 Renzo Nuccitelli 2016-11-09 19:29:13 UTC
In time: the validation worked on both 6.2.4 and 6.3 snap 6 versions, but without error messages as mentioned on comment 20

Comment 22 orabin 2016-11-10 08:20:34 UTC
Created attachment 1219241 [details]
Domain with invalid parameter

Comment 25 Satellite Program 2018-02-21 16:44: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/RHSA-2018:0336