Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add sas2ircu and sas3ircu support #595

wants to merge 1 commit into from

Conversation

lkx007
Copy link

@lkx007 lkx007 commented May 18, 2018

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.

@lkx007 lkx007 closed this May 21, 2018
@lkx007 lkx007 reopened this Jun 6, 2018
@lanchongyizu
Copy link
Member

@iceiilin @pengz1 @leoyjchang

Copy link
Member

@iceiilin iceiilin left a 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;
});
Copy link
Member

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.

Copy link
Author

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',
Copy link
Member

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

Copy link
Author

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 });
Copy link
Member

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"?

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants