Red Hat Bugzilla – Bug 1079567
Creating EC2 compute resource via CLI expects URL but documentation says to use REGION
Last modified: 2016-07-27 04:40:44 EDT
Description of problem: The inline documentation for creating an EC2 compute resource via CLI claims that a URL is a requirement for Libvirt, Ovirt and Openstack but it does not mention EC2. Based on this, REGION should be the argument for EC2 but running the CLI fails **unless** you pass URL [root@qetello02 ~]# LANG=en_US hammer -v -u admin -p changeme --output csv compute-resource create --help Message "Usage: hammer compute-resource create [OPTIONS] Options: --description DESCRIPTION --name NAME --password PASSWORD Password for Ovirt, EC2, Vmware, Openstack. Secret key for EC2 --provider PROVIDER Providers include EC2, Openstack, Rackspace --region REGION for EC2 only --server SERVER for Vmware --tenant TENANT for Openstack only --url URL URL for Libvirt, Ovirt, and Openstack --user USER Username for Ovirt, EC2, Vmware, Openstack. Access Key for EC2. --uuid UUID for Ovirt, Vmware Datacenter -h, --help print help " [root@qetello02 ~]# LANG=en_US hammer -v -u admin -p changeme --output csv compute-resource create --name='xpwv1w6f' --provider='EC2' --region='eu-west-1' --user='user@example.com' --password='secret' [ERROR 2014-03-21 16:08:53 Exception] Error: option '--url' is required See: 'hammer compute-resource create --help' Could not create the compute resource: Error: option '--url' is required See: 'hammer compute-resource create --help' [ERROR 2014-03-21 16:08:53 Exception] Clamp::UsageError (option '--url' is required): /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:53:in `parse_options' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:45:in `each' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:45:in `parse_options' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:52:in `parse' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:30:in `parse' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:66:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/bin/hammer:87 /usr/bin/hammer:19:in `load' /usr/bin/hammer:19 [root@qetello02 ~]# LANG=en_US hammer -v -u admin -p changeme --output csv compute-resource create --name='xpwv1w6f' --provider='EC2' --url='eu-west-1' --user='user@example.com' --password='secret' Version-Release number of selected component (if applicable): * apr-util-ldap-1.3.9-3.el6_0.1.x86_64 * candlepin-0.8.25-1.el6sam.noarch * candlepin-scl-1-5.el6_4.noarch * candlepin-scl-quartz-2.1.5-5.el6_4.noarch * candlepin-scl-rhino-1.7R3-1.el6_4.noarch * candlepin-scl-runtime-1-5.el6_4.noarch * candlepin-selinux-0.8.25-1.el6sam.noarch * candlepin-tomcat6-0.8.25-1.el6sam.noarch * elasticsearch-0.90.10-4.el6sat.noarch * foreman-1.5.0.10-1.el6sat.noarch * foreman-compute-1.5.0.10-1.el6sat.noarch * foreman-libvirt-1.5.0.10-1.el6sat.noarch * foreman-postgresql-1.5.0.10-1.el6sat.noarch * foreman-proxy-1.5.3-1.el6sat.noarch * foreman-selinux-1.5.0-0.develop.el6sat.noarch * katello-1.5.0-18.el6sat.noarch * katello-apache-1.0-1.noarch * katello-ca-1.0-1.noarch * katello-certs-tools-1.5.5-1.el6sat.noarch * katello-installer-0.0.30-1.el6sat.noarch * openldap-2.4.23-31.el6.x86_64 * pulp-katello-plugins-0.2-1.el6sat.noarch * pulp-nodes-common-2.3.1-0.4.beta.el6sat.noarch * pulp-nodes-parent-2.3.1-0.4.beta.el6sat.noarch * pulp-puppet-plugins-2.3.1-0.4.beta.el6sat.noarch * pulp-rpm-plugins-2.3.1-0.4.beta.el6sat.noarch * pulp-selinux-2.3.1-0.4.beta.el6sat.noarch * pulp-server-2.3.1-0.4.beta.el6sat.noarch * python-ldap-2.3.10-1.el6.x86_64 * ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch * ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch * ruby193-rubygem-runcible-1.0.8-1.el6sat.noarch How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
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.
Created redmine issue http://projects.theforeman.org/issues/5812 from this bug
Moving to POST since upstream bug http://projects.theforeman.org/issues/5812 has been closed ------------- Tom Caspy Applied in changeset commit:06c8a10ebcfe2bf2e61fa4a047d1002abe90cbbf.
Upstream bug assigned to tcaspy@redhat.com
*** This bug is failing in upstream **** ]# rpm -qa | grep foreman foreman-proxy-1.11.0-0.develop.201510201341git00875b3.el7.noarch foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch foreman-debug-1.11.0-0.develop.201510271601git4e08a71.el7.noarch foreman-compute-1.11.0-0.develop.201510271601git4e08a71.el7.noarch foreman-release-scl-1-1.el7.x86_64 foreman-gce-1.11.0-0.develop.201510271601git4e08a71.el7.noarch tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch hp-z600-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch hp-z600-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch tfm-rubygem-foreman_discovery-4.1.2-1.fm1_11.el7.noarch foreman-vmware-1.11.0-0.develop.201510271601git4e08a71.el7.noarch tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch hp-z600-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch foreman-ovirt-1.11.0-0.develop.201510271601git4e08a71.el7.noarch foreman-1.11.0-0.develop.201510271601git4e08a71.el7.noarch tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch foreman-release-1.11.0-0.develop.201510271601git4e08a71.el7.noarch foreman-libvirt-1.11.0-0.develop.201510271601git4e08a71.el7.noarch foreman-postgresql-1.11.0-0.develop.201510271601git4e08a71.el7.noarch tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510201150gitab068d9.el7.noarch tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch steps: # hammer -u admin -p changeme --output csv compute-resource create --help Message "Usage: hammer compute-resource create [OPTIONS] Options: --description DESCRIPTION --location-ids LOCATION_IDS REPLACE locations with given ids Comma separated list of values. --locations LOCATION_NAMES Comma separated list of values. --name NAME --organization-ids ORGANIZATION_IDS REPLACE organizations with given ids. Comma separated list of values. --organizations ORGANIZATION_NAMES Comma separated list of values. --password PASSWORD Password for oVirt, EC2, VMware, OpenStack. Secret key for EC2 --provider PROVIDER Providers include Libvirt, Ovirt, Vmware, Openstack, Rackspace, GCE --region REGION for EC2 only --server SERVER for VMware --set-console-password SET_CONSOLE_PASSWORD for Libvirt and VMware only One of true/false, yes/no, 1/0. --tenant TENANT for OpenStack only --url URL URL for Libvirt, oVirt, and OpenStack --user USER Username for oVirt, EC2, VMware, OpenStack. Access Key for EC2. --uuid UUID for oVirt, VMware Datacenter -h, --help print help " # hammer -v -u admin -p changeme --output csv compute-resource create --name='xpwv1w6f' --provider='EC2' --region='eu-west-1' [ERROR 2015-10-29 07:31:13 Exception] Error: Options --name, --url, --provider are required See: 'hammer compute-resource create --help' Could not create the compute resource: Error: Options --name, --url, --provider are required See: 'hammer compute-resource create --help' [ERROR 2015-10-29 07:31:13 Exception] Clamp::UsageError (Options --name, --url, --provider are required): /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:35:in `rescue in parse' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:31:in `parse' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:67:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/bin/hammer:125:in `<top (required)>' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `<main>'
Upstream bug component is API
We still see the same issue. IT also expects --url, but descriptions doesn't seem to say so. hammer -v -u admin -p changeme compute-resource create --name='xpwv1w6f' --provider=EC2 --region='us-east-1' --user=<access key EC2> --password='Secret Key Ec2'[ERROR 2016-04-22 07:12:22 Exception] Error: Options --name, --url, --provider are required See: 'hammer compute-resource create --help' Could not create the compute resource: Error: Options --name, --url, --provider are required See: 'hammer compute-resource create --help' [ERROR 2016-04-22 07:12:22 Exception] Clamp::UsageError (Options --name, --url, --provider are required): /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:34:in `rescue in parse' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:30:in `parse' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:67:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/bin/hammer:125:in `<top (required)>' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `<main>'
TESTED with sat62-snap9.0
Moving to GA
Moving to POST since upstream bug http://projects.theforeman.org/issues/5812 has been closed
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:1500