Closed sistarers closed 4 months ago
@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
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:
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:
name: print unique_bios iscsi attributes register debug: var: unique_bios_iscsi_attributes tags:
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:
name: print iscsi iqn result debug: var: event_iqn_name tags:
`
@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 }}"
?
When I enter the same value in the iSCSI Initiator Name field using the virtual console, the device will allow the value to be used. Also, if the desired value is already set on the device, then the ome idrac module does not respond with an error. Finally, setting the value using the string with variables works on the mx740c using the redfish module if that helps at all.
[A screenshot of a computer Description automatically generated]
Ss
Warm Regards,
Scott Sistare
From: anupamaloke @.> Sent: Monday, April 29, 2024 3:02 PM To: dell/dellemc-openmanage-ansible-modules @.> Cc: sistarers @.>; Mention @.> Subject: Re: [dell/dellemc-openmanage-ansible-modules] [BUG]: SetBiosAttributes inconsistent across platforms (Issue #648)
@sistarershttps://github.com/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\-?$|^$",
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 }}"?
- Reply to this email directly, view it on GitHubhttps://github.com/dell/dellemc-openmanage-ansible-modules/issues/648#issuecomment-2083456786, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABCSA555QA6AEXGF2XUGH3LY72KMBAVCNFSM6AAAAABGZNHURKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTGQ2TMNZYGY. You are receiving this because you were mentioned.Message ID: @.***>
@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
@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.
I finally made time to test this and the suggestion to remove the - from the iqn string worked. However, now I am unable to set this value (IscsiDev1Con1VlanId and IscsiDev1Con2VlanId) using the same playbook. I'll open a separate issue to track that bug.
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:
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:
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:
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:
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