Project

General

Profile

Actions

Bug #22517

closed

Can't create a hostgroup, organization error

Added by Stephen Benjamin about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer
Target version:
Fixed in Releases:
Found in Releases:

Description

Here's what I have installed:

tfm-rubygem-hammer_cli_foreman_docker-0.0.4-3.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.12.pre.develop-2.201802011401git170e7d8.el7.noarch
tfm-rubygem-hammer_cli_katello-0.11.0-1.201802051800git8a9f851.el7.noarch
tfm-rubygem-hammer_cli-0.12.pre.develop-2.201802011449gitd5dff2d.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.12-2.fm1_17.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-6.el7.noarch

Trying to create a host group I get an error:

[root@centos7-provision-koji ~]# hammer -u admin -p changeme -d -vvvv hostgroup create --name 'Forklift Base' --architecture x86_64 --domain zpm.example.com --environment production --puppet-ca-proxy-id 1 --puppet-proxy-id 1 --subnet '192.168.73.0/24' --root-pass changeme --organization-ids 1
[ INFO 2018-02-06T16:06:41 Init] Initialization of Hammer CLI (0.12.pre.develop) has started...
[DEBUG 2018-02-06T16:06:41 Init] Running at ruby 2.4.0-p0
[ INFO 2018-02-06T16:06:41 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2018-02-06T16:06:41 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2018-02-06T16:06:41 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2018-02-06T16:06:41 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_docker.yml has been loaded
[ INFO 2018-02-06T16:06:41 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2018-02-06T16:06:41 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[ INFO 2018-02-06T16:06:41 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2018-02-06T16:06:41 SSLoptions] SSL options: {
    :ssl_ca_file => "/etc/pki/katello/certs/katello-server-ca.crt",
     :verify_ssl => true
}
[DEBUG 2018-02-06T16:06:41 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en" 
}
[DEBUG 2018-02-06T16:06:41 API] Follow redirects: never
[DEBUG 2018-02-06T16:06:41 Connection] Registered: foreman
[ INFO 2018-02-06T16:06:41 Modules] Extension module hammer_cli_foreman (0.12.pre.develop) loaded.
[ INFO 2018-02-06T16:06:41 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.3) loaded.
[ INFO 2018-02-06T16:06:41 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2018-02-06T16:06:41 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2018-02-06T16:06:41 Modules] Extension module hammer_cli_katello (0.11.0) loaded.
[DEBUG 2018-02-06T16:06:41 Init] Using locale 'en'
[DEBUG 2018-02-06T16:06:41 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/locale'
[DEBUG 2018-02-06T16:06:41 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.12.pre.develop/locale'
[DEBUG 2018-02-06T16:06:41 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_docker-0.0.4/locale'
[DEBUG 2018-02-06T16:06:41 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.11.0/locale'
[ INFO 2018-02-06T16:06:41 HammerCLI::MainCommand] Called with options: {"option_verbose"=>true, "option_debug"=>true, "option_username"=>"admin", "option_password"=>"***"}
[ INFO 2018-02-06T16:06:41 HammerCLIForeman::Hostgroup] Called with options: {}
[ INFO 2018-02-06T16:06:41 HammerCLIForeman::Hostgroup::CreateCommand] Error occured while searching for environment
[DEBUG 2018-02-06T16:06:41 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_general_exception
[ERROR 2018-02-06T16:06:41 Exception] Error: Could not find organization, please set one of options --organizations, --organization-titles, --organization-ids.
Could not create the hostgroup:
  Error: Could not find organization, please set one of options --organizations, --organization-titles, --organization-ids.
[ERROR 2018-02-06T16:06:41 Exception] 

HammerCLIForeman::MissingSearchOptions (Could not find organization, please set one of options --organizations, --organization-titles, --organization-ids.):
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.12.pre.develop/lib/hammer_cli_foreman/option_sources/id_params.rb:33:in `rescue in get_options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.12.pre.develop/lib/hammer_cli_foreman/option_sources/id_params.rb:11:in `get_options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/options/option_collector.rb:13:in `block in all_options_raw'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/options/option_collector.rb:12:in `each'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/options/option_collector.rb:12:in `inject'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/options/option_collector.rb:12:in `all_options_raw'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/options/option_collector.rb:18:in `all_options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/options/option_collector.rb:22:in `options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/abstract.rb:239:in `options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/abstract.rb:42:in `parse'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:62:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.pre.develop/bin/hammer:142:in `<top (required)>'
    /bin/hammer:22:in `load'
    /bin/hammer:22:in `<main>'

Related issues 1 (0 open1 closed)

Related to Katello - Bug #24060: hammer host create using wrong API endpoint to list environmentsClosedIvan Necas06/25/2018Actions
Actions

Also available in: Atom PDF