Project

General

Profile

Actions

Bug #15647

closed

Hammer hostgroup create insist on lifecycle environment

Added by Andrew Kofink almost 8 years ago. Updated almost 6 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1354462
REGRESSION (was working in pre-15 drops)

BLOCKER (unable to create hostgroup via CLI -> no provisioning)

Some recent change broke hammer cli command:

[root@hp-bl465cg7-01 ~]# hh hostgroup create --name "CentOS 7.0" --architecture x86_64 --domain nested.lan --subnet nested.lan --operatingsystem "CentOS 7.0" --medium mirror_centos --partition-table "Kickstart simple" --puppet-proxy-id 1 --puppet-ca-proxy-id 1 --environment production --root-pass "$PASS$PASS$PASS" --organizations "$ORG" --locations "$LOC"
Could not create the hostgroup:
Error: lifecycle_environment not found

This was previously working. Now, the problem is it does not respect lifecycle-environment option which was added:

[root@hp-bl465cg7-01 ~]# hh hostgroup create --name "CentOS 7.0" --architecture x86_64 --domain nested.lan --subnet nested.lan --operatingsystem "CentOS 7.0" --medium mirror_centos --partition-table "Kickstart simple" --puppet-proxy-id 1 --puppet-ca-proxy-id 1 --environment production --root-pass "$PASS$PASS$PASS" --organizations "$ORG" --locations "$LOC" --lifecycle-environment "TestEnv"
Could not create the hostgroup:
Error: lifecycle_environment not found

You can't provide even numeric ID - all is ignored. Debug mode reveals that due to typo in the codebase perhaps, the CLI tries to search Katello environments via --environment (puppet) option:

[ INFO 2016-07-11 07:34:01 API] GET /katello/api/organizations/1/environments
[DEBUG 2016-07-11 07:34:01 API] Params: {
"name" => "production"
}
[DEBUG 2016-07-11 07:34:01 API] Headers: {
:params => {
"name" => "production"
}
}
[DEBUG 2016-07-11 07:34:01 API] Response: {
"total" => 0,
"subtotal" => 0,
"page" => 1,
"per_page" => 20,
"error" => nil,
"search" => nil,
"sort" => {
"by" => nil,
"order" => nil
},
"results" => []
}

The query is "production" while I expect it to be "TestEnv".

This bug is unfortunate as it blocks automated CLI installation and setup of provisioning. Hostgroup is a must in provisioning setups (for activation key).


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #14686: hammer hostgroup update or create command fails when using --organization-ids option failsClosedAndrew Kofink04/18/2016Actions
Related to Katello - Bug #15701: Allow Foreman objects to resolve using `create_search_options_creators_without_katello_api`ClosedAndrew Kofink07/15/2016Actions
Blocked by Katello - Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#indexClosedAndrew Kofink07/12/2016Actions
Actions #1

Updated by Andrew Kofink almost 8 years ago

  • Related to Bug #14686: hammer hostgroup update or create command fails when using --organization-ids option fails added
Actions #2

Updated by Andrew Kofink almost 8 years ago

  • Related to Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#index added
Actions #3

Updated by Andrew Kofink almost 8 years ago

  • Related to deleted (Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#index)
Actions #4

Updated by Andrew Kofink almost 8 years ago

  • Blocked by Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#index added
Actions #5

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Andrew Kofink
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/419 added
Actions #6

Updated by Andrew Kofink almost 8 years ago

  • Related to Bug #15701: Allow Foreman objects to resolve using `create_search_options_creators_without_katello_api` added
Actions #7

Updated by Andrew Kofink almost 8 years ago

  • Pull request deleted (https://github.com/Katello/hammer-cli-katello/pull/419)
Actions #8

Updated by Justin Sherrill over 7 years ago

  • Status changed from Ready For Testing to Rejected
  • translation missing: en.field_release set to 166

This seems to be fixed

Actions

Also available in: Atom PDF