mirror of
https://github.com/puppetlabs/vmpooler-provider-vsphere.git
synced 2026-03-27 07:57:45 -04:00
Without this change, the circuit breaker was initialized in base.rb but never called in the vsphere provider, so vSphere API failures (TCP timeouts, connection errors) would not trip the circuit open. Changes: - Add with_circuit_breaker helper that calls @circuit_breaker.call if circuit_breaker is configured, otherwise yields directly - Wrap vms_in_pool, get_vm, create_vm, destroy_vm, get_vm_ip_address with with_circuit_breaker so vSphere failures trip the circuit - Replace 'return' with 'next' inside blocks where needed to ensure circuit breaker on_success is properly called on partial results This prevents cascading failures: once the circuit opens after failure_threshold errors, subsequent calls fail fast (CircuitOpenError) instead of waiting for the full TCP timeout (~18s per pool). Resolves: P4DEVOPS-9438 |
||
|---|---|---|
| .. | ||
| vsphere.rb | ||