Description of problem: this is a regression since 6.3. `hammer host create` accepts a --environment parameter (which is supposed to be a puppet environment). However, on specifying this, it uses the API endpoint of katello environments, which are lifecycle environments: <pre> # hammer -d -u admin -p changeme --output=csv host create --medium-id="31" --ip="142.89.31.218" --location-id="2" --operatingsystem-id="2" --environment="KT_QrEczI_Library_pTBRPfBmGb_168" --domain-id="18" --partition-table-id="91" --mac="86:fa:fa:27:ef:0a" --organization-id="127" --architecture-id="1" --name="GkhWDIhihR" --puppet-classes="generic_1" --root-password="vERLTilA" ... ... [ INFO 2018-05-29T06:34:03 API] GET /katello/api/organizations/127/environments [DEBUG 2018-05-29T06:34:03 API] Params: { "name" => "KT_QrEczI_Library_pTBRPfBmGb_168" } [DEBUG 2018-05-29T06:34:03 API] Headers: { :params => { "name" => "KT_QrEczI_Library_pTBRPfBmGb_168" } } [DEBUG 2018-05-29T06:34:03 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [DEBUG 2018-05-29T06:34:03 API] Response: { "total" => 0, "subtotal" => 0, </pre> This obviously always fails to create a host if the --environment parameter is specified. the correct endpoint to be queried is: /api/v2/organizations/<id>/environments Version-Release number of selected component (if applicable): 6.4.0-1 How reproducible: always Steps to Reproduce: 1. try to create a host using hammer with specifying an --environment parameter
Isn't this fixed by http://projects.theforeman.org/issues/22517/ could you check packages versions and compare them to the list in linked issue?
I was able to reproduce the issue: the problem is we are using the customized resolver in the hostgroup but not in host command. Will send a fix upstream.
Created redmine issue https://projects.theforeman.org/issues/24060 from this bug
Proposed fix at https://github.com/Katello/hammer-cli-katello/pull/566
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/24060 has been resolved.
Created attachment 1459373 [details] foreman logs when creating host via hammer
*** Bug 1595188 has been marked as a duplicate of this bug. ***
*** Bug 1598569 has been marked as a duplicate of this bug. ***
verified since snap#11. the lce is now properly recognized. verified by automaed tests: 596322f6-9fdc-441a-a36d-ae2f22132b38 26e406ea-56f5-4813-bb93-e908c9015ee3 ...
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2927