Skip to content

Conversation

vanou
Copy link
Contributor

@vanou vanou commented Jun 13, 2025

Bug #3073 is caused by 3 things:

  1. Foreman core doesn't call BMC proxy's API correctly
    • Changing power state to 'Reboot' via Web GUI calls BMC proxy's 'soft' power action
    • Changing power state to 'Reset' via Web GUI calls BMC proxy's 'cycle' power action
  2. Foreman BMC proxy doesn't support reboot at all BMC provider
  3. Foreman BMC proxy doesn't support reset(powerreset) at Redfish provider

2nd & 3rd item are mentioned in #38498. And this PR fixes 2nd item.

Modifications in this PR

This PR does 2 things to make BMC smart proxy support reboot power action:

  • Modify BMC smart proxy API to accept reboot power action and call BMC provider's powerreboot method
  • Add powerreboot method to Redfish provider class which makes Redfish server do GracefulRestart reset action
    (According to IPMI v2.0 specification, IPMI doesn't support Reboot)

@vanou vanou force-pushed the fix3073_bmc_reboot_reset_patch2 branch 2 times, most recently from 186f889 to 817ae1a Compare June 16, 2025 05:10
@vanou vanou changed the title [WIP] - Add Reboot power operation to Redfish provider Fixes #38498 - Add Reboot power operation to Redfish provider Jun 16, 2025
@vanou vanou force-pushed the fix3073_bmc_reboot_reset_patch2 branch from 817ae1a to cde907f Compare July 7, 2025 11:25
@vanou vanou force-pushed the fix3073_bmc_reboot_reset_patch2 branch from cde907f to be04a0e Compare July 18, 2025 04:42
@vanou vanou force-pushed the fix3073_bmc_reboot_reset_patch2 branch 2 times, most recently from d20515f to 1517ca5 Compare September 1, 2025 23:52
@vanou vanou force-pushed the fix3073_bmc_reboot_reset_patch2 branch from 1517ca5 to 97217b2 Compare September 16, 2025 00:49
@stejskalleos
Copy link
Contributor

@spesnova717, To resolve the merge conflicts, can you please rebase the branch over the latest develop?

@vanou vanou force-pushed the fix3073_bmc_reboot_reset_patch2 branch from 97217b2 to 8633964 Compare September 17, 2025 13:55
@vanou
Copy link
Contributor Author

vanou commented Sep 17, 2025

@stejskalleos
Thanks for review. I rebased my PR and resolved conflict now.

@vanou vanou force-pushed the fix3073_bmc_reboot_reset_patch2 branch from 8633964 to a2bf9a5 Compare September 22, 2025 13:58
stejskalleos
stejskalleos previously approved these changes Sep 23, 2025
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

Tested together with theforeman/foreman#10561, works as expected.

🍏 code
🍏 tests
🍏 CI

@stejskalleos
Copy link
Contributor

@vanou the PR needs rebase after the #916 has been merged.

Bug #3073 is caused by 3 things:
1. Foreman core doesn't call BMC proxy's API correctly
   - Changing power state to 'Reboot' via Web GUI calls BMC proxy's 'soft'
     power action
   - Changing power state to 'Reset' via Web GUI calls BMC proxy's 'cycle'
     power action
2. Foreman BMC proxy doesn't support reboot at all BMC provider
3. Foreman BMC proxy doesn't support reset(powerreset) at Redfish provider

2nd & 3rd item are mentioned in #38498. And this PR fixes 2nd item.

For backward compatibility, power_action_v2 capability is introduced
to smart proxy at PRs related to #38498. PR related to #3073 adds logic
to determine if smart proxy supports this capability into Foreman core.
@vanou
Copy link
Contributor Author

vanou commented Sep 23, 2025

@stejskalleos
Thank you for review PRs. Now I rebase my PR.

@stejskalleos stejskalleos merged commit a494fb3 into theforeman:develop Sep 24, 2025
11 checks passed
@stejskalleos
Copy link
Contributor

Thanks @vanou!

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.

2 participants