Naudit / pystorcli2

Python library provides wrapper around storcli tool to manage and control LSI MegaRAID controllers.
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

Init of controllers fails on HBA card #6

Closed ulmitov closed 1 year ago

ulmitov commented 1 year ago

Hi,

filing another one. Init of controllers fails on some cards on this line:

return [ctl['Ctl'] for ctl in common.response_data(out)['System Overview']]

The "System overview" appears to be "IT System Overview" sometimes. Examples:

Output of HBA card:

CLI Version = 007.2309.0000.0000 Sep 16, 2022
Operating system = Linux 5.4.0-99-generic
Status Code = 0
Status = Success
Description = None

Number of Controllers = 1
Host Name = ubuntu20-cuda
Operating System  = Linux 5.4.0-99-generic
StoreLib IT Version = 07.2400.0200.0100
StoreLib IR3 Version = 16.14-0

IT System Overview :
==================

---------------------------------------------------------------------------
Ctl Model        AdapterType   VendId DevId SubVendId SubDevId PCI Address 
---------------------------------------------------------------------------
  0 HBA 9400-16i   SAS3416(B0) 0x1000  0xAC    0x1000   0x3000 00:3b:00:00 
---------------------------------------------------------------------------

Output of RAID card:

CLI Version = 007.2309.0000.0000 Sep 16, 2022
Operating system = Linux 5.4.0-99-generic
Status Code = 0
Status = Success
Description = None

Number of Controllers = 1
Host Name = ubuntu20-cuda
Operating System  = Linux 5.4.0-99-generic

System Overview :
===============

----------------------------------------------------------------------
Ctl Model     Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS  EHS ASOs Hlth 
----------------------------------------------------------------------
  0 AVAGOJBOD    16  16   0     0   0     0 N/A On  1&2 Y      2 Opt  
----------------------------------------------------------------------
ralequi commented 1 year ago

Please, give me the output of storcli show J so I can add them directly to tests

Thank you!

ulmitov commented 1 year ago
# storcli64 show J
{
"Controllers":[
{
        "Command Status" : {
                "CLI Version" : "007.2309.0000.0000 Sep 16, 2022",
                "Operating system" : "Linux 5.4.0-99-generic",
                "Status Code" : 0,
                "Status" : "Success",
                "Description" : "None"
        },
        "Response Data" : {
                "Number of Controllers" : 1,
                "Host Name" : "ubuntu20-cuda",
                "Operating System " : "Linux 5.4.0-99-generic",
                "StoreLib IT Version" : "07.2400.0200.0100",
                "StoreLib IR3 Version" : "16.14-0",
                "IT System Overview" : [
                        {
                                "Ctl" : 0,
                                "Model" : "HBA 9400-16i",
                                "AdapterType" : "  SAS3416(B0)",
                                "VendId" : 4096,
                                "DevId" : 172,
                                "SubVendId" : 4096,
                                "SubDevId" : 12288,
                                "PCI Address" : "00:3b:00:00"
                        }
                ]
        }
}
]
}
ralequi commented 1 year ago

Bug confirmed.

Bugfix published on branch develop

Please @ulmitov confirm me it is fixed

ulmitov commented 1 year ago

issue is fixed, thank you