You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check_powershell runs a powershell command and evaluates the output and return values to determine success or failure. To provide the best flexibility, this resource provides parameters to retry executions.
Add ruby-pwsh to the opv module's dependencies. (.sync.yml; pdk update)
Create new check_powershell resource.
Update check_powershell type to have the following attributes:
command, namevar, String: The powershell command to run.
expected_exitcode, parameter, Array[Number]: an array of acceptable exit codes. Defaults to [0]
output_matcher, parameter, Regexp: a call is considered a success if its output matches this regular expression. Defaults to //
execution_timeout, parameter, Numeric: number of seconds for a single execution to wait for a response to return a success before aborting, defaults to 60
retries, parameter, Integer: number of requests to make before giving up, defaults to 1
backoff, parameter, Numeric: initial number of seconds to wait between requests, defaults to 10
exponential_backoff_base, parameter, Numeric: exponential base for the exponential backoff calculations, defaults to 2
max_backoff, parameter, Numeric: an upper limit to the backoff duration, defaults to 120
timeout, parameter, Numeric: number of seconds allocated overall for the check to return a success before giving up, defaults to 600
Update the check_powershell provider to use the above attributes to execute the command up to retries number of times with success being defined as having one of the expected_statuses and the output of the command matching output_matcher while taking into account execution_timeout.
Update the check_powershell provider to wait for backoff ** (exponential_backoff_base * (number_of_attempt - 1) seconds between attempts (up to max_backoff), but aborting completely after timeout seconds if no successful request could be made. Investigate combining this retry implementation with the one in check_http and integrate into apache::vhost #1.
Update the check_powershell provider to log detailed messages at the debug level of execution, output and backoff waits.
Create a PR on the puppetlabs/chocolatey module to integrate the check_powershell into chocolatey::install to verify that choco can be executed. Do not merge that PR as this is still experimental work.
Each change needs to be accompanied with appropriate unit and (changes to) acceptance tests proving the functionality.
The text was updated successfully, but these errors were encountered:
Added required dependencies to the sync.yaml file
Created the check_powershell resource type
Created the check_powershell resource provider
Currently testing the provider
check_powershell
runs a powershell command and evaluates the output and return values to determine success or failure. To provide the best flexibility, this resource provides parameters to retry executions.Add ruby-pwsh to the opv module's dependencies. (
.sync.yml
;pdk update
)Create new
check_powershell
resource.Update
check_powershell
type to have the following attributes:command
, namevar, String: The powershell command to run.expected_exitcode
, parameter,Array[Number]
: an array of acceptable exit codes. Defaults to[0]
output_matcher
, parameter, Regexp: a call is considered a success if its output matches this regular expression. Defaults to//
execution_timeout
, parameter, Numeric: number of seconds for a single execution to wait for a response to return a success before aborting, defaults to60
retries
, parameter, Integer: number of requests to make before giving up, defaults to1
backoff
, parameter, Numeric: initial number of seconds to wait between requests, defaults to10
exponential_backoff_base
, parameter, Numeric: exponential base for the exponential backoff calculations, defaults to2
max_backoff
, parameter, Numeric: an upper limit to the backoff duration, defaults to120
timeout
, parameter, Numeric: number of seconds allocated overall for the check to return a success before giving up, defaults to600
Update the
check_http
provider to use theinsync?
feature from Allow custom insync? checking for resources puppet-resource_api#225 to be quiet (in sync) when the check succeeds, and report a regular error otherwise. See a7f60f2 for an example.Update the
check_powershell
provider to use the above attributes to execute thecommand
up toretries
number of times with success being defined as having one of theexpected_statuses
and the output of the command matchingoutput_matcher
while taking into accountexecution_timeout
.Update the
check_powershell
provider to wait forbackoff ** (exponential_backoff_base * (number_of_attempt - 1)
seconds between attempts (up tomax_backoff
), but aborting completely aftertimeout
seconds if no successful request could be made. Investigate combining this retry implementation with the one in check_http and integrate into apache::vhost #1.Update the
check_powershell
provider to log detailed messages at the debug level of execution, output and backoff waits.Create a PR on the puppetlabs/chocolatey module to integrate the
check_powershell
intochocolatey::install
to verify that choco can be executed. Do not merge that PR as this is still experimental work.Each change needs to be accompanied with appropriate unit and (changes to) acceptance tests proving the functionality.
The text was updated successfully, but these errors were encountered: