vmpooler-provider-vsphere/lib
Mahima Singh 4a57a270f6 Wire circuit breaker into vsphere provider public methods
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
2026-03-12 16:49:20 +05:30
..
vmpooler/providers Wire circuit breaker into vsphere provider public methods 2026-03-12 16:49:20 +05:30
vmpooler-provider-vsphere (maint) Release prep for version 3.3.4 2023-08-30 09:32:36 -07:00