bb-Ricardo / netbox-sync

Sync objects from VMware or redfish sources to NetBox
MIT License
290 stars 65 forks source link

Issue with ilo6 and/or server without storage controller #374

Closed Guilh3m closed 5 months ago

Guilh3m commented 8 months ago

Hello,

I'm having an issue syncing redfish source with newly acquired hpe 385 gen11 server without storage controller, only nvme disks.

Script crashing with this error :

Traceback (most recent call last):
  File "/opt/netbox-sync/netbox-sync.py", line 146, in <module>
    main()
  File "/opt/netbox-sync/netbox-sync.py", line 111, in main
    source.apply()
  File "/opt/netbox-sync/module/sources/check_redfish/import_inventory.py", line 151, in apply
    self.update_storage_controller()
  File "/opt/netbox-sync/module/sources/check_redfish/import_inventory.py", line 608, in update_storage_controller
    self.update_all_items(items)
  File "/opt/netbox-sync/module/sources/check_redfish/import_inventory.py", line 946, in update_all_items
    unmatched_inventory_items.sort(key=lambda x: x.get("full_name"))
TypeError: '<' not supported between instances of 'NoneType' and 'str'

In the json file i can see this in meta data :

"data_retrieval_issues": {
            "storage_controller": [
                "No array controller data returned for API URL '/redfish/v1/Systems/1//SmartStorage/ArrayControllers?$expand=.'"
            ]
        },

Thank you

bb-Ricardo commented 8 months ago

Thank you for this issue,

will have a look at it.

bb-Ricardo commented 6 months ago

Hi @Guilh3m,

would you be able to send me an example inventory file where this is happening?

thank you

bb-Ricardo commented 5 months ago

@Guilh3m,

Thank you for the provided inventory file. I was able to fix the issue in the latest development branch.

can you try it out and see if it is fixed for you as well, please?

Guilh3m commented 5 months ago

Hello, tested development branch with success, synchronization working fine now.

bb-Ricardo commented 5 months ago

great, thank you very much for the verification. This will be part of the next release.