Skip to content

Conversation

hiroshi-ikuta
Copy link
Contributor

Bug #38498 mentions 3 power operation bugs in Redfish provider. This PR fixes wrong implementation of Cycle power operatoin: When user pushes Cycle button, Redfish provider does ForceRestart instead of PowerCycle.

Modifications in this PR

Fix incorrect "Cycle" power operation implementation in Redfish provider

The powercycle method defined in modules/bmc/redfish.rb of smart-proxy does 'ForceRestart' instead of 'PowerCycle'. This PR makes powercycle method does 'PowerCycle'.

@stejskalleos stejskalleos self-assigned this Sep 11, 2025
@hiroshi-ikuta hiroshi-ikuta force-pushed the feature/redfish_powercycle branch from 16898b1 to 28c05bf Compare September 12, 2025 01:21
Copy link
Contributor

@stejskalleos stejskalleos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏 Tested with Redfish-Mockup-Server, and it seems to be working.

curl --user admin:changeme -X PUT -H "Content-Type: application/json" -d '{}' "http://localhost:8080/bmc/localhost:8000/chassis/power/cycle"

Red fish server log:

   POST: Content: type=application/json and params={}
   POST: Data: {'ResetType': 'PowerCycle'}
127.0.0.1 - - [12/Sep/2025 09:01:03] "POST /redfish/v1/Systems/BladeServer-1/Actions/ComputerSystem.Reset HTTP/1.1" 204 -

A few comments regarding unused code, otherwise LGTM.

Bug #38498 mentions 3 power operation bugs in Redfish provider.
This PR fixes wrong implementation of Cycle power operatoin:
When user pushes Cycle button, Redfish provider does ForceRestart
instead of PowerCycle.

This PR makes powercycle method does 'PowerCycle'.

Co-Authored-By: Vanou Ishii <[email protected]>, Yusuke Hirota
<[email protected]>
Copy link
Contributor

@stejskalleos stejskalleos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏 LGTM

Works as expected

@stejskalleos stejskalleos merged commit 200f394 into theforeman:develop Sep 16, 2025
10 of 11 checks passed
@stejskalleos
Copy link
Contributor

Thank you, @hiroshi-ikuta and @vanou, for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants