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

EnableUser command fails if no Enabled property is present #59822

Closed
billdodd opened this issue Jul 30, 2019 · 4 comments · Fixed by #62617
Closed

EnableUser command fails if no Enabled property is present #59822

billdodd opened this issue Jul 30, 2019 · 4 comments · Fixed by #62617
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. module This issue/PR relates to a module. remote_management Working Group: https://docs.ansible.com/ansible/latest/community/communication.html support:community This issue/PR relates to code supported by the Ansible community.

Comments

@billdodd
Copy link
Contributor

SUMMARY

When using the EnableUser command, if the account being targeted does not have an Enabled property, the command may fail with a 400 Bad Request.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

redfish_command.py
redfish_utils.py

ANSIBLE VERSION
ansible 2.9.0.dev0
  config file = $HOME/.ansible.cfg
  configured module search path = ['$HOME/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = $HOME/Development/git/ansible/lib/ansible
  executable location = $HOME/Development/git/ansible/bin/ansible
  python version = 3.6.5 (default, Apr 25 2018, 14:26:36) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
CONFIGURATION
[no output]
OS / ENVIRONMENT

Applies to Redfish OOB controllers.

STEPS TO REPRODUCE

Try to run the EnableUser command for an account that does not have the Enabled property.

---
- hosts: myhosts
  connection: local
  name: Enable User
  gather_facts: False

  vars:
  - account_username: user8

  tasks:

  - name: Enable user
    redfish_command:
      category: Accounts
      command: EnableUser
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
      account_username: "{{ account_username }}"
EXPECTED RESULTS

Command succeeds with changed=0.

ACTUAL RESULTS

Command fails with:

400 Bad Request
@ansibot
Copy link
Contributor

ansibot commented Jul 30, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jul 30, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. remote_management Working Group: https://docs.ansible.com/ansible/latest/community/communication.html support:community This issue/PR relates to code supported by the Ansible community. labels Jul 30, 2019
@mraineri
Copy link

mraineri commented Aug 1, 2019

General rule: if Enabled is not supported, the account is assumed to be enabled. No reason to ever try to PATCH the property on these systems.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Aug 9, 2019
@ansibot
Copy link
Contributor

ansibot commented Aug 30, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansible ansible locked and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. module This issue/PR relates to a module. remote_management Working Group: https://docs.ansible.com/ansible/latest/community/communication.html support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants