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]: redfish_storage_volume failing to create Raid 1 volume starting from collection 8.3.0 #625

Closed
markatdxb opened this issue Feb 8, 2024 · 1 comment · Fixed by #631
Labels
area/idrac idrac modules needs-triage Issue requires triage. type/bug Something isn't working

Comments

@markatdxb
Copy link

markatdxb commented Feb 8, 2024

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/z-marek.talas@ap.autoliv.int/.ansible/tmp/ansible-tmp-1707435559.7119524-289348-30705886827210/AnsiballZ_redfish_storage_volume.py", line 107, in \n _ansiballz_main()\n File "/home/z-marek.talas@ap.autoliv.int/.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/z-marek.talas@ap.autoliv.int/.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/z-marek.talas@ap.autoliv.int/.ansible/tmp/ansible-tmp-1707434824.733956-289147-81803729536349/AnsiballZ_redfish_storage_volume.py", line 107, in \n _ansiballz_main()\n File "/home/z-marek.talas@ap.autoliv.int/.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/z-marek.talas@ap.autoliv.int/.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

@markatdxb markatdxb added needs-triage Issue requires triage. type/bug Something isn't working labels Feb 8, 2024
@markatdxb markatdxb changed the title [BUG]: redfish_storage_volume failing to create Raid 1 starting from collection 8.3.0 [BUG]: redfish_storage_volume failing to create Raid 1 volume starting from collection 8.3.0 Feb 8, 2024
@sachin-apa
Copy link
Collaborator

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

@rajshekarp87 rajshekarp87 added the area/idrac idrac modules label Feb 28, 2024
@ShivamSh3 ShivamSh3 mentioned this issue Mar 19, 2024
8 tasks
@sachin-apa sachin-apa linked a pull request Mar 21, 2024 that will close this issue
8 tasks
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

Successfully merging a pull request may close this issue.

3 participants