Bug #26926
closed
hammer cli wipes host parameters when build is toggled (UI or API does not)
Added by Will Foster over 5 years ago.
Updated over 5 years ago.
Description
Hello,
We're noticing that on Foreman 1.19.1 using hammer cli to toggle build status will wipe previously made host parameters. Doing the same thing via the UI does not do this.
We make heavy use of host params in our automation so this is painful for us. I couldn't find anything around this so filing this here. It seems that the behavior should work the same in both UI and hammer cli (host params should not be touched if build status toggled).
Below I've made some videos displaying this behavior
(host params left intact via marking host for build with UI)
https://www.youtube.com/watch?v=Q2C4NehcC1U
(using hammer cli and marking for build wipes host params)
https://www.youtube.com/watch?v=xkMWgmUcUzo&feature=youtu.be
Files
hammer cli debug output attached.
We are also testing that using a direct API call against apiv2 has this behavior or not (as we call the build flag this way in other places).
Will Foster wrote:
hammer cli debug output attached.
We are also testing that using a direct API call against apiv2 has this behavior or not (as we call the build flag this way in other places).
From the hammer debug we have the host parameter broken_state: true for this host however it seems to pickup host params as "parameters" => [],
Further testing, toggling the build status via the Foreman APIv2 / curl it retains the host params.
curl -vvv -X PUT -s -k -u admin:XXXXXXXXXXXX -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "host" : { "build" : "true" } }' https://`hostname`/api/v2/hosts/480
- Subject changed from hammer cli wipes host parameters when build is toggled (UI does not) to hammer cli wipes host parameters when build is toggled (UI or API does not)
- Is duplicate of Bug #20725: 'hammer host update' removes existing host parameters added
- Project changed from Foreman to Hammer CLI
- Category set to Hosts
- Status changed from New to Closed
- Fixed in Releases hammer-cli-foreman-0.15.0 added
- Found in Releases hammer-cli-foreman-0.14.0 added
- Found in Releases deleted (
1.19.1)
Thanks for the detailed report! It helped to see this is duplicate of the original bug fixed in Foreman 1.20 an later.
It is unlikely to get backported to 1.19 so I'm closing the issue as duplicate.
Also available in: Atom
PDF