Project

General

Profile

Actions

Bug #5844

closed

hammer lifecycle-environment create is not working

Added by Thomas McKay almost 10 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1099655
Description of problem:
When running hammer lifecycle-environment create, the command fails with message:

Could not create environment:
Error: lifecycle_environment not found

Version-Release number of selected component (if applicable):
  • apr-util-ldap-1.3.9-3.el6_0.1.x86_64
  • candlepin-0.9.7-1.el6_5.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.9.7-1.el6_5.noarch
  • candlepin-tomcat6-0.9.7-1.el6_5.noarch
  • elasticsearch-0.90.10-4.el6sat.noarch
  • foreman-1.6.0.8-1.el6sat.noarch
  • foreman-compute-1.6.0.8-1.el6sat.noarch
  • foreman-gce-1.6.0.8-1.el6sat.noarch
  • foreman-libvirt-1.6.0.8-1.el6sat.noarch
  • foreman-ovirt-1.6.0.8-1.el6sat.noarch
  • foreman-postgresql-1.6.0.8-1.el6sat.noarch
  • foreman-proxy-1.6.0.5-1.el6sat.noarch
  • foreman-selinux-1.6.0-2.el6sat.noarch
  • foreman-vmware-1.6.0.8-1.el6sat.noarch
  • katello-1.5.0-24.el6sat.noarch
  • katello-ca-1.0-1.noarch
  • katello-certs-tools-1.5.5-1.el6sat.noarch
  • katello-installer-0.0.40-1.el6sat.noarch
  • openldap-2.4.23-31.el6.x86_64
  • pulp-katello-plugins-0.3-1.el6sat.noarch
  • pulp-nodes-common-2.4.0-0.16.beta.el6sat.noarch
  • pulp-nodes-parent-2.4.0-0.16.beta.el6sat.noarch
  • pulp-puppet-plugins-2.4.0-0.16.beta.el6sat.noarch
  • pulp-puppet-tools-2.4.0-0.16.beta.el6sat.noarch
  • pulp-rpm-plugins-2.4.0-0.16.beta.el6sat.noarch
  • pulp-selinux-2.4.0-0.16.beta.el6sat.noarch
  • pulp-server-2.4.0-0.16.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.1.0-2.el6sat.noarch
  • rubygem-hammer_cli-0.1.0-13.el6sat.noarch
  • rubygem-hammer_cli_foreman-0.1.0-13.el6sat.noarch
  • rubygem-hammer_cli_foreman_tasks-0.0.2-6.el6sat.noarch
  • rubygem-hammer_cli_katello-0.0.3-24.el6sat.noarch

How reproducible:
Aways

Steps to Reproduce:.
1. hammer lifecycle-environment create --prior='Library' --name=<name> --organization-id=1

Actual results:
The lifecycle environment is not created and a error message is presented

Expected results:
Create the lifecycle environment

Additional info:

  1. LANG=en_US hammer -d -v -u admin -p changeme --output csv lifecycle-environment create --prior='Library' --name='r8vst3' --organization-id='32'
    [ INFO 2014-05-20 16:03:26 Init] Initialization of Hammer CLI (0.1.0) has started...
    [DEBUG 2014-05-20 16:03:26 Init] Running at ruby 1.8.7-p352
    [ INFO 2014-05-20 16:03:26 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
    [ INFO 2014-05-20 16:03:26 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
    [ INFO 2014-05-20 16:03:26 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
    [DEBUG 2014-05-20 16:03:27 Connection] Registered: foreman
    [DEBUG 2014-05-20 16:03:27 API] Global headers: {
    :accept => "application/json;version=2",
    :content_type => "application/json",
    "Accept-Language" => "en"
    }
    [ INFO 2014-05-20 16:03:27 API] GET /apidoc/apipie_checksum
    [DEBUG 2014-05-20 16:03:27 API] Params: {}
    [DEBUG 2014-05-20 16:03:27 API] Headers: {
    :accept => "application/json",
    :params => {}
    }
    [DEBUG 2014-05-20 16:03:27 API] Response {
    "checksum" => "897a6c6a349c989cea121a5c81474246"
    }
    [ INFO 2014-05-20 16:03:29 Modules] Extension module hammer_cli_foreman (0.1.0) loaded
    [ INFO 2014-05-20 16:03:29 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
    [ INFO 2014-05-20 16:03:29 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
    [ INFO 2014-05-20 16:03:30 Modules] Extension module hammer_cli_katello (0.0.3) loaded
    [DEBUG 2014-05-20 16:03:30 Init] Using locale 'en'
    [DEBUG 2014-05-20 16:03:30 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/locale'
    [DEBUG 2014-05-20 16:03:30 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/locale'
    [DEBUG 2014-05-20 16:03:30 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.3/locale'
    [ INFO 2014-05-20 16:03:30 HammerCLI::MainCommand] Called with options: {"option_output"=>"csv", "option_debug"=>true, "option_username"=>"admin", "option_verbose"=>true, "option_password"=>"***"}
    [ INFO 2014-05-20 16:03:30 HammerCLIKatello::LifecycleEnvironmentCommand] Called with options: {}
    [ INFO 2014-05-20 16:03:30 HammerCLIKatello::LifecycleEnvironmentCommand::CreateCommand] Called with options: {"option_name"=>"r8vst3", "option_organization_id"=>"32", "option_prior"=>"Library"}
    [ INFO 2014-05-20 16:03:30 API] GET /apidoc/apipie_checksum
    [DEBUG 2014-05-20 16:03:30 API] Params: {}
    [DEBUG 2014-05-20 16:03:30 API] Headers: {
    :accept => "application/json",
    :params => {}
    }
    [DEBUG 2014-05-20 16:03:30 API] Response {
    "checksum" => "897a6c6a349c989cea121a5c81474246"
    }
    [ INFO 2014-05-20 16:03:30 API] GET /katello/api/organizations/32/environments
    [DEBUG 2014-05-20 16:03:30 API] Params: {
    "name" => "Library"
    }
    [DEBUG 2014-05-20 16:03:30 API] Headers: {
    :params => {
    "name" => "Library"
    }
    }
    [DEBUG 2014-05-20 16:03:30 API] Response {
    "page" => 1,
    "subtotal" => 0,
    "search" => nil,
    "results" => [],
    "per_page" => 20,
    "sort" => {
    "order" => nil,
    "by" => nil
    },
    "total" => 0
    }
    [ERROR 2014-05-20 16:03:30 Exception] Error: lifecycle_environment not found
    Could not create environment:
    Error: lifecycle_environment not found
    [ERROR 2014-05-20 16:03:30 Exception]

HammerCLIForeman::ResolverError (lifecycle_environment not found):
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/id_resolver.rb:136:in `pick_result'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/id_resolver.rb:132:in `find_resource'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/id_resolver.rb:110:in `get_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/id_resolver.rb:104:in `lifecycle_environment_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.3/lib/hammer_cli_katello/lifecycle_environment.rb:57:in `request_params'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/command.rb:42:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/commands.rb:112:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/command.rb:33: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.1.0/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.1.0/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.1.0/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.1.0/bin/hammer:100
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19

Actions #1

Updated by Thomas McKay almost 10 years ago

  • Assignee set to Adam Price
  • Triaged set to No
Actions #2

Updated by Og Maciel almost 10 years ago

# LANG=en_US hammer -d -v -u admin -p changeme  --output csv lifecycle-environment create --prior='Library' --name='r8vst3' --organization-id=1
[ INFO 2014-05-22 15:05:09 Init] Initialization of Hammer CLI (0.1.0) has started...
[DEBUG 2014-05-22 15:05:09 Init] Running at ruby 1.8.7-p352
[ INFO 2014-05-22 15:05:09 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2014-05-22 15:05:09 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2014-05-22 15:05:09 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2014-05-22 15:05:09 Connection] Registered: foreman
[DEBUG 2014-05-22 15:05:09 API] Global headers: {
              :accept => "application/json;version=2",
        :content_type => "application/json",
    "Accept-Language" => "en" 
}
[ INFO 2014-05-22 15:05:09 API] GET /apidoc/apipie_checksum
[DEBUG 2014-05-22 15:05:09 API] Params: {}
[DEBUG 2014-05-22 15:05:09 API] Headers: {
    :accept => "application/json",
    :params => {}
}
[DEBUG 2014-05-22 15:05:09 API] Response {
    "checksum" => "438f138558b51a3404c44a8822c94adc" 
}
[ INFO 2014-05-22 15:05:11 Modules] Extension module hammer_cli_foreman (0.1.0) loaded
[ INFO 2014-05-22 15:05:11 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2014-05-22 15:05:11 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2014-05-22 15:05:12 Modules] Extension module hammer_cli_katello (0.0.3) loaded
[DEBUG 2014-05-22 15:05:12 Init] Using locale 'en'
[DEBUG 2014-05-22 15:05:12 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/locale'
[DEBUG 2014-05-22 15:05:12 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/locale'
[DEBUG 2014-05-22 15:05:12 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.3/locale'
[ INFO 2014-05-22 15:05:12 HammerCLI::MainCommand] Called with options: {"option_debug"=>true, "option_output"=>"csv", "option_password"=>"***", "option_verbose"=>true, "option_username"=>"admin"}
[ INFO 2014-05-22 15:05:12 HammerCLIKatello::LifecycleEnvironmentCommand] Called with options: {}
[ INFO 2014-05-22 15:05:12 HammerCLIKatello::LifecycleEnvironmentCommand::CreateCommand] Called with options: {"option_name"=>"r8vst3", "option_prior"=>"Library", "option_organization_id"=>"1"}
[ INFO 2014-05-22 15:05:12 API] GET /apidoc/apipie_checksum
[DEBUG 2014-05-22 15:05:12 API] Params: {}
[DEBUG 2014-05-22 15:05:12 API] Headers: {
    :accept => "application/json",
    :params => {}
}
[DEBUG 2014-05-22 15:05:12 API] Response {
    "checksum" => "438f138558b51a3404c44a8822c94adc" 
}
[ INFO 2014-05-22 15:05:12 API] GET /katello/api/organizations/1/environments
[DEBUG 2014-05-22 15:05:12 API] Params: {
    "name" => "Library" 
}
[DEBUG 2014-05-22 15:05:12 API] Headers: {
    :params => {
        "name" => "Library" 
    }
}
[DEBUG 2014-05-22 15:05:13 API] Response {
    "per_page" => 20,
    "subtotal" => 1,
        "page" => 1,
       "total" => 1,
      "search" => nil,
     "results" => [
        [0] {
              "updated_at" => "2014-05-22T14:48:29Z",
                      "id" => 1,
             "permissions" => {
                              "deletable" => true,
                "promotable_or_removable" => true,
                               "readable" => true,
                               "editable" => true
            },
                 "library" => true,
             "description" => nil,
                   "prior" => nil,
            "organization" => {
                 "name" => "ACME_Corporation",
                "label" => "ACME_Corporation" 
            },
                    "name" => "Library",
              "created_at" => "2014-05-22T14:48:29Z",
                   "label" => "Library" 
        }
    ],
        "sort" => {
        "order" => nil,
           "by" => nil
    }
}
[ INFO 2014-05-22 15:05:13 API] GET /apidoc/apipie_checksum
[DEBUG 2014-05-22 15:05:13 API] Params: {}
[DEBUG 2014-05-22 15:05:13 API] Headers: {
    :accept => "application/json",
    :params => {}
}
[DEBUG 2014-05-22 15:05:13 API] Response {
    "checksum" => "438f138558b51a3404c44a8822c94adc" 
}
[ INFO 2014-05-22 15:05:13 API] POST /katello/api/organizations/1/environments
[DEBUG 2014-05-22 15:05:13 API] Params: {
     "name" => "r8vst3",
    "prior" => 1
}
[DEBUG 2014-05-22 15:05:13 API] Headers: {}
[DEBUG 2014-05-22 15:05:14 API] Response {
      "updated_at" => "2014-05-22T19:05:13Z",
              "id" => 118,
     "permissions" => {
                      "deletable" => true,
        "promotable_or_removable" => true,
                       "readable" => true,
                       "editable" => true
    },
         "library" => false,
     "description" => nil,
           "prior" => {
          "id" => 1,
        "name" => "Library" 
    },
    "organization" => {
         "name" => "ACME_Corporation",
        "label" => "ACME_Corporation" 
    },
            "name" => "r8vst3",
      "created_at" => "2014-05-22T19:05:13Z",
           "label" => "r8vst3" 
}
Message,Id,Name
Environment created,118,r8vst3
[root@qetello02 ~]# hammer lifecycle-environment info --id 118
ID:                          118
Name:                        r8vst3
Label:                       r8vst3
Description:
Organization:                ACME_Corporation
Library:                     false
Prior Lifecycle Environment: id1nameLibrary
Actions #3

Updated by Og Maciel almost 10 years ago

  • Status changed from New to Resolved

I'm marking this as closed as per my previous comment.

Environment:

  • apr-util-ldap-1.3.9-3.el6_0.1.x86_64
  • candlepin-0.9.7-1.el6_5.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.9.7-1.el6_5.noarch
  • candlepin-tomcat6-0.9.7-1.el6_5.noarch
  • elasticsearch-0.90.10-4.el6sat.noarch
  • foreman-1.6.0.9-1.el6sat.noarch
  • foreman-compute-1.6.0.9-1.el6sat.noarch
  • foreman-gce-1.6.0.9-1.el6sat.noarch
  • foreman-libvirt-1.6.0.9-1.el6sat.noarch
  • foreman-ovirt-1.6.0.9-1.el6sat.noarch
  • foreman-postgresql-1.6.0.9-1.el6sat.noarch
  • foreman-proxy-1.6.0.6-1.el6sat.noarch
  • foreman-selinux-1.6.0-2.el6sat.noarch
  • foreman-vmware-1.6.0.9-1.el6sat.noarch
  • katello-1.5.0-24.el6sat.noarch
  • katello-ca-1.0-1.noarch
  • katello-certs-tools-1.5.5-1.el6sat.noarch
  • katello-installer-0.0.41-1.el6sat.noarch
  • openldap-2.4.23-31.el6.x86_64
  • pulp-katello-plugins-0.3-1.el6sat.noarch
  • pulp-nodes-common-2.4.0-0.18.beta.el6sat.noarch
  • pulp-nodes-parent-2.4.0-0.18.beta.el6sat.noarch
  • pulp-puppet-plugins-2.4.0-0.18.beta.el6sat.noarch
  • pulp-puppet-tools-2.4.0-0.18.beta.el6sat.noarch
  • pulp-rpm-plugins-2.4.0-0.18.beta.el6sat.noarch
  • pulp-selinux-2.4.0-0.18.beta.el6sat.noarch
  • pulp-server-2.4.0-0.18.beta.el6sat.noarch
  • python-ldap-2.3.10-1.el6.x86_64
  • ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
  • ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch
  • rubygem-hammer_cli-0.1.0-13.el6sat.noarch
  • rubygem-hammer_cli_foreman-0.1.0-13.el6sat.noarch
  • rubygem-hammer_cli_foreman_tasks-0.0.2-6.el6sat.noarch
  • rubygem-hammer_cli_katello-0.0.3-24.el6sat.noarch
Actions #4

Updated by Eric Helms almost 10 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions

Also available in: Atom PDF