diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-24 12:19:55 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-24 12:19:55 +0300 |
| commit | 0052731668b768fd566a535b222becb8bdd2ee78 (patch) | |
| tree | 558428546d1a30a77b849a752c75331215ff3596 /lib/hyperstack/cli.rb | |
| parent | bd46adb83a948655fe305b10e63cbeec55c7b33c (diff) | |
fix(config): memoize detected_operator_cidr failure to avoid repeated probes
When all public IP probes fail (network down, DNS broken), detect_public_operator_cidr
raises HyperstackVM::Error. The old code did not cache this failure, so every
call to resolved_allowed_cidrs re-ran all probes, compounding slowness.
Add a rescue block in detected_operator_cidr that stores the exception in
@detected_operator_cidr_error and re-raises it. On subsequent calls the cached
error is re-raised immediately, preventing redundant probe retries.
Diffstat (limited to 'lib/hyperstack/cli.rb')
0 files changed, 0 insertions, 0 deletions
