-
Notifications
You must be signed in to change notification settings - Fork 260
CNI Linux: Add 10 seconds timeout for ExecuteCommand #1336
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
Conversation
809d45d to
d727406
Compare
thatmattlong
left a comment
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.
LGTM
|
Any reason to do this only for linux and not windows? |
The livesite was seen/debugged in Linux CNI. Second, Tamilmani pointed out that his observation is that these system commands finish much faster in Linux (order of couple of seconds) and on windows take longer anyway. So, it is just safer to add timeout to Linux. |
tamilmani1989
left a comment
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.
lgtm
In addition to what vipin said, in windows we use hns calls lot than exec cmds. we have a repair item to add timeout for hns calls |
tamilmani1989
left a comment
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.
lgtm
* CNI Linux: Add 10 seconds timeout for ExecuteCommand * ran gofmt on changed file * Fix lint error * Added unit test for ExecuteCommand for linux * Moved timeout to execlient. It has default timeout and method to override it now * reduce timeout values in unit tests Co-authored-by: msvik <msvik@users.noreply.github.com> Co-authored-by: VK <misvik@users.noreply.github.com>
Reason for Change:
Currently when CNI does a system call, it doesn't have a timeout. It sometimes hangs or waits a long time before it fails leading to other CNI instances getting blocked. This PR adds 10 second timeout for system calls so CNI can timeout and let other CNI instances get through it.
Issue Fixed:
It fixes the live site repair item ADO # 13142210.
Requirements:
Notes: