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'
Created attachment 991268 [details] no error raised on UI, on updating content host limit with long integer value
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
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.
Created attachment 1069118 [details] Satellite 6.1.1: Activation Key validation error
VERIFIED as Comment#5 states, the issue has been fixed in 6.1.1 and no longer occurs.
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