Bug 1211613
Summary: | Power action "status" REST API responses from compute resources are not masked to shared values | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Jan Krocil <jkrocil> |
Component: | Power & BMC | Assignee: | Shimon Shtein <sshtein> |
Status: | CLOSED ERRATA | QA Contact: | Kedar Bidarkar <kbidarka> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.8 | CC: | bkearney, cwelton, egolov, ehelms, kbidarka, lzap |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/10183 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 09:31:23 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1341149 | ||
Bug Blocks: |
Description
Jan Krocil
2015-04-14 12:31:35 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. Created redmine issue http://projects.theforeman.org/issues/10183 from this bug Upstream bug component is Power & BMC Upstream bug assigned to sshtein Moving to POST since upstream bug http://projects.theforeman.org/issues/10183 has been closed ------------- Shimon Shtein Applied in changeset commit:1799cee842301e341494748ba4dfd1ecae7589f6. [root@xyz ~]# curl --insecure -X PUT -d '{"power_action": "state"}' -u admin:changeme -H "Content-Type:application/json" -H "Accept:application/json" https://abc.redhat.com/api/v2/hosts/abc1.redhat.com/power { "error": {"message":"ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/hosts#power"} } [root@xyz ~]# curl --insecure -X PUT -d '{"power_action": "status"}' -u admin:changeme -H "Content-Type:application/json" -H "Accept:application/json" https://abc.redhat.com/api/v2/hosts/abc1.redhat.com/power { "error": {"message":"ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/hosts#power"} Currently we face this issue while trying to use the particular API. TESTED with sat62-snap(GA)-13.1 It's a different bug, I have already opened it: https://bugzilla.redhat.com/show_bug.cgi?id=1341149 Tested the below stuff from a vmware sat6 provisioning a HOST on vcenter55 [abc@xyz ~]# curl --insecure -X PUT -d '{"power_action": "status"}' -u admin:changeme -H "Content-Type:application/json" -H "Accept:application/json" https://sat6-server.redhat.com/api/v2/hosts/sat6-client.redhat.com/power {"power":"on"} [abc@xyz ~]# curl --insecure -X PUT -d '{"power_action": "state"}' -u admin:changeme -H "Content-Type:application/json" -H "Accept:application/json" https://sat6-server.redhat.com/api/v2/hosts/sat6-client.redhat.com/power {"power":"on"} Now we need to check the power state from that of a baremetal box. sorry we had to check the power-off status. [abc@xyz ~]# curl --insecure -X PUT -d '{"power_action": "state"}' -u admin:changeme -H "Content-Type:application/json" -H "Accept:application/json" https://sat6-server.redhat.com/api/v2/hosts/sat6-client.redhat.com/power {"power":"off"} [abc@xyz ~]# curl --insecure -X PUT -d '{"power_action": "status"}' -u admin:changeme -H "Content-Type:application/json" -H "Accept:application/json" https://sat6-server.redhat.com/api/v2/hosts/sat6-client.redhat.com/power {"power":"off"} Tested the stuff from a vmware sat6 provisioning a HOST on vcenter55. Now we need to check the power state from that of a baremetal box. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1502 |