ipmitool lan set command incorrect wait implementation #287
Comments
Not sure why, GitHub loves Firefox more. |
@PengWang-SMARTM Thanks for reporting. If you can do it, it would be better to submit a pull request instead of attaching a patch, let alone describing the change in words. Submitting a pull request would definitely speed up the change integration process. |
Never worked with GitHub before. Let me try. |
Is there a quick start manual to ensure I'll follow a correct process? |
$ git push -u origin bugfix/287-fix-lan-set-wait-position The github help is slightly different from the latest Git GUI I just installed. I'm not sure if I did thing right or not. But got the error messages above when I'm trying to push it. I'll try to figure it out another time. By the way, the checked out code from master is slightly different from the 1.8.18 source, and it seem all Makefile.in are not there and some other configure/make files. Something not quite right. Anyway, I'll give it try again later. |
@PengWang-SMARTM That's because you cloned from https instead of ssh |
@PengWang-SMARTM you can't directly push to ipmitool source code. Please clone this project, make your changes, push it to your cloned code, then submit a pull request. |
This might help: |
The lan set command result should be verified after commit write per IPMI specification. Resolves ipmitool#287 Signed-off-by: peng.wang@smartm.com <peng.wang@smartm.com>
Thank you all for the tutoring, and I believe I went through the process, and submitted change requests. However, this wiki how to contribute may need some updates as well.
|
Since I've pushed the changes and created a pull request, I'd assume I should be able to safely remove my local branch. I tried the following, but failed. Any suggestions?
I plan to use the same directory for my another issue/branch. I want to delete this one to avoid any possible confusion. I wish this could be part of your how-to wiki so new comer won't need to searching around anymore. |
@PengWang-SMARTM Oh, sorry about git co. That's an alias that I use in my setup and I just put it there thoughtlessly. Will fix it and will also try to address other difficulties, although I wouldn't like to transform ipmitool contributions guide into a github or git howtos that are already plentifully available on the net. |
@AlexanderAmelkin I understand your decision. However, from my point of view, the purpose of this "ipmitool contributions guide" is to help people make a contribution, not only the coding style, but also how to use the github to submit contributions. In deed, this guide is pretty neat and easy to follow except the very first step, how to fork and then clone. I went into trouble at the beginning because Git GUI starts from clone. New dummy contributors like me would appreciate if the guide can be updated by just adding a sentence mentioning the fork icon on the web page, and adding the clone command. Now I know how to do it correctly. Therefore, it's not a problem for me to keep the guide as is. I just want to help other people who is willing to help. For the local cleanup after created pull request, I can simply delete the directory and create another from scratch. A little stupid and less graceful, but should work always. I don't really have an interest to spend too much time and learn how to use the git for only submitting some patches to this project. |
I have to admit I agree with @AlexanderAmelkin I don't think the purpose of the guide should be how to use GitHub. There are many documents/guides on how to use GitHub. |
I feel it would not hurt anything to mention the fork icon and add a clone command to the guide under "Create a fork on GitHub and clone it to your machine". I don't think it will make the guide like a github manual. Actually, other steps all have examples, except this very first step. It makes an old newbie like me don't know where to get start. However, if you disagree, it's fine to me. I just feel sad for those who are willing to contribute but scared away by learning how to use Git. By the way, even though I know what I need to do, I still don't think I know how to use Git as what I know about ClearCase. Asking people to learn Git is totally unnecessary to make a contribution here. |
I ran into an issue that "lan set ipaddr" command takes an unusual long time to finish with a warning saying "not match". I turned on debug and found out that's because ipmitool tries to read and verify the set result before issuing the "commit write".
I reviewed the source code, and I'd believe the current ipmitool does not expect an IPMC implementation that follows the IPMI specification like ours. The specification requires the lan parameter to be written upon the "commit write" if rollback feature is implemented. That is, the new parameter will not take effect until "commit write". Before the "commit write", the get command will always get the current setting rather than the new one from the set command. That's the problem that I'm running into.
I attached the highlighted specification and the proposed patch. The following is a brief explanation about the changes.
In the current ipmi_lanp.c implementation, the overall "set" procedure is,
Line 438: set_lan_param():
My proposed change moves the wait and check/verify the result step to the end following the unlock as below. Therefore, there should be no functional change effects.
set_lan_param():
Someone may argue the possibility of having an IPMC implementation that cannot take "commit write"/"set complete" command immediately. If we need to handle this situation, retry of "commit write"/"set complete" can be added.
Please let me know if further information / discussion is needed. Thanks!
Sorry that for some unknown reason, I cannot upload anything here. I'll try again later with a different browser.
The text was updated successfully, but these errors were encountered: