Closed crhan closed 7 years ago
Sorry, I don't have a ruby18 env. And I finally find that Ruby18 cannot support this kind of operation. see here
err... timeout working for sleep call but not working for real ipmitool call. still trying
I am not sure this is required since the commands that are called should have a timeout built into them. Furthermore I would rather use the timeout argument within the command if any rather than impose a command to complete in the given timeout period.
Ipmitool
does not have a configurable timeout options. and one ipmi request over lan will complete in 1 second in average, so that's why I need a timeout implementation in the ruby lib.
And my timeout implementation is very tricky(using open3 block, thread join and process group), but works anyway. Complete this feature for online use is the first thing.
Wouldn't this timeout functionality put the process in a blocking state while waiting for response?
Sounds like perform this action in a async way? Good point but too hard for me, is there any example to implement that?
This timeout mechanism work so well in my situation. Unless your bmc is 100% perfectly functional, this will help a lot.
Will take a look, probably a good idea to have a timeout. IPMI and BMC are so chaotic sometimes.
@crhan any chance you can rebase this against the current master and redo the PR to merge into master?
err. Sorry, I have no time to spent on it right now. And this crhan/rubyipmi@c75d9177 is my running version on production environment, covering over 100,000 machines. And it works fine(just for the ipmitool part) .
@crhan I am going to update the code to support timeouts using popen as there are other things I need to support. Have you had any issues on your repo with changing to popen?
nope, it works fine for the past year. and the timeout commit is precisely at https://github.com/crhan/rubyipmi/commit/16873514b12d1ed18b1a5bcdcd630205b47bd24c
have a look
I think a timeout is something that we should add. This pr is old so I am closing for now. But we should be able to add this back in a future request. created #42 to track this.
BMC are unstable and vulnerability, so it is important to add timeout to ipmi call.