Actions
Bug #36167
openHammer update wipes out environment
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Description:
When I update hostgroup-title, environment gets wiped out. Without modifying the hostgroup-title the update behaves as expected.
How reproducible:
Consistently
Steps to Reproduce:
hammer host update --name hostXX.domainYY --build yes --operatingsystem "RHEL 8.7" --medium "RHEL Generic" --hostgroup-title "aaa/bbb/ccc"
Actual results:
Broken host update:
hammer host update --name hostXX.domainYY --build yes --operatingsystem "RHEL 8.7" --medium "RHEL Generic" --hostgroup-title "aaa/bbb/ccc"
Logs from foreman/production.log:
2023-03-06T13:39:26 [I|app|d3745c08] Parameters: {"host"=>{"name"=>"hostXX.domainYY", "operatingsystem_id"=>18, "medium_id"=>13, "hostgroup_id"=>108, "build"=>true, "puppet_attributes"=>{}}, "apiv"=>"v2", "id"=>"373"}
Working host update:
hammer host update --name hostXX.domainYY --build yes --operatingsystem "RHEL 8.7" --medium "RHEL Generic" --hostgroup-title "aaa/bbb/ccc" --environment cc8_tst
Logs from foreman/production.log:
2023-03-06T15:50:41 [I|app|91ca3168] Parameters: {"host"=>{"name"=>"hostXX.domainYY", "operatingsystem_id"=>18, "medium_id"=>13, "hostgroup_id"=>108, "build"=>true, "environment_id"=>1, "puppet_attributes"=>{"environment_id"=>1}}, "apiv"=>"v2", "id"=>"373"}
Expected result:
Change of hostgroup should not change environment
Additional info:
RHEL 8.6
Foreman 3.5.1
rubygem-hammer_cli 3.5.0
foreman_puppet 5.0.0
Files
Actions