Bug #15647
closedHammer hostgroup create insist on lifecycle environment
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).
Updated by Andrew Kofink over 8 years ago
- Related to Bug #14686: hammer hostgroup update or create command fails when using --organization-ids option fails added
Updated by Andrew Kofink over 8 years ago
- Related to Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#index added
Updated by Andrew Kofink over 8 years ago
- Related to deleted (Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#index)
Updated by Andrew Kofink over 8 years ago
- Blocked by Bug #15672: Do not require organization_id when searching in content_views#index and katello/environments#index added
Updated by The Foreman Bot over 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
Updated by Andrew Kofink over 8 years ago
- Related to Bug #15701: Allow Foreman objects to resolve using `create_search_options_creators_without_katello_api` added
Updated by Andrew Kofink over 8 years ago
- Pull request deleted (
https://github.com/Katello/hammer-cli-katello/pull/419)
Updated by Justin Sherrill over 8 years ago
- Status changed from Ready For Testing to Rejected
- Translation missing: en.field_release set to 166
This seems to be fixed