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

[BUG]: SetBiosAttributes inconsistent across platforms #648

Open
sistarers opened this issue Apr 25, 2024 · 6 comments
Open

[BUG]: SetBiosAttributes inconsistent across platforms #648

sistarers opened this issue Apr 25, 2024 · 6 comments
Labels
area/idrac idrac modules needs-triage Issue requires triage. type/bug Something isn't working

Comments

@sistarers
Copy link

Bug Description

Our Dell rep Steven Carter encouraged us to open an issue. We have 4 devices in development 2 each of the following
mx760c: idrac version 7.10.30.05, system bios version 2.1.5
mx740c: idrac version 7.00.00.171, system bios version 2.9.4

when executing the following task, the m760c's return the error fatal: [cmc_deviceID]: FAILED! => {"changed": false, "msg": "HTTP Error 400 on PATCH request to 'https://10.x.y.z/redfish/v1/Systems/System.Embedded.1/Bios/Settings', extended message: 'Unable to set the object properties because an incorrect object value is entered.'"}

we believe this error occurs while trying to set the IscsiInitiatorName to a specific value because all other values in the task are set as configured. The IscsiInitiatorName field is blank when the job is created and the reboot occurs. The m740c's do not have the same issue. Running the same task on that platform yields the appropriate results.

Please advise a work around or guidance on how to address this bug.

  • name: Set Blade Unique ID
    set_fact:
    blade_index_id: "{{ ansible_play_hosts_all.index(inventory_hostname) + 1 }}"
    tags:

    • blades
  • name: CONFIGURE unique iSCSI on attributes on blade BIOS
    community.general.redfish_config:
    category: Systems
    command: SetBiosAttributes
    bios_attributes:
    IscsiDev1Con1Ip: "192.168.5.{{ 10 + blade_index_id|int }}"
    IscsiDev1Con1Mask: "255.255.255.0"
    IscsiDev1Con2Ip: "192.168.5.{{ 20 + blade_index_id|int }}"
    IscsiDev1Con2Mask: "255.255.255.0"
    IscsiInitiatorName: "iqn.{{ year }}-{{ month }}.jmn.ncrc:host-{{ blade_index_id|int }}"
    baseuri: "{{ baseuri }}"
    <<: *blade_login
    register: unique_bios_iscsi_attributes
    tags:

    • blades

Component or Module Name

community.general.redfish_config

Ansible Version

Ansible core 2.13.6

Python Version

python 3.9.13

iDRAC/OME/OME-M version

mx760c: idrac version 7.10.30.05, system bios version 2.1.5
mx740c: idrac version 7.00.00.171, system bios version 2.9.4

Operating System

there is no bootable o/s on the blades, this is by design due to the requirement to provision blades with any o/s as selected by the customer

Playbook Used

  • name: Set Blade Unique ID
    set_fact:
    blade_index_id: "{{ ansible_play_hosts_all.index(inventory_hostname) + 1 }}"
    tags:

    • blades
  • name: CONFIGURE unique iSCSI on attributes on blade BIOS
    community.general.redfish_config:
    category: Systems
    command: SetBiosAttributes
    bios_attributes:
    IscsiDev1Con1Ip: "192.168.5.{{ 10 + blade_index_id|int }}"
    IscsiDev1Con1Mask: "255.255.255.0"
    IscsiDev1Con2Ip: "192.168.5.{{ 20 + blade_index_id|int }}"
    IscsiDev1Con2Mask: "255.255.255.0"
    IscsiInitiatorName: "iqn.{{ year }}-{{ month }}.jmn.ncrc:host-{{ blade_index_id|int }}"
    baseuri: "{{ baseuri }}"
    <<: *blade_login
    register: unique_bios_iscsi_attributes
    tags:

    • blades

Logs

fatal: [cmc_deviceID]: FAILED! => {"changed": false, "msg": "HTTP Error 400 on PATCH request to 'https://10.x.y.z/redfish/v1/Systems/System.Embedded.1/Bios/Settings', extended message: 'Unable to set the object properties because an incorrect object value is entered.'"}

Steps to Reproduce

reset bios to defaults using both the SetBiosDefaultSettings and SetBios Attributes commands with specific values to reset

Expected Behavior

we expect the iscsi attributes to be set with appropriate values per the scripts on the mx760c's just like the mx740c's properly allow writing the values

Actual Behavior

mx760c's fail during the write of the IscsiInitiatorName setting

Screenshots

No response

Additional Information

No response

@sistarers sistarers added needs-triage Issue requires triage. type/bug Something isn't working labels Apr 25, 2024
@anupamaloke
Copy link
Contributor

@sistarers, could you please use the dellemc.openmanage ansible collection to configure the BIOS attributes like below and let us know the results:

- name: Set Blade Unique ID
  ansible.builtin.set_fact:
    blade_index_id: "{{ ansible_play_hosts_all.index(inventory_hostname) + 1 }}"
  tags:
    - blades

- name: CONFIGURE unique iSCSI on attributes on blade BIOS
  dellemc.openmanage.idrac_bios:
    idrac_ip: "{{ inventory_hostname }}"
    idrac_user: "{{ idrac_username }}"
    idrac_password: "{{ idrac_password }}"
    validate_certs: false
    attributes:
      IscsiDev1Con1Ip: "192.168.5.{{ 10 + blade_index_id|int }}"
      IscsiDev1Con1Mask: "255.255.255.0"
      IscsiDev1Con2Ip: "192.168.5.{{ 20 + blade_index_id|int }}"
      IscsiDev1Con2Mask: "255.255.255.0"
      IscsiInitiatorName: "iqn.{{ year }}-{{ month }}.jmn.ncrc:host-{{ blade_index_id|int }}"
  register: unique_bios_iscsi_attributes
  tags:
    - blades

@sistarers
Copy link
Author

sistarers commented Apr 26, 2024

When running the recommended task with ansible 9, I receive the following error on the mx760c blades. I have not tried the new method on the mx740c's since the old method worked with them. Also, with the new method (dellemc.openmanage.idrac_bios) I am able to set all iscsi parameters relevant to our use case except the IscsiInitiatorName. The error below gives more details.

ansible [core 2.16.6]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ncraf/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
ansible collection location = /home/ncraf/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.11.5 (main, Sep 7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3)
jinja version = 3.1.3
libyaml = True

TASK [CONFIGURE iSCSI IQN on blade BIOS OME] ****************************************************
FAILED! => {"changed": false, "error_info": {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to set the object properties because an incorrect object value is entered.", "MessageArgs": ["IscsiInitiatorName"], "MessageArgs@odata.count": 1, "MessageId": "IDRAC.2.9.SYS409", "RelatedProperties": ["#/Attributes/IscsiInitiatorName"], "RelatedProperties@odata.count": 1, "Resolution": "Enter a valid object value and retry the operation. For information about recommended values, see the schema or the attribute registry based on the type of resource.", "Severity": "Warning"}], "code": "Base.1.12.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information"}}, "msg": "HTTP Error 400: Bad Request"}

`
vars:
hosts_count:
- 1
- 2
year: "2023"
month: "03"
eventvlan: 3011
blade_login: &blade_login
username: "{{ username }}"
password: "{{ password }}"
idrac_login: &idrac_login
idrac_user: "{{ username }}"
idrac_password: "{{ password }}"
template: ~/jmnauto/dell/
reboot_uri: "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset"
retries_count: 10
polling_interval: 3
common_iscsi_attributes:
IscsiDev1Con1DhcpEnDis: "Disabled"
IscsiDev1Con1EnDis: "Enabled"
IscsiDev1Con1Interface: "NIC.Mezzanine.1A-1-1"
IscsiDev1Con1Lun: "0"
IscsiDev1Con1Port: 3260
IscsiDev1Con1Protocol: "IPv4"
IscsiDev1Con1Retry: 3
IscsiDev1Con1RevChapName: ""
IscsiDev1Con1RevChapSecret: ""
IscsiDev1Con1TargetIp: "192.168.5.254"
IscsiDev1Con1TargetName: "{{ hostvars['localhost']['na_tiqn'] }}"
IscsiDev1Con1TgtDhcpEnDis: "Disabled"
IscsiDev1Con1Timeout: 10000
IscsiDev1Con1VlanEnDis: "Enabled"
IscsiDev1Con1VlanId: 3011
IscsiDev1Con1VlanPriority: 0
IscsiDev1Con2DhcpEnDis: "Disabled"
IscsiDev1Con2EnDis: "Enabled"
IscsiDev1Con2Interface: "NIC.Mezzanine.1A-1-1"
IscsiDev1Con2Lun: "0"
IscsiDev1Con2Port: 3260
IscsiDev1Con2Protocol: "IPv4"
IscsiDev1Con2Retry: 3
IscsiDev1Con2RevChapName: ""
IscsiDev1Con2RevChapSecret: ""
IscsiDev1Con2TargetIp: "192.168.5.254"
IscsiDev1Con2TargetName: "{{ hostvars['localhost']['na_tiqn'] }}"
IscsiDev1Con2TgtDhcpEnDis: "Disabled"
IscsiDev1Con2Timeout: 10000
IscsiDev1Con2VlanEnDis: "Enabled"
IscsiDev1Con2VlanId: 3011
IscsiDev1Con2VlanPriority: 0
IscsiDev1EnDis: "Enabled"
IscsiDev1Con1Ip: "192.168.5.{{ 10 + blade_index_id|int }}"
IscsiDev1Con1Mask: "255.255.255.0"
IscsiDev1Con2Ip: "192.168.5.{{ 20 + blade_index_id|int }}"
IscsiDev1Con2Mask: "255.255.255.0"

tasks:

  • name: CONFIGURE unique iSCSI attributes on blade BIOS OME
    dellemc.openmanage.idrac_bios:
    idrac_ip: "{{ baseuri }}"
    <<: *idrac_login
    validate_certs: false
    attributes: "{{ common_iscsi_attributes }}"
    register: unique_bios_iscsi_attributes
    tags:
    - blades

    • name: print unique_bios iscsi attributes register
      debug:
      var: unique_bios_iscsi_attributes
      tags:

      • blades
    • name: CONFIGURE iSCSI IQN on blade BIOS OME
      dellemc.openmanage.idrac_bios:
      idrac_ip: "{{ baseuri }}"
      <<: *idrac_login
      validate_certs: false
      attributes:
      IscsiInitiatorName: "iqn.{{ year }}-{{ month }}.jmn.ncrc:host-10{{ blade_index_id|int }}"
      register: event_iqn_name
      tags:

      • iqn
    • name: print iscsi iqn result
      debug:
      var: event_iqn_name
      tags:

      • iqn

`

@anupamaloke
Copy link
Contributor

@sistarers, my first guess would be that the iScsiInitiatorName format is not in line with the standards and therefore you are getting an error. As per the BIOS attribute registry, the iScsiInitiatorName must be in line with the below expression:

"ValueExpression": "^(iqn|IQN)\\.[0-9a-zA-Z\\.\\-]+[0-9a-zA-Z\\-](\\:[0-9a-zA-Z\\-\\.\\:]*)?$|^$",

Could you please check what is the value that you are setting in IscsiInitiatorName: "iqn.{{ year }}-{{ month }}.jmn.ncrc:host-10{{ blade_index_id|int }}"?

@sistarers
Copy link
Author

sistarers commented Apr 29, 2024 via email

@anupamaloke
Copy link
Contributor

@sistarers, I tried setting the iSCSI initiator name via the iDRAC GUI (Configuration > BIOS Settings > Network Settings) and it errors there too. However the following name works - iqn.2023-03.jmn.ncrc:host101 (notice I removed the - between host and 101 ). Could you please try running the below task instead and let me know whether that passes or not:

- name: CONFIGURE iSCSI IQN on blade BIOS OME
  dellemc.openmanage.idrac_bios:
    idrac_ip: "{{ baseuri }}"
    <<: *idrac_login
    validate_certs: false
    attributes:
      IscsiInitiatorName: "iqn.{{ year }}-{{ month }}.jmn.ncrc:host10{{ blade_index_id|int }}"
  register: event_iqn_name
  tags:
  - iqn

@anupamaloke
Copy link
Contributor

@sistarers, we have identified this as a bug in the iDRAC and an issue has been raised internally to get this addressed as part of the next iDRAC release in Sep. Meanwhile, you might have to use a unique name without the - when setting the iSCSI initiator and target names.

@anupamaloke anupamaloke added the area/idrac idrac modules label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/idrac idrac modules needs-triage Issue requires triage. type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants