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

Can't use CreateBiosConfigJob command from idrac_redfish_command module #2090

Closed
1 task done
pyfontan opened this issue Mar 24, 2021 · 9 comments · Fixed by #6370
Closed
1 task done

Can't use CreateBiosConfigJob command from idrac_redfish_command module #2090

pyfontan opened this issue Mar 24, 2021 · 9 comments · Fixed by #6370
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type) python3 remote_management

Comments

@pyfontan
Copy link
Contributor

Summary

I'm trying to create a job for BIOS configuration.

In the documentation example, specified resource_id is System.Embedded.1

When i use this resource, i have an error message :

Manager resource System.Embedded.1 not found

explained by:

And of course, if I use iDRAC.embedded.1 which is the actual manager resource ID, task fails with :

System resource iDRAC.Embedded.1 not found

explained by :

Issue Type

Bug Report

Component Name

idrac_redfish_command

Ansible Version

$ ansible --version
ansible 2.10.5
  config file = /home/pyfontan/.ansible.cfg
  configured module search path = ['/home/pyfontan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/pyfontan/virtualenv/ansible/lib/python3.8/site-packages/ansible
  executable location = /home/pyfontan/virtualenv/ansible/bin/ansible
  python version = 3.8.6 (default, Jan 27 2021, 15:42:20) [GCC 10.2.0]

Configuration

$ ansible-config dump --only-changed

OS / Environment

iDRAC 4.32.20.00 on PowerEdge C6525
or
iDRAC 3.21.26.22 on PowerEdge R740xd

Steps to Reproduce

- name: Create BIOS configuration job (schedule BIOS setting update)
  community.general.idrac_redfish_command:
    category: Systems
    command: CreateBiosConfigJob
    #resource_id: "{{asset_system_resource_name}}"
    #resource_id: "System.Embedded.1"
    resource_id: "iDRAC.Embedded.1"
    baseuri: "{{ asset.manager.ip }}"
    username: "{{ asset.manager.user }}"
    password: "{{ asset.manager.password }}"

Expected Results

I expect to have a BIOS Job configuration created.

Actual Results

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

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

@ansibullbot
Copy link
Collaborator

@billdodd
Copy link
Contributor

Thanks for opening this issue.

The logic in CreateBiosConfigJob was created before the resource_id property was added and the requirement that the resource_id must be specified for data modification requests where there is more than one resource in the collection category (Systems/Managers/Chassis). So now there is a conflict in that command where both _find_managers_resource() and _find_systems_resource() are both trying to use the resource_id property.

To fix this, I think the correct approach is to:

  1. Remove the call to rf_utils._find_managers_resource() on line 201.
  2. Create a new helper method called managed_by(resource_uri) in RedfishUtils that will use the ManagedBy property within Links to look up the Manager for the given resource.
  3. In create_bios_config_job(), call the new rf_utils.managed_by(resource_uri) method to get the Manager URI (instead of using self.manager_uri on line 118).

@bluikko
Copy link
Contributor

bluikko commented Dec 1, 2021

@pyfontan is your server a modular chassis/blades? I thought resource_ids are needed only on modular systems i.e. M/MX series etc. On community.general version 4.1.0 I got it working by not passing any resource_id at all. This on r730xd.

@pyfontan
Copy link
Contributor Author

pyfontan commented Dec 8, 2021

@bluikko : As said in the description i had this problem with :

iDRAC 4.32.20.00 on PowerEdge C6525
or
iDRAC 3.21.26.22 on PowerEdge R740xd

@bluikko
Copy link
Contributor

bluikko commented Dec 8, 2021

iDRAC 4.32.20.00 on PowerEdge C6525
or
iDRAC 3.21.26.22 on PowerEdge R740xd

On my previous generation systems it works when resource_id is not specified.

@ansibullbot
Copy link
Collaborator

@ansibullbot
Copy link
Collaborator

Files identified in the description:

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

click here for bot help

@ansibullbot
Copy link
Collaborator

cc @jyundt
click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type) python3 remote_management
Projects
None yet
4 participants