Project

General

Profile

Bug #5876

Lifecycle environments and puppet environments conflict in id resolution

Added by Tomáš Strachota about 5 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Katello commands resolve parameters --environment as if they were puppet environments.
Resolver matches the parameter name with the resource from foreman.
To make it working correctly we could either rename all parameters to --lifecycle-environment or tweak katello's id resolver to always use lifecycle environment when it is asked for environment id.

hammer content-host list --environment Library --organization ACME_Corporation

See the second api search call:

[ INFO 2014-05-22 11:48:35 Init] Initialization of Hammer CLI (0.1.0) has started...
[DEBUG 2014-05-22 11:48:35 Init] Running at ruby 1.9.3-p545
[ INFO 2014-05-22 11:48:35 Init] Configuration from the file /root/.hammer/cli_config.yml has been loaded
[ INFO 2014-05-22 11:48:35 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2014-05-22 11:48:35 Init] Configuration from the file /root/.hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2014-05-22 11:48:36 Connection] Registered: foreman
[ INFO 2014-05-22 11:48:36 API] GET /apidoc/apipie_checksum
[DEBUG 2014-05-22 11:48:36 API] Params: {}
[DEBUG 2014-05-22 11:48:36 API] Response {
    "checksum" => "1de6c5f9486c4c38037f0bbaf48e04db" 
}
[ INFO 2014-05-22 11:48:37 Modules] Extension module hammer_cli_foreman (0.1.0) loaded
[ INFO 2014-05-22 11:48:37 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2014-05-22 11:48:37 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2014-05-22 11:48:38 Modules] Extension module hammer_cli_katello (0.0.3) loaded
[DEBUG 2014-05-22 11:48:38 Init] Using locale 'en'
[DEBUG 2014-05-22 11:48:38 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/root/hammer/hammer-cli/locale'
[DEBUG 2014-05-22 11:48:38 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/root/hammer/hammer-cli-foreman/locale'
[DEBUG 2014-05-22 11:48:38 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/root/hammer/hammer-cli-katello/locale'
[ INFO 2014-05-22 11:48:38 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[ INFO 2014-05-22 11:48:38 HammerCLIKatello::ContentHostCommand] Called with options: {}
[ INFO 2014-05-22 11:48:38 HammerCLIKatello::ContentHostCommand::ListCommand] Called with options: {"option_organization_name"=>"ACME_Corporation", "option_environment_name"=>"Library"}
[ INFO 2014-05-22 11:48:38 API] GET /apidoc/apipie_checksum
[DEBUG 2014-05-22 11:48:38 API] Params: {}
[DEBUG 2014-05-22 11:48:38 API] Response {
    "checksum" => "1de6c5f9486c4c38037f0bbaf48e04db" 
}
[ INFO 2014-05-22 11:48:38 API] GET /katello/api/organizations
[DEBUG 2014-05-22 11:48:38 API] Params: {
    :search => "name = \"ACME_Corporation\"" 
}
[DEBUG 2014-05-22 11:48:39 API] Response {
       "total" => 15,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 20,
      "search" => "name = \"ACME_Corporation\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
                     "id" => 1,
                   "name" => "ACME_Corporation",
                  "title" => "ACME_Corporation",
                  "label" => "ACME_Corporation",
            "description" => "ACME_Corporation Organization",
             "created_at" => "2014-03-12T09:46:36Z",
             "updated_at" => "2014-05-20T07:53:28Z" 
        }
    ]
}
[ INFO 2014-05-22 11:48:39 API] GET /apidoc/apipie_checksum
[DEBUG 2014-05-22 11:48:39 API] Params: {}
[DEBUG 2014-05-22 11:48:39 API] Response {
    "checksum" => "1de6c5f9486c4c38037f0bbaf48e04db" 
}
[ INFO 2014-05-22 11:48:39 API] GET /api/environments
[DEBUG 2014-05-22 11:48:39 API] Params: {
    "name" => "Library" 
}
[DEBUG 2014-05-22 11:48:39 API] Response {
       "total" => 0,
    "subtotal" => 0,
        "page" => 1,
    "per_page" => 20,
      "search" => nil,
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
    ]
}
[ERROR 2014-05-22 11:48:39 Exception] Error: environment not found
Error: environment not found

History

#1 Updated by dustin tsang about 5 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1097858

#2 Updated by dustin tsang about 5 years ago

  • Bugzilla link deleted (https://bugzilla.redhat.com/show_bug.cgi?id=1097858 )

#3 Updated by Eric Helms about 5 years ago

  • Target version set to 45
  • Triaged changed from No to Yes

#4 Updated by Eric Helms about 5 years ago

  • Target version changed from 45 to 48

#5 Updated by Eric Helms about 5 years ago

  • Target version deleted (48)

#6 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 114

Also available in: Atom PDF