Bug Description
Hello
i have a simple playbook to create RAID1 volume with 2 disks.
Process works fine with collection version 8.2.0. Failure starting with 8.3.0 and up
Component or Module Name
redfish_storage_volume
Ansible Version
Ansible 2.16.3
Python Version
Python 3.11
iDRAC/OME/OME-M version
idrac 2.85.85.85
Operating System
N/A
Playbook Used
- name: iDrac configuration
hosts: localhost
gather_facts: false
vars:
lom_username: root
lom_password:
alv_lom_ip:
p_controller: RAID.Integrated.1-1
p_disks: [
"Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1",
"Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1",
"Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1"
]
tasks:
- name: Create v_disk using first two physical disks
dellemc.openmanage.redfish_storage_volume:
baseuri: "{{ lom_ip }}"
username: "{{ lom_username }}"
password: "{{ lom_password }}"
validate_certs: false
# volume_type: "Mirrored"
raid_type: RAID1
name: "VDISK1"
controller_id: "{{ p_controller }}"
drives: "{{ p_disks[:2] }}"
state: "present"
Logs
when using collection 8.3.0
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'SupportedRAIDTypes'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/home/[email protected]/.ansible/tmp/ansible-tmp-1707435559.7119524-289348-30705886827210/AnsiballZ_redfish_storage_volume.py", line 107, in \n _ansiballz_main()\n File "/home/[email protected]/.ansible/tmp/ansible-tmp-1707435559.7119524-289348-30705886827210/AnsiballZ_redfish_storage_volume.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/[email protected]/.ansible/tmp/ansible-tmp-1707435559.7119524-289348-30705886827210/AnsiballZ_redfish_storage_volume.py", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.dellemc.openmanage.plugins.modules.redfish_storage_volume', init_globals=dict(_module_fqn='ansible_collections.dellemc.openmanage.plugins.modules.redfish_storage_volume', _modlib_path=modlib_path),\n File "", line 226, in run_module\n File "", line 98, in _run_module_code\n File "", line 88, in _run_code\n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_0rc51nk7/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 711, in \n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_0rc51nk7/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 698, in main\n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_0rc51nk7/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 624, in configure_raid_operation\n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_0rc51nk7/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 550, in perform_volume_create_modify\n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_0rc51nk7/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 537, in check_raid_type_supported\nKeyError: 'SupportedRAIDTypes'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
when using collection 8.7.0
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: '@Redfish.OperationApplyTimeSupport'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/home/[email protected]/.ansible/tmp/ansible-tmp-1707434824.733956-289147-81803729536349/AnsiballZ_redfish_storage_volume.py", line 107, in \n _ansiballz_main()\n File "/home/[email protected]/.ansible/tmp/ansible-tmp-1707434824.733956-289147-81803729536349/AnsiballZ_redfish_storage_volume.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/[email protected]/.ansible/tmp/ansible-tmp-1707434824.733956-289147-81803729536349/AnsiballZ_redfish_storage_volume.py", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.dellemc.openmanage.plugins.modules.redfish_storage_volume', init_globals=dict(_module_fqn='ansible_collections.dellemc.openmanage.plugins.modules.redfish_storage_volume', _modlib_path=modlib_path),\n File "", line 226, in run_module\n File "", line 98, in _run_module_code\n File "", line 88, in _run_code\n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_27wdjagu/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 939, in \n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_27wdjagu/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 910, in main\n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_27wdjagu/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 665, in check_apply_time_supported_and_reboot_required\n File "/tmp/ansible_dellemc.openmanage.redfish_storage_volume_payload_27wdjagu/ansible_dellemc.openmanage.redfish_storage_volume_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/redfish_storage_volume.py", line 649, in get_apply_time\nKeyError: '@Redfish.OperationApplyTimeSupport'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Steps to Reproduce
run the playbook
Expected Behavior
new vdisk gets created
Actual Behavior
playbook error
Screenshots
No response
Additional Information
No response
I see this is happening because the firmware idrac 2.85.85.85 doesn't support raid_type
redfish parameter and was added only after 4.40 and above. this needs a check in the code to either use raid_type
or volume_type
in the payload depending on the idrac firmware.
@Kritika-Bhateja-03 @rajshekarp87