-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add timeout for rexec's get_password (#3484)
### What I did I added a timeout setting for the get_password function in rexec module so that automatic pipelines that does not expect password input will not get blocked. The current timeout setting is 10 sec. #### How I did it Add a SIGALRM signal before waiting for password input. #### How to verify it Run a "show ip bgp summary" on SONiC Chassis Supversior and does not input password until it times out. #### Previous command output (if the output of a command-line utility has changed) Before adding such a mechanism, if you do not input password when run "rexec -c <cmd>" you will be blocked at the following output: ``` Since the current device is a chassis supervisor, this command will be executed remotely on all linecards Password for username 'XXX': ``` #### New command output (if the output of a command-line utility has changed) After adding such a mechanism, if you do not input password when run "rexec -c <cmd>" you will see a timeout message after 10 seconds. ``` Since the current device is a chassis supervisor, this command will be executed remotely on all linecards Password for username 'XXX': Aborted! Timeout when waiting for password input. ```
- Loading branch information
Showing
2 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters