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

rflash to upgrade firmware with ipmitool-xcat #355

Merged
merged 1 commit into from
Nov 5, 2015

Conversation

chenglch
Copy link
Contributor

@chenglch chenglch commented Nov 3, 2015

  • check ipmitool-xcat version (1.8.15 or above)
  • check hpm file
  • upgrade firmware with ipmitool-xcat

@whowutwut
Copy link
Member

@chenglch, does this require documentation or man page updates related to firmware flashing?

@pdlun92 , can you review the changes?

We should plan to merge this in by Thurs 11/5, this week...

@chenglch
Copy link
Contributor Author

chenglch commented Nov 4, 2015

@whowutwut , rflash require documentation or man page, but this request will not include this as rflash depends on ipmitool-xcat 1.8.15 which should be patched and built in xcat-dep. I will commit a another pull request in xcat-dep, then commit the doc or man page.

@whowutwut
Copy link
Member

@chenglch is ipmitool-xcat just regular ipmitool that is built in the xcat-deps package? so we rename it to ipmitool-xcat?

rflash <noderange> [--bpa_acdl]",
rflash <noderange> [--bpa_acdl]
PPC64LE (using BMC Management) specific:
rflash <noderange> [-c] <hpm_file>",
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 only option for rflash (with BMC) the -c option? What does -c stand for?
If other options are specified, do we exit with error?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see below, --check... does that just check the firmware version? Should we change [-c | --check] in the Usage?

- check ipmitool-xcat version (1.8.15 or above)
- check hpm file
- upgrade firmware with ipmitool-xcat
- add thread support for rflash
@chenglch
Copy link
Contributor Author

chenglch commented Nov 5, 2015

@pdlun92, @whowutwut Thanks for your review, I have updated these files again to cover your concerns, besides that I add the thread and lock support to execute rflash

# step 1 power off
my $cmd = $pre_cmd." chassis power off";
$output = xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As both $::RUNCMD_RC and $callback are global variables, will not use multi thread to implement rflash.

@whowutwut
Copy link
Member

I think when we do Perltidy to clean up, we should have a 2nd commit, rather than merge the changes into the single commit. This makes it hard to review formatting changes vs actual code changes. The comment was actually lost in the changes , i saw it in my email notification.

}
# NOTE (chenglch) lanplus should be used for the task of hpm update
# which indicate the bmc support ipmi protocol version 2.0.
my $pre_cmd = "$IPMIXCAT -H $bmc_addr -I lanplus -U $bmc_userid";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change... I like how you made this a variable :-)

I was going to comment on in the first review, but was torn between having a single variable for the command or having it spelled out each time for readability on what steps we are issuing.

@whowutwut whowutwut assigned whowutwut and unassigned zet809 Nov 5, 2015
whowutwut added a commit that referenced this pull request Nov 5, 2015
rflash to upgrade firmware with ipmitool-xcat
@whowutwut whowutwut merged commit 76acb1f into xcat2:master Nov 5, 2015
@whowutwut
Copy link
Member

We reviewed this code and seems okay. I know @zet809 was assigned to this Pull request but I would like to get this into tonight weekly build so we can test with it ASAP.

@chenglch
Copy link
Contributor Author

chenglch commented Nov 6, 2015

As the race condition exists and the thread is not suggested in perl, I add a new pull request #382. This implementation make use of Coro, and AnyEvent library which is very similar to the eventlet in python, but we have to add new dependency for Coro library.

@whowutwut
Copy link
Member

Did you add the threading in the 2nd commit to this Pull request? I think i saw but didn't review very carefully. sorry. Is the threading to speed up the rflash over a noderange?

@daniceexi While it's convenient to ammend the commits, I don't think we should do this in our instructions... in step2....
http://xcat-docs.readthedocs.org/en/latest/developers/github/pull_request.html#changing-pull-request

As a reviewer, it's hard to see the additional changes if the whole file changes, if we have multiple commits, we can just look at the 2nd or 3rd, or 4th one to see the deltas... rather than review again from scratch...

@daniceexi
Copy link
Contributor

@whowutwut
Regarding to use the --amend for commit:

  • Pros
    Easier for later reference (after merge) since all the change for certain task could be found in one commit.

*Cons
As you mentioned, the change for comments cannot be distinguished from the original changes.

Maybe a compromises could be that commit can separated if the change has multiple lines. If the change is trivial, maybe use --amend is better.

@chenglch chenglch deleted the rflash branch November 16, 2015 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants