-
Notifications
You must be signed in to change notification settings - Fork 32
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 timeout to runcmd #17
Conversation
…nd location lookup
and i fix it~~
Bugfix: bmc.info has different results with different models.
-- added vagrant file to automatically install freeipmi and test vm
to enable set the bash environment variable: rubyipmi_debug=true -- fixed a bug where the command was returning the value and not the result -- fixed a bug where bmc-config was not raising an error when errors occured
…rom pull request.
1. ignore Gemfile.lock for multi ruby CI support 2. add ruby20 to travisCI 3. use 'bundler/gem_tasks' instead of jeweller 4. use rcov under ruby19 5. use simplecov in ruby19 & ruby20
ruby20 compability improve
1. default 5 seconds timeout 2. raise IpmiTimeout after @timeout seconds 3. make the spec all pass
remove a ruby19 new syntax
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. |
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 crhan@1687351 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.