Description of problem: invoking: `activation_key create --name test --org ACME_Corporation --environment dev --limit 1` fails with exception: --- Wrong/Invalid parameters sent for api/activation_keys/create. Wrong Parameters: [{"activation_key"=>["usage_limit"]}] Parameters Received: {"activation_key"=>{"usage_limit"=>"1", "description"=>nil, "name"=>"test"}, "action"=>"create", "controller"=>"api/activation_keys", "environment_id"=>"7"} --- Version-Release number of selected component (if applicable): Recent Katello: -- pulp-common-1.1.10-1.el6.noarch qpid-cpp-server-ssl-0.14-14.el6_2.x86_64 katello-glue-candlepin-0.2.41-1.git.23.9a2ef30.el6.noarch katello-repos-testing-0.2.4-1.el6.noarch pulp-1.1.10-1.el6.noarch katello-configure-0.2.27-1.git.1.039c665.el6.noarch candlepin-tomcat6-0.5.32-1.el6.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-cli-common-0.2.41-1.git.0.6ef074b.el6.noarch katello-cli-0.2.41-1.git.0.6ef074b.el6.noarch m2crypto-0.21.1.pulp-7.el6.x86_64 mod_wsgi-3.3-3.pulp.el6.x86_64 python-qpid-0.14-7.el6_2.noarch qpid-cpp-client-ssl-0.14-14.el6_2.x86_64 katello-glue-pulp-0.2.41-1.git.23.9a2ef30.el6.noarch pulp-selinux-server-1.1.10-1.el6.noarch katello-qpid-client-key-pair-1.0-1.noarch katello-agent-1.0.3-1.git.0.cccd0b4.el6.noarch candlepin-0.5.32-1.el6.noarch qpid-cpp-server-0.14-14.el6_2.x86_64 katello-glue-foreman-0.2.41-1.git.23.9a2ef30.el6.noarch katello-0.2.41-1.git.23.9a2ef30.el6.noarch katello-candlepin-cert-key-pair-1.0-1.noarch python-oauth2-1.5.170-2.pulp.el6.noarch katello-certs-tools-1.1.6-1.git.0.4878f30.el6.noarch qpid-cpp-client-0.14-14.el6_2.x86_64 katello-common-0.2.41-1.git.23.9a2ef30.el6.noarch katello-repos-0.2.4-1.el6.noarch katello-selinux-0.2.5-1.git.0.cc457ee.el6.noarch -- How reproducible: always Steps to Reproduce: 1.just prepare org, env. 2.invoke command in description 3. Actual results: failure Expected results: no failure. the AK with usage limit specified should get prepared. Additional info:
Is this testing build or stable build?
it's (actually was) yesterday's Katello built right from github (not fedorahosted).
[root@zone ~]# kk activation_key create --name test --org ACME_Corporation --environment dev --limit 1 Successfully created activation key [ test ] [root@zone ~]# versions katello-0.2.42-1.git.9.fc18833.el6.noarch katello-cli-0.2.41-1.git.0.6ef074b.el6.noarch katello-agent-1.0.3-1.git.0.cccd0b4.el6.noarch pulp-1.1.10-1.el6.noarch candlepin-0.5.32-1.el6.noarch subscription-manager-0.99.14-1.el6.x86_64 python-rhsm-0.99.8-1.el6.noarch yum-3.2.29-22.el6.noarch Most likely old katello package. katello-0.2.41-1.git.23.9a2ef30.el6.noarch VS katello-0.2.42-1.git.9.fc18833.el6.noarch Can you please try with recent nightly or git?
The next nightly should work Garik, please retest and close if not valid. Thanks.
this particular issue now works, but i have another one: value -1 works and then it allows system to be registered by that key. like: --- Id: 51 Name: test2 Description: None Usage: 1/-1 Environment Id: 85 System Template Id: None --- I think would be better to have a check telling: >0
Yeah -1 means unlimited, I am going to hide this from the CLI. It should be hidden.
qe-acking
https://github.com/Katello/katello/pull/576
# katello -u admin -p admin activation_key create --name test --org "Tupinambá" --environment Mild --limit 1 Successfully created activation key [ test ]
Verified using: * candlepin-0.7.8-1.el6cf.noarch * candlepin-selinux-0.7.8-1.el6cf.noarch * candlepin-tomcat6-0.7.8-1.el6cf.noarch * katello-1.1.12-12.el6cf.noarch * katello-all-1.1.12-12.el6cf.noarch * katello-candlepin-cert-key-pair-1.0-1.noarch * katello-certs-tools-1.1.8-1.el6cf.noarch * katello-cli-1.1.8-6.el6cf.noarch * katello-cli-common-1.1.8-6.el6cf.noarch * katello-common-1.1.12-12.el6cf.noarch * katello-configure-1.1.9-6.el6cf.noarch * katello-glue-candlepin-1.1.12-12.el6cf.noarch * katello-glue-pulp-1.1.12-12.el6cf.noarch * katello-qpid-broker-key-pair-1.0-1.noarch * katello-qpid-client-key-pair-1.0-1.noarch * katello-selinux-1.1.1-1.el6cf.noarch * pulp-1.1.12-1.el6cf.noarch * pulp-common-1.1.12-1.el6cf.noarch * pulp-selinux-server-1.1.12-1.el6cf.noarch
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. http://rhn.redhat.com/errata/RHSA-2012-1543.html