trunet / puppet-storcli

Puppet module to generate facts with types and providers to manage LSI MegaRAID controllers
Apache License 2.0
3 stars 2 forks source link

0.4.4 fails when perccli can't detect a controller #21

Closed avk999 closed 1 year ago

avk999 commented 1 year ago
2023-06-14 02:21:59.308925 ERROR puppetlabs.facter - error while resolving custom fact "megaraid": key not found: "Response Data"
backtrace:
/var/lib/puppet/lib/facter/megaraid.rb:52:in `fetch'
/var/lib/puppet/lib/facter/megaraid.rb:52:in `block in controller_info'
/var/lib/puppet/lib/facter/megaraid.rb:51:in `each'
/var/lib/puppet/lib/facter/megaraid.rb:51:in `controller_info'
/var/lib/puppet/lib/facter/megaraid.rb:40:in `block in all_info'
/var/lib/puppet/lib/facter/megaraid.rb:39:in `chdir'
/var/lib/puppet/lib/facter/megaraid.rb:39:in `all_info'
/var/lib/puppet/lib/facter/megaraid.rb:153:in `all_facts'
/var/lib/puppet/lib/facter/megaraid.rb:168:in `block (2 levels) in <top (required)>'

perccli output:

/opt/MegaRAID/perccli/perccli64 /cALL show J
{
"Controllers":[
{
    "Command Status" : {
        "CLI Version" : "007.2110.0000.0000 Sep 27, 2022",
        "Operating system" : "Linux 5.10.103-1.base.x86_64",
        "Status" : "Failure",
        "Description" : "No Controller found"
    }
}
]
}

I believe module should handle this gracefully.

jcpunk commented 1 year ago

Can you test the linked pull request to verify it works to resolve on your system?