summaryrefslogtreecommitdiff
path: root/lib/hyperstack/vm_lifecycle.rb
AgeCommit message (Collapse)Author
2026-05-25Fix Gemma 4 vLLM startup and improve partial-provisioning UXPaul Buetow
- provisioning.rb: auto-install pytest before pre_start_cmd to fix missing dependency in nightly vLLM images that crashes EngineCore on cupy import - cli.rb: relax active_config_loaders/vm1_alive? to match by vm_id+public_ip instead of requiring status==ACTIVE, so watch/status/test work on VMs that were interrupted mid-provisioning - vm_lifecycle.rb: persist API status/vm_state back to state file during status calls; add 'Provisioning: incomplete' notice when provisioned_at is missing - provisioning_orchestrator.rb: add wait_for_ssh polling before ensure_trusted_host to fix race between SSH daemon readiness and keyscan
2026-05-25refactor(manager): move dry-run/resume logic into VmLifecycle; thin Manager ↵Paul Buetow
facade - Manager is now a thin facade (~160 lines) that delegates VM lifecycle, provisioning, testing, and cleanup to focused collaborators. - Moved replace/resume/dry-run handling and presentation helpers from Manager into VmLifecycle where they belong. - Fixed operator-precedence bug: instance && instance['id']. - Fixed status fallback to return public_ip from state on API error. - Fixed LocalWireGuard delegation bug (removed @local_wireguard.show_local_wireguard call which did not exist; now routes through Manager#show_local_wireguard). - Removed dead code: unused ensure_security_rules and legacy_litellm from VmLifecycle. - ProvisioningOrchestrator: removed spurious show_local_wireguard call and added legacy_litellm_rules cleanup with proper warn_out helper. - Added missing require statements (json, fileutils, provisioning). - Removed dead attr_reader :config from InferenceTester. - Renamed shadowed variable in cleanup_local_access.
2026-05-25refactor(manager): extract focused collaborators from Manager God ClassPaul Buetow
Extract VM lifecycle, SSH execution, WireGuard setup, model switching, end-to-end inference tests, and provisioning orchestration into separate collaborator classes. Manager becomes a thin facade (~80 lines). Also fixes CLI edge-cases: status/model-list when no VMs are active, and threads --vllm/--ollama flags through the provisioning pipeline.