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 848564

Summary: System group limit of -1 is accepted
Product: Red Hat Satellite Reporter: Jeff Weiss <jweiss>
Component: WebUIAssignee: Walden Raines <walden>
Status: CLOSED CURRENTRELEASE QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0.0CC: ckannan, dajohnso, ehelms, jmontleo, omaciel, sghai, walden
Target Milestone: UnspecifiedKeywords: TestBlocker, Triaged
Target Release: UnusedFlags: walden: needinfo+
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/5163
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 14:05:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Weiss 2012-08-15 21:25:52 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Katello Version: 1.1.4-1.git.74.4bc9528.el6_3

How reproducible:


Steps to Reproduce:
1. Create a system group
2. Select it
3. change the Limit from unlimited to -1
  
Actual results:
System group updated

Expected results:
Error notification like "System group limit must be positive integer". 

Additional info:
already automated.

Comment 1 Lukas Zapletal 2012-08-17 13:38:53 UTC
I will add javascript check for browsers without HTML5 "spinner" support.

Comment 3 Lukas Zapletal 2012-09-10 07:43:19 UTC
Triage note: Re-targeting to CFSE 2.0, low impact.

Comment 5 Lukas Zapletal 2014-03-12 10:14:19 UTC
I am not sure how much the UI has changed, this might be still relevant.

Comment 6 Walden Raines 2014-04-09 22:02:35 UTC
Note that you now have to enter -2 instead of -1 (as -1 represents unlimited) but this is still valid.

Comment 7 Walden Raines 2014-06-03 15:09:33 UTC
PR: https://github.com/Katello/katello/pull/4203

Comment 8 Bryan Kearney 2014-06-04 12:51:09 UTC
Connecting redmine issue http://projects.theforeman.org/issues/5163 from this bug

Comment 9 Bryan Kearney 2014-06-04 12:55:34 UTC
Connecting redmine issue http://projects.theforeman.org/issues/5163 from this bug

Comment 10 Walden Raines 2014-06-04 13:17:19 UTC
commit ca4b35e3ab1f69a8508664ec7e931d6cada22344
Merge: 5dec326 f10db47
Author: Walden Raines <walden>
Date:   Wed Jun 4 09:16:29 2014 -0400

    Merge pull request #4203 from waldenraines/5163
    
    Fixes #5163/BZ848564 - ensure limited host groups have >= 1 hosts.

commit f10db471b33b86cf15c03af0889a3fca85dec4be
Author: Walden Raines <walden>
Date:   Tue Jun 3 11:06:34 2014 -0400

    Fixes #5163/BZ848564 - ensure limited host groups have >= 1 hosts.

Comment 12 Sachin Ghai 2014-06-05 06:55:30 UTC
Verified with sat6 beta snap8 (Satellite-6.0.3-RHEL-6-20140604.0)


So here is what I've verified.

- I created a host collection ( system-group renamed to host collection) with "unlimited" content-host limit

- And I tried to update the limit with some -ve value. If I set limit to any -ve value except -1 then, UI raises validation error and It is expected.

But If I update the limit with "-1", as soon as I type "-1", the text box closes and points to "unlimited" checkbox. So I'm assuming "-1" still an accepted value to tick the "unlimited" checkbox ? Please confirm.

Comment 13 Walden Raines 2014-06-05 12:47:11 UTC
(In reply to Sachin Ghai from comment #12)
> But If I update the limit with "-1", as soon as I type "-1", the text box
> closes and points to "unlimited" checkbox. So I'm assuming "-1" still an
> accepted value to tick the "unlimited" checkbox ? Please confirm.

Can you please file a new bug for the update issue and I'll fix that one as well?

Comment 14 Sachin Ghai 2014-06-05 13:45:28 UTC
sure..thanks.

Moving this bz to verified since if I set the limit to -1 on host-collection creation, the value is validated and higligted in red. So it appears UI doesn't allow -ve value on creation.

However this issue appears on update so will log seperate issue for that.

Comment 15 Bryan Kearney 2014-07-02 14:05:32 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.