HewlettPackard / ilo-ansible-collection

Ansible Collection and Sample Playbooks for HPE iLO
Apache License 2.0
43 stars 23 forks source link

Creating LogicalDrives #38

Closed willifehler closed 3 months ago

willifehler commented 3 months ago

Hey there,

I'm trying to create Logicial Drives and I would like to understand what should I do to not run into this error:

lo_storage_payload_wvlkkv5y/ansible_ilo_storage_payload.zip/ansible_collections/hpe/ilo/plugins/module_utils/ilo_oem_utils.py\", line 1657, in create_logical_drives_with_particular_physical_drives\nTypeError: 'NoneType' object is not subscriptable\n",
 9917     "module_stdout": "",
 9918     "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
 9919     "rc": 1
 9920 }

If I boot my server into the Smart Array Administrator (SSA) I'm able to create Logicial Drives. If I poweroff the machine I'm running into the error above. Is this expected?

Regards - Willi

donzef commented 3 months ago

Yes, it is normal you get an error. Granted, the error you get is not very helpful. It could provide a solution or, even better, it could test the state of the server and tell you something more friendly.

Devices like storage controllers and network adapters are not visible by the Redfish service (iLO) when server is OFF. Hence you get an error. I suggest you read this article to better understand server states and sub-states.

Then, before willing to configure logical drives, make sure your server is in the state shown by the following screenshot (taken from the article mentioned above).

Something that might help as well, is this blog post explaining PLDM for RDE. It explains the flow of Redfish requests to modern devices (like yours I suspect) with latest firmware. When this is understood, you should agree that an error must show up when the server is OFF. Granted again, the one you get is misleading!

image

willifehler commented 3 months ago

Hey @donzef,

thank you for your feedback. I have checked all roles and tasks and it seems no task exists to wait until the POST has completed. I can create an Ansible pause task to wait that the POST has finished.

Regards - Willi

donzef commented 3 months ago

I am afraid you will have to create your own pause task.

Then, make sure you installed the latest python-ilorest-library (pip install python-ilorest-library --upgrade). I see in the changelog that version 5.0.0.0 fixed some bugs in the storagecontroller command., which uses this library.

willifehler commented 3 months ago

Thank you so much @donzef! I will do that.