Bug 1300350

Summary: creating/updating host collection with long integer value under content-host limit raises "must be a positive integer value" error
Product: Red Hat Satellite Reporter: Oleksandr Shtaier <oshtaier>
Component: Content ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.6CC: bkearney
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-23 20:26:07 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:
Attachments:
Description Flags
6.2.8 page none

Description Oleksandr Shtaier 2016-01-20 14:26:28 UTC
Description of problem:
Trying to create new host collection entity with long integer value (e.g. '123121231231231231231231232132132131237') passed into content host limit field. After pushing 'Save' button - nothing happened and get no errors in UI, but error is present in log file:
[E] ActiveRecord::RecordInvalid
[E] content_host_limit: ["must be a positive integer value."]

Same happened for edit operation, but next error present WebUI:
"An error occurred saving the Host Collection: Validation failed: Content host limit must be a positive integer value."

Version-Release number of selected component (if applicable):
6.1.6

How reproducible:
Always

Steps to Reproduce:
1. Try to create new host collection or edit existing one with long integer value for content host limit field

Actual results:
Error is present

Expected results:
Correct validation is performed and corresponding message is present on UI and no exceptions errors in log file

Additional info:

Comment 1 Oleksandr Shtaier 2016-01-20 14:33:17 UTC
Pretty similar to
https://bugzilla.redhat.com/show_bug.cgi?id=1139576
and
https://bugzilla.redhat.com/show_bug.cgi?id=1192356

but operations performed not from activation key, but from host collection point of view.

Anyway, try to fix that issue as mentioned in 'expected results', because functionality was fixed for activation key not so accurately and exception is still present in logs and message on UI is duplicated due some unknown reasons

Comment 3 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 4 Bryan Kearney 2016-07-26 15:37:03 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 6 Bryan Kearney 2017-03-23 20:26:07 UTC
I created a new collection, and added the value in a 6.2.8 machine. This was fixed. Closing this out.

Comment 7 Bryan Kearney 2017-03-23 20:28:19 UTC
Created attachment 1265884 [details]
6.2.8 page