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

Fix connection_retries to override retry_limit #16

Open
samshinde opened this issue Sep 11, 2019 · 2 comments
Open

Fix connection_retries to override retry_limit #16

samshinde opened this issue Sep 11, 2019 · 2 comments
Labels

Comments

@samshinde
Copy link

Describe the bug

While trying to override retry_limit with connection_retries to halt the connection attempts with limited no of time and blow up in case of any issue, due to improper merging, the connection_retires (limited number of attempts) never sets and the program continues to run until default retry_limit(mostly 200) causing user to hold for a longer period of time.

To Reproduce
Steps to reproduce the behavior:

Pass an incorrect password in the bootstrap command.

knife bootstrap 40.x.x.x --connection-user azure --connection-password password --connection-protocol winrm  -N test-node

Expected behavior

It should raise an error after a few failed attempts to connect.

Version Information:

  • chef: 15.2.29
  • inspec: 4.10.4
  • winrm: 2.3.2
  • train-winrm: 0.2.4

Additional context
As per the analysis, this can easily be fixed by correcting the merge order in opts in the following way.

        opts = {
          retry_limit: @connection_retries.to_i,
          retry_delay: @connection_retry_sleep.to_i,
        }
        opts = retry_options.merge(opts)
@kekaichinose
Copy link

@btm can I get your eyes on this?

@kekaichinose kekaichinose added Aspect/Correctness Type: Bug It doesn't work as expected labels Sep 16, 2019
@samshinde samshinde mentioned this issue Sep 25, 2019
4 tasks
@kvivek1115
Copy link

@btm & @clintoncwolfe could you please have a look the PR #19 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants