-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sas2ircu and sas3ircu support #595
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit test must be added as well.
You add "Scripts" in the megaraid catalog task download url, but there is no this item in the option, so it will throw some error when executing.
You could use downloadUrl to get the script from RackHD in runtime, instead of building it in docker. Otherwise it won't work in the discovery workflow who uses discovery docker without this script and tools
@@ -55,6 +55,9 @@ function catalogJobFactory( | |||
*/ | |||
CatalogJob.prototype._run = function() { | |||
var self = this; | |||
this._subscribeRequestProperties(function() { | |||
return self.options; | |||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use linux command job for template rendering, and don't need to modify the basic catalog job here which might bring side effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once upon a time, my raid card could not get catalog info successfully, a certain RackHd developer told me to modify these code. I could not find slack Threads for this.If it is not a bug, I think here code is useless.
@@ -27,6 +27,8 @@ function commandParserFactory(Logger, Promise, _) { | |||
perccliDriveInfo = 'sudo /opt/MegaRAID/perccli/perccli64 /c0 /eall /sall show all J', | |||
perccliVirtualDiskInfo = 'sudo /opt/MegaRAID/perccli/perccli64 /c0 /vall show all J', | |||
perccliVersionInfo = 'sudo /opt/MegaRAID/perccli/perccli64 -v', | |||
sas2ircuInfo = 'sudo python /opt/sas_info.py /opt/sas2ircu', | |||
sas3ircuInfo = 'sudo python /opt/sas_info.py /opt/sas2ircu', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the key word is sas3ircu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, my carelessness .
} | ||
return Promise.resolve({ data: parsed, source: 'megaraid-controllers', store: store }); | ||
} catch (e) { | ||
return Promise.resolve({ source: 'megaraid-controllers', error: e }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the source here still "megaraid-controllers"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not very familiar with sas2008/sas3008 raid card series, if these cards are mega series?
For convenience, I just put these catalogs to "megaraid-controllers",and my python "/opt/sas_info.py" code stdout is also in "megaraid-controllers" json format.
If these cards not mega series, I think it is better renew a catalog for it.
My inspur server has a raid card (type sas2008) which can not support "perccli" and "storccli", and only support "sas2ircu".
so I add "catalog-sasraid" task using
sudo python /opt/sas_info.py /opt/sas2ircu
I put "sas_info.py","sas2ircu","sas3ircu" in docker image ( secure.erase.docker.tar.xz) directory "/opt".
sas_info.py is a python script to parse "sas2ircu" and "sas3ircu" command output to json output.
sas2ircu is a raid command tool which support sas2008 raid card.
sas3ircu is a raid command tool which support sas3008 raid card.