Skip to content
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 for rexec's get_password (#3484) #92

Merged
merged 1 commit into from
Aug 21, 2024

Commits on Aug 21, 2024

  1. 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.
    ```
    BYGX-wcr committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    a37ab17 View commit details
    Browse the repository at this point in the history