Project

General

Profile

Actions

Bug #26926

closed

hammer cli wipes host parameters when build is toggled (UI or API does not)

Added by Will Foster over 4 years ago. Updated over 4 years ago.

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

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

26926_hammer_cli_debug.txt 26926_hammer_cli_debug.txt 14.5 KB hammer cli debug Will Foster, 05/31/2019 03:29 PM
26926_hammer_api_curl_build.txt 26926_hammer_api_curl_build.txt 4.97 KB output by toggling build status via curl/API Will Foster, 05/31/2019 03:52 PM

Related issues 1 (0 open1 closed)

Is duplicate of Hammer CLI - Bug #20725: 'hammer host update' removes existing host parametersClosedRahul BajajActions
Actions #1

Updated by Will Foster over 4 years ago

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).

Actions #2

Updated by Will Foster over 4 years ago

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" => [],

Actions #3

Updated by Will Foster over 4 years ago

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
Actions #4

Updated by Will Foster over 4 years ago

  • 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)
Actions #5

Updated by Martin Bacovsky over 4 years ago

  • Is duplicate of Bug #20725: 'hammer host update' removes existing host parameters added
Actions #6

Updated by Martin Bacovsky over 4 years ago

  • 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.

Actions

Also available in: Atom PDF