Closed ulmitov closed 1 year ago
While in python i get this line, which is misleading: pystorcli.exc.StorCliCmdErrorCode: Command '/usr/sbin/storcli64 /c0/e252/s7 set good J' error: 255 (Invalid status - used for polling command completion.)
Maybe for 255 better to print the error as is
hi @ulmitov !
I was in vacations, sorry for the delay. Did you find anything more about why that "Invalid status - used for polling command completion" is happening ?
Hey @ralequi ! Well, i do not know why my drive fails to run "/c0/e252/s7 set good". But the "Invalid status - used for polling command completion" is coming from pystorcli/errors.py line 353. I do not know what is the origin of this text "used for polling command completion". Usually for 255 is see storcli returns "Operation not allowed." So suggesting to change that text in error.py, or print the error text that comes from storcli...
Correction, just caught another example:
root@ubuntu22-cuda:~# storcli64 /c0 /bbu show all J
{
"Controllers":[
{
"Command Status" : {
"CLI Version" : "007.2408.0000.0000 Nov 15, 2022",
"Operating system" : "Linux 5.15.0-25-generic",
"Controller" : 0,
"Status" : "Failure",
"Description" : "None",
"Detailed Status" : [
{
"Ctrl" : 0,
"Status" : "Failed",
"Property" : "-",
"ErrMsg" : "use /cx/cv",
"ErrCd" : 255
}
]
}
}
]
}
For 255 the error message will be different each time, depends what storcli returns
Nice point!
I'm going to do your suggestion.
In the other hand... what show says about your drive? Is unused, jbod or inside a raid? Maybe it is "trully" broken?
The drive state is UBUnsp, also smartctl shows an error, going to replace it
Pushed to develop/master
verified the fix, thanks!!
Hi, Regarding this code in error.py INVALID_STATUS = ( 255, '', 'Invalid status - used for polling command completion.')
It is a a bit misleading, not sure if 255 is same for all cases but i got this one: