Project

General

Profile

Actions

Bug #36167

open

Hammer update wipes out environment

Added by Antonin Dvorak almost 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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

end_config.png View end_config.png 17.2 KB Antonin Dvorak, 04/12/2023 07:43 AM
end_hostgroup.png View end_hostgroup.png 23.7 KB Antonin Dvorak, 04/12/2023 07:43 AM
start_config.png View start_config.png 18.8 KB Antonin Dvorak, 04/12/2023 07:43 AM
start_hostgroup.png View start_hostgroup.png 16.2 KB Antonin Dvorak, 04/12/2023 07:43 AM
Actions

Also available in: Atom PDF