ansible-collections / ibm.storage_virtualize

GNU General Public License v3.0
3 stars 9 forks source link

Add detail information to Drives via lsdrive detail api call #19

Closed cueball23 closed 4 months ago

cueball23 commented 1 year ago
SUMMARY

Add detail information to Drives vial lsdrive detail api call.

ISSUE TYPE
COMPONENT NAME

ibm_svc_info.py

ADDITIONAL INFORMATION

Currently there is no way to get the Firmware Information for each drive.

Overview information for drives contains

    - auto_manage: 
      capacity: 
      drive_class_id:
      enclosure_id: 
      error_sequence_number: ''
      id: 
      mdisk_id: 
      mdisk_name:
      member_id: 
      node_id: 
      node_name: 
      slot_id: 
      status: 
      tech_type:
      use: 

detail call includes

    - FPGA_level: ''
      FRU_identity: 
      FRU_part_number: 
      RPM: ''
      UID: 
      auto_manage: 
      block_size: ''
      capacity: 
      compressed: ''
      date_of_manufacture: ''
      drive_class_id: ''
      effective_used_capacity: ''
      enclosure_id: ''
      error_sequence_number: ''
      firmware_level: 
      id: ''
      interface_speed: 
      mdisk_id: ''
      mdisk_name: 
      member_id: ''
      node_id: ''
      node_name: ''
      physical_capacity: 
      physical_used_capacity: ''
      port_1_status: 
      port_2_status: 
      product_id: ''
      protection_enabled: ''
      quorum_id: ''
      replacement_date: ''
      slot_id: ''
      status: 
      tech_type: 
      transport_protocol: 
      use: member
      vendor_id: 
      write_endurance_usage_rate: ''
      write_endurance_used: ''
cueball23 commented 1 year ago

This fixes/adds https://github.com/ansible-collections/ibm.storage_virtualize/issues/19

Shilpi-J commented 1 year ago

@cueball23 Did you try passing in "objectname" parameter of this module? It will provide you detailed output of the particular drive id

cueball23 commented 1 year ago

@Shilpi-J I wan't to get detailed information for all attached drives (e.g. their serial number and firmware information). From my understanding this is not possible with the "objectname" parameter for all the drives. Because we need one call per drive to the REST API. And if you have more than a hand full of drives and we do not slow down these requests we run into the rate limit of the REST API and get 429 http responses. Please see https://github.com/ansible-collections/ibm.spectrum_virtualize/pull/101 for one possible solution.

lavanyacr commented 10 months ago

Here is a working example of task for displaying all the properties of 500 volumes that are present in the system.

//output :

PLAY RECAP *** localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ansible-playbook info_vol.yml -vvv 199.77s user 67.80s system 14% cpu 31:04.20 total

As you can see, While the playbook execution took around 200 seconds, individual tasks didn't cause any timeout. The 10-sec timeout is only for single REST API call. Also, please check with your server administrator about API throttling limits. It should be configurable.

I hope this resolves your query. Please let us know if there is anything else required, otherwise this issue will be closed by Tuesday 9th Jan 2024.

sumitguptaibm commented 7 months ago

This can be worked upon in the ibm_svc_info module by adding "all" for any object.

sumitguptaibm commented 5 months ago

@cueball23 , This feature will be available in June'24 release.

sumitguptaibm commented 4 months ago

@cueball23 , This feature is now supported in latest release (version 2.4.1), thus closing the defect. Please install the latest collection to get the feature.