Project

General

Profile

Bug #10183

Power action "status" REST API responses from compute resources are not masked to shared values

Added by Bryan Kearney almost 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
BMC
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1211613
Description of problem:
Response to "power_action": "state" request towards a baremetal host {"power":"off"}
Response to "power_action": "state" request towards a vmware VM host: {"power":"poweredOff"}
^ this is in case the hosts are turned off

I'm not sure if this difference between responses happens with other power_action types as well - this requires further investigation.

Version-Release number of selected component (if applicable):
Upstream foreman 1.7.4-1
(+ most probably downstream satellite 6.0.8)

How reproducible:
Always

Steps to Reproduce:
1. Setup a vmware vsphere compute resource (v5.5 in my case)
2. Provision a VM-based host on that compute resource
3. Provision a baremetal host
4. Run the following request against both hosts to see the difference:
  1. curl --insecure -X PUT -d '{"power_action": "state"}' -u admin -H "Content-Type:application/json" -H "Accept:application/json" https://my-foreman.domain.com/api/v2/hosts/my-host.domain.com/power

Actual results: {"power":"poweredOff"} for VMs, {"power":"off"} for baremetal
or {"power":"poweredOn"} for VMs, {"power":"on"} for baremetal
etc...

Expected results:
Shared, single type of values for all host types.

Additional info:

Associated revisions

Revision 1799cee8 (diff)
Added by Shimon Shtein almost 5 years ago

Fixes #10183 - Added a default results transformation for status action

History

#1 Updated by Bryan Kearney almost 6 years ago

  • Category set to BMC

#2 Updated by Shimon Shtein almost 5 years ago

  • Assignee set to Shimon Shtein

#3 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3275 added

#4 Updated by Shimon Shtein almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF