Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dell PwrButton requires a job initated at reboot #9012

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

Rubueno
Copy link
Contributor

@Rubueno Rubueno commented Oct 9, 2024

SUMMARY

Dell systems do not change the bios setting PwrButton right away. The command will return changed=true all the time, but it is not applied. Also no job is scheduled at next reboot for the change to take place. This patch aims to fix this issue.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

redfish_utils / refish_config

ADDITIONAL INFORMATION
  1. Use curl to verify the current configuration:
curl -u foobar:foobar https://my.host/redfish/v1/Systems/System.Embedded.1/Bios -k -s | jq '.Attributes.PwrButton'
"Enabled"
  1. Run community.general.redfish_config with params:
community.general.redfish_config:
  category: 'Systems'
  command: 'SetBiosAttributes'
  bios_attributes:
    PwrButton: 'Disabled'
  baseuri: 'my.host.com'
  username: 'foobar'
  password: 'foobar'
  1. The output will always return {"changed": true, "msg": "Modified BIOS attributes {'PwrButton': 'Disabled'}
  2. No update job is scheduled in the iDRAC system.
  3. Using curl again to verify no change took place
curl -u foobar:foobar https://my.host/redfish/v1/Systems/System.Embedded.1/Bios -k -s | jq '.Attributes.PwrButton'
"Enabled"
  1. One can continuously run this task and the output will always be the same.

With my patch a job will be scheduled and the output will change as expected.

fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "HTTP Error 400 on PATCH request to 'https://my.host/redfish/v1/Systems/System.Embedded.1/Bios/Settings', extended message: 'Pending configuration values are already committed, unable to perform another set operation.'"}

I'm not aware currently of what other parameters require a reboot when changing them, thus this patch is limited to only "PwrButton"

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module_utils module_utils new_contributor Help guide this first time contributor plugins plugin (any type) labels Oct 9, 2024
@Rubueno Rubueno force-pushed the pwrbutton branch 3 times, most recently from 1e36495 to 730ffdc Compare October 9, 2024 12:58
Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

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

Hi @Rubueno thanks for your contribution!

We got some adjustments to make in the changelog fragment, but the actual code LGTM. Thanks!

Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

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

Thanks for the update. LGTM

@Rubueno Rubueno requested a review from russoz October 10, 2024 08:22
@Rubueno Rubueno force-pushed the pwrbutton branch 3 times, most recently from e4608c8 to 957025f Compare October 10, 2024 13:12
Dell systems do not change the bios setting PwrButton right away. The
command will return changed=true, but it is not applied. Also no job is
scheduled at next reboot for the change to take place. This patch aims
to fix this issue.
@mraineri
Copy link
Contributor

All looks good; thanks!

shipit

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch and removed check-before-release PR will be looked at again shortly before release and merged if possible. labels Oct 10, 2024
@felixfontein felixfontein merged commit 67ddb56 into ansible-collections:main Oct 10, 2024
126 checks passed
Copy link

patchback bot commented Oct 10, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/67ddb567c90f6a03dd3a9a3e2c4873c415b07e0d/pr-9012

Backported as #9015

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Oct 10, 2024
Dell systems do not change the bios setting PwrButton right away. The
command will return changed=true, but it is not applied. Also no job is
scheduled at next reboot for the change to take place. This patch aims
to fix this issue.

(cherry picked from commit 67ddb56)
@felixfontein
Copy link
Collaborator

@Rubueno thanks for your contribution!
@russoz @mraineri thanks for reviewing this!

felixfontein pushed a commit that referenced this pull request Oct 10, 2024
…initated at reboot (#9015)

Dell PwrButton requires a job initated at reboot (#9012)

Dell systems do not change the bios setting PwrButton right away. The
command will return changed=true, but it is not applied. Also no job is
scheduled at next reboot for the change to take place. This patch aims
to fix this issue.

(cherry picked from commit 67ddb56)

Co-authored-by: Ruben Bosch <8641284+Rubueno@users.noreply.github.com>
Massl123 pushed a commit to Massl123/community.general that referenced this pull request Feb 7, 2025
…#9012)

Dell systems do not change the bios setting PwrButton right away. The
command will return changed=true, but it is not applied. Also no job is
scheduled at next reboot for the change to take place. This patch aims
to fix this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch bug This issue/PR relates to a bug module_utils module_utils new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants