-
Notifications
You must be signed in to change notification settings - Fork 173
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
rspconfig admin_password for OpenBMC #4371
Conversation
|
@xuweibj At what level of the FW code is this enabled? Could we also add in UT cases for this, I have PR #4379 If @hu-weihua merges it, we can add in the basic UT cases that you printed above and build up the automation. If we do something to set/change this, we should set it back to what it was at the end of the testing... Or just not automate that. |
@@ -310,6 +310,14 @@ my %status_info = ( | |||
RSPCONFIG_GET_RESPONSE => { | |||
process => \&rspconfig_response, | |||
}, | |||
RSPCONFIG_PASSWD_REQUEST => { |
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.
What do we use "PASSWD_REQUEST" as the name for this? The action is "SetPassword" , should it be RSPCONFIG_SET_PASSWD
?
@@ -2477,9 +2503,20 @@ sub rspconfig_response { | |||
} | |||
} | |||
|
|||
if ($node_info{$node}{cur_status} eq "RSPCONFIG_PASSWD_VERIFY") { | |||
if ($status_info{RSPCONFIG_PASSWD_VERIFY}{argv} ne $node_info{$node}{password}) { | |||
xCAT::SvrUtils::sendmsg("Please input correct BMC password.", $callback, $node); |
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 always try to avoid using "Please" if possible.
Suggest: Current BMC password is incorrect, cannot set the new password.
if ($node_info{$node}{cur_status} eq "RSPCONFIG_SET_RESPONSE") { | ||
if ($response_info->{'message'} eq $::RESPONSE_OK) { | ||
xCAT::SvrUtils::sendmsg("BMC Setting Hostname...", $callback, $node); | ||
if (defined $status_info{RSPCONFIG_SET_RESPONSE}{argv} and $status_info{RSPCONFIG_SET_RESPONSE}{argv} eq "password") { |
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.
Could we auto generate this message based on the {argv} passed in? If it's hostname
or password
. The danger here is if we get into this call with something else as argv... not hostname or password... it will always print Setting Hostname
and we won't know what value was passed in.
But if we take argv and run it though ucfirst
we can automatically generate the msg.
927cbce
to
aaf3c0f
Compare
@whowutwut Yes, it's enabled. The output in the description is my UT result. |
@xuweibj What I meant for the UT is to create automation UT cases. I'd like the developers to start creating these instead of relying on FVT team to handle all the burden. On each FW update that we get, we have to have a regression suite to make sure we didn't regress.. (As seen in #4378) and things are working OK. Manually running it cannot be the solution. If you can create PR to include the UT and associate it with #4196, that would be great! |
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 OK with these changes.
#4196
When test, encountered that received "500 Internal Error" from OpenBMC. But run again success.