Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1192356 - On updating the content-host limit with long integer under activation-key, UI neither raised any error nor save the changes
On updating the content-host limit with long integer under activation-key, UI...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Activation Keys (Show other bugs)
6.1.0
Unspecified Unspecified
medium Severity medium (vote)
: Beta
: Unused
Assigned To: Brad Buckingham
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-13 03:50 EST by Sachin Ghai
Modified: 2016-07-27 05:13 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:13:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
no error raised on UI, on updating content host limit with long integer value (30.20 KB, image/png)
2015-02-13 03:53 EST, Sachin Ghai
no flags Details
Satellite 6.1.1: Activation Key validation error (95.59 KB, image/png)
2015-09-01 15:19 EDT, Brad Buckingham
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description Sachin Ghai 2015-02-13 03:50:14 EST
Description of problem:
I created a activation-key with content-host limit 1 and later tried to update it with long integer value. But UI neither raise any error not save the changes.

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

Satellite-6.1.0-RHEL-6-20150210.0
Sat6.1.0 beta snap2


How reproducible:
always

Steps to Reproduce:
1. create activationkey with content-host limit '1'
2. update it with long integer value 111111111111

Actual results:
UI neither save changes nor raises any error

Expected results:
On saving the changes, UI should raise validation error.

Additional info:
production.log raises exception:
Processing by Katello::Api::V2::ActivationKeysController#update as JSON
  Parameters: {"organization"=>{"name"=>"testorg", "label"=>"testorg", "id"=>3}, "created_at"=>"2015-02-13T03:11:44Z", "updated_at"=>"2015-02-13T03:20:06Z", "id"=>"2", "name"=>"ak1", "description"=>nil, "unlimited_content_hosts"=>false, "auto_attach"=>true, "content_view"=>{"id"=>3, "name"=>"Default Organization View", "label"=>"73c34419-092f-4696-be48-5d0c7f8168b1", "description"=>nil, "organization_id"=>3, "default"=>true, "created_at"=>"2015-02-13T01:13:49Z", "updated_at"=>"2015-02-13T01:13:49Z", "composite"=>nil, "next_version"=>1, "organization"=>"testorg", "environments"=>["Library"], "versions"=>["1.0"], "versions_details"=>[{"version"=>"1.0", "published"=>"2015-02-13 01:13:49 UTC", "environments"=>["Library"]}]}, "content_view_id"=>3, "environment_id"=>5, "usage_count"=>0, "user_id"=>3, "max_content_hosts"=>11111111111, "release_version"=>nil, "service_level"=>nil, "content_overrides"=>[], "permissions"=>{"view_activation_keys"=>true, "edit_activation_keys"=>true, "destroy_activation_keys"=>true}, "environment"=>{"id"=>5, "name"=>"Library", "label"=>"Library", "description"=>nil, "organization"=>{"name"=>"testorg", "label"=>"testorg", "id"=>3}, "created_at"=>"2015-02-13T01:13:49Z", "updated_at"=>"2015-02-13T01:13:49Z", "library"=>true, "prior"=>nil, "successor"=>nil, "counts"=>{"content_hosts"=>0, "content_views"=>0, "packages"=>0, "puppet_modules"=>0, "errata"=>{"security"=>0, "bugfix"=>0, "enhancement"=>0, "total"=>0}, "yum_repositories"=>2, "docker_repositories"=>0, "products"=>2}, "permissions"=>{"view_lifecycle_environments"=>true, "edit_lifecycle_environments"=>true, "destroy_lifecycle_environments"=>false, "promote_or_remove_content_views_to_environments"=>true}, "selected"=>true}, "products"=>[], "host_collections"=>[], "api_version"=>"v2", "activation_key"=>{"id"=>"2", "name"=>"ak1", "description"=>nil, "environment_id"=>5, "created_at"=>"2015-02-13T03:11:44Z", "updated_at"=>"2015-02-13T03:20:06Z", "user_id"=>3, "max_content_hosts"=>11111111111, "content_view_id"=>3, "release_version"=>nil, "unlimited_content_hosts"=>false, "auto_attach"=>true, "service_level"=>nil}}
Validation failed: Max content hosts must be less than 2147483648 (ActiveRecord::RecordInvalid)
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
Comment 1 Sachin Ghai 2015-02-13 03:53:11 EST
Created attachment 991268 [details]
no error raised on UI, on updating content host limit with long integer value
Comment 3 Roman Plevka 2015-08-10 10:35:38 EDT
The issue seems to exist on all the numerical id-related attributes and originates from the API.

Here's the bug I created to cover the root cause issue: 1252046
Comment 4 Brad Buckingham 2015-09-01 15:19:08 EDT
I have tested this on a Satellite 6.1.1 GA install and am no longer observing
the behavior described.

RPMs:
ruby193-rubygem-katello-2.2.0.66-1.el7sat.noarch
foreman-1.7.2.34-1.el7sat.noarch

Attaching updated screenshot.
Comment 5 Brad Buckingham 2015-09-01 15:19:51 EDT
Created attachment 1069118 [details]
Satellite 6.1.1: Activation Key validation error
Comment 6 Roman Plevka 2016-03-09 07:24:35 EST
VERIFIED
as Comment#5 states, the issue has been fixed in 6.1.1 and no longer occurs.
Comment 9 errata-xmlrpc 2016-07-27 05:13:15 EDT
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/RHBA-2016:1501

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