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

[backport 2.7] Fix idempotency issues in set_bios_attributes #47802

Merged
merged 2 commits into from
Nov 1, 2018

Conversation

jyundt
Copy link
Contributor

@jyundt jyundt commented Oct 30, 2018

  • Added check to see if attribute even exists, if not, it exits.
  • Then checks if attribute is already set to value we want to update
    it to. If yes, then it exits and changed=False
  • Otherwise updates the attribute and changed=True

(cherry picked from commit 1c37471)

SUMMARY

Backport #47462 from devel to 2.7. This PR fixes #46338 which addresses the broken idempotency behavior of the redfish_config module introduced in 2.7.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

redfish_config.py
redfish_utils.py

ANSIBLE VERSION
  config file = /home/jyundt/git/ansible/ansible.cfg
  configured module search path = [u'/home/jyundt/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jyundt/git/ansible/lib/ansible
  executable location = /home/jyundt/git/ansible/bin/ansible
  python version = 2.7.13 (default, May 23 2018, 14:21:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
ADDITIONAL INFORMATION

See #46338 for additional details.

cc @jose-delarosa @nlopez

- Added check to see if attribute even exists, if not, it exits.
- Then checks if attribute is already set to value we want to update
  it to. If yes, then it exits and changed=False
- Otherwise updates the attribute and changed=True

(cherry picked from commit 1c37471)
@ansibot
Copy link
Contributor

ansibot commented Oct 30, 2018

Hi @jyundt, thank you for submitting this pull-request!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Oct 30, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Oct 30, 2018
@jyundt jyundt changed the title Fix idempotency issues in set_bios_attributes [backport 2.7] Fix idempotency issues in set_bios_attributes Oct 30, 2018
@abadger
Copy link
Contributor

abadger commented Oct 31, 2018

This bugfix needs to have a changelog fragment in order to be merged. See the files in here: https://github.com/ansible/ansible/tree/devel/changelogs/fragments for examples.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Oct 31, 2018
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Oct 31, 2018
@jyundt
Copy link
Contributor Author

jyundt commented Oct 31, 2018

Whoops, sorry about that. Just added a changelog fragment.

Lemme know if you need anything else.

@abadger abadger merged commit 01c0a6d into ansible:stable-2.7 Nov 1, 2018
@abadger
Copy link
Contributor

abadger commented Nov 1, 2018

merged for the 2.7.2 release. Thanks!

@jyundt jyundt deleted the backport/2.7/47462 branch November 1, 2018 21:33
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants