Project

General

Profile

Bug #15647

Hammer hostgroup create insist on lifecycle environment

Added by Andrew Kofink over 2 years ago. Updated 9 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
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

Related to Foreman - Bug #14686: hammer hostgroup update or create command fails when using --organization-ids option failsClosed2016-04-18
Related to Katello - Bug #15701: Allow Foreman objects to resolve using `create_search_options_creators_without_katello_api`Closed2016-07-15
Blocked by Katello - Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#indexClosed2016-07-12

History

#1 Updated by Andrew Kofink over 2 years ago

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

#2 Updated by Andrew Kofink over 2 years ago

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

#3 Updated by Andrew Kofink over 2 years ago

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

#4 Updated by Andrew Kofink over 2 years ago

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

#5 Updated by The Foreman Bot over 2 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

#6 Updated by Andrew Kofink over 2 years ago

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

#7 Updated by Andrew Kofink over 2 years ago

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

#8 Updated by Justin Sherrill over 2 years ago

  • Status changed from Ready For Testing to Rejected
  • Legacy Backlogs Release (now unused) set to 166

This seems to be fixed

Also available in: Atom PDF