fix: enable WinRM retry for transient WSMAN errors#3402
Open
raman1236 wants to merge 1 commit intopuppetlabs:mainfrom
Open
fix: enable WinRM retry for transient WSMAN errors#3402raman1236 wants to merge 1 commit intopuppetlabs:mainfrom
raman1236 wants to merge 1 commit intopuppetlabs:mainfrom
Conversation
Change the WinRM connection retry_limit from 1 (effectively disabling retries) to 3 with a 10 second delay. This matches the WinRM gem defaults and prevents bolt plans and tasks from failing due to transient WSMAN errors (e.g. ERROR CODE: 1018). Fixes puppetlabs#3385
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enable WinRM retries for transient WSMAN errors by increasing the retry_limit from 1 to 3.
Problem
The WinRM connection in Bolt explicitly sets
retry_limit: 1, which effectively disables the automatic retry mechanism provided by the WinRM gem. When a transient WSMAN error occurs (e.g. ERROR CODE: 1018), the connection fails immediately instead of retrying.The WinRM gem's default retry behavior (3 retries with 10 second delays) is specifically designed to handle these transient errors, but Bolt overrides it.
Fix
Change
retry_limitfrom1to3and addretry_delay: 10to match the WinRM gem defaults. This allows the connection to recover from transient WSMAN errors without failing the entire task or plan.Fixes #3385