https://<fqdn>/katello/api/v2/activation_keys page is throwing an ise with the following log output This seems to happen only when there seems to be activation keys with products assigned to them. Log Output Processing by Katello::Api::V2::ActivationKeysController#show as JSON Parameters: {"fields"=>"full", "api_version"=>"v2", "id"=>"6"} Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/activation_keys/show.json.rabl within katello/api/v2/layouts/resource (343.0ms) NoMethodError: undefined method `key?' for #<JSON::Ext::Generator::State:0x0000000f2e3920> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/object/try.rb:36:in `try' /opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.8/lib/active_model/serializers/json.rb:91:in `as_json' /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/models/katello/product.rb:185:in `as_json' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/json/encoding.rb:47:in `block in encode' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/json/encoding.rb:77:in `check_for_circular_references' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/json/encoding.rb:46:in `encode' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/json/encoding.rb:31:in `encode' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/object/to_json.rb:16:in `to_json' /opt/rh/ruby193/root/usr/share/gems/gems/json-1.5.5/lib/json/common.rb:216:in `generate' /opt/rh/ruby193/root/usr/share/gems/gems/json-1.5.5/lib/json/common.rb:216:in `generate' /opt/rh/ruby193/root/usr/share/gems/gems/json-1.5.5/lib/json/common.rb:352:in `dump' /opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:240:in `format_json' /opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:64:in `to_json' /opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `block in render' /opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:285:in `cache_results' /opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/activation_keys/show.json.rabl:1:in `__opt_rh_ruby____root_usr_share_gems_gems_katello_______app_views_katello_api_v__activation_keys_show_json_rabl__4038923587224331950_92770160' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
Created redmine issue http://projects.theforeman.org/issues/5866 from this bug
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
Moving to POST since upstream bug http://projects.theforeman.org/issues/5866 has been closed
Verified with sat6 beta snap7 compose2 (Satellite-6.0.3-RHEL-6-20140528.4) https://fqdn/katello/api/v2/activation_keys page is throwing following error instead of undefined method. And also the created activation_keys are tied to different products. {"displayMessage":"Either organization ID or environment ID needs to be specified","errors":["Either organization ID or environment ID needs to be specified"]}
Created attachment 900794 [details] please see the logs from production.log
@Partha, Please confirm if the steps taken to verify this bz are correct from comments 7 and 8 and if its the expected result.
@Sachin I think you were directly browsing to http://<fqdn>/katello/api/v2/activation_keys with no parameters, which is not the actual page for activation keys index. The correct page in the UI http://<fqdn>/activation_keys. You need to be going there. The initial description I gave referred to http://<fqdn>/katello/api/v2/activation_keys because http://<fqdn>/activation_keys calls this api url with the requisite parameters. So you can test this 2 ways. 1) Either do 'hammer activation-key list --organization-id=<id>' OR 2) Just go to the activation_keys page in the UI by selecting from the Content Menu and make sure no errors are raised.
thanks Partha.. Verified with sat6 beta snap7 compose2 (Satellite-6.0.3-RHEL-6-20140528.4) I can list the activation-key as suggested in comment 10. And didn't see any error in logs. [root@dhcp207-55 ~]# hammer activation-key list --organization-id=1 ---|-----------|----------------|-----------------------|------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|-----------|----------------|-----------------------|------------- 2 | rhel65_ak | 2 of Unlimited | Dev | cv-rhel65-ks 7 | test | 0 of Unlimited | Dev | ---|-----------|----------------|-----------------------|------------- Also I navigate to Activation key page via UI and didn't see any error in production.log. As per the defect description, key is tied up with CV/product too.
This was delivered with 6.0.3, which is the Satellite 6 Beta.