Commit Graph

45 Commits

Author SHA1 Message Date
Julian Sommer 8188707c91 feat: VPC networking v1 — OVN-based virtual networking for EC2 instances 2026-02-24 14:13:57 +10:00
Julian Sommer 5992d3f056 test: general test coverage improvements across hive packages
Coverage improvements:
- awsec2query: parser byte slice, invalid input, locationName fallback (73% → 83%)
- config: EC2StartInstancesResponse.Respond NATS round-trip, NodeBaseDir, ShardWAL
- daemon: 14 NATS delegate handlers, device allocation, canAllocate (count=0 boundary),
  resource management, shutdown ACK/progress, JetStream WriteServiceManifest,
  fix smallestAllocType to score by both vCPU and memory
- gateway: GenerateEC2ErrorResponse XML validation (fixed no-op assertion),
  DiscoverActiveNodes (5 scenarios), ParseAWSQueryArgs, ParseArgsToStruct (41.6% → 52.1%)
- utils: ConnectNATS (success, token, wrong token, bad address), NATSRequest
- vm: ResetNodeLocalState, PIDFile/QMP, NoGraphic, Serial+Console partial configs,
  NetDevs, ARM64, KVM, full config (68.1% → 91.7%)
2026-02-20 15:09:33 +10:00
Julian Sommer 6bc36455fc test coverage improvements: instance, hiveui, health, utils
Total hive coverage: 54.3% → 55.8% (+1.5%)

- instance/service_impl.go: new test file (generateHostname, RunInstance,
  cloud-init template, constructor)
- hiveui.go: new test file (security headers, gzip middleware, New(),
  Status(), Reload())
- daemon/health.go: extend existing tests (handleInstanceCrash core flow,
  first crash time, unknown instance type, maybeRestart scheduling)
- utils/utils.go: extend existing tests (pidPath all branches, RuntimeDir,
  extractDiskImagePath, WritePidFile error path)
- fix: use smallestAllocType in health tests to avoid CI resource failures
2026-02-20 13:46:31 +10:00
Julian Sommer df0e8a6459 ci: add race detection, fix test race conditions 2026-02-20 09:40:02 +10:00
Julian Sommer 0c65d75371 feat: add coordinated cluster shutdown to multi-node E2E tests (#42) 2026-02-18 13:22:12 +11:00
Ben Duncan 20e67051b0 feat: EC2 GetConsoleOutput via QEMU socket chardev + logfile capture
Replace -serial pty with socket chardev + logfile for serial output:
- Console log written to {RuntimeDir}/console-{instanceID}.log
- Serial socket at {RuntimeDir}/serial-{instanceID}.sock for admin access
- Eliminates PTS extraction deadlock (mulga-lfo) — no more ptsChan
- GetConsoleOutput API handler reads log, returns base64-encoded output
- Per-instance NATS topic ec2.{instanceID}.GetConsoleOutput (no fan-out)
- Admin debugging via: socat -,raw,echo=0 UNIX-CONNECT:serial-*.sock
2026-02-18 06:25:43 +10:00
Ben Duncan dd7bce20e6 Move internal dev docs to private repo, trim CLAUDE.md for public use
Internal development plans, roadmap, and detailed dev process docs moved
to private mulga repo. CLAUDE.md trimmed to remove SSH credentials, node
IPs, and internal deployment workflows. Gosec fixes for file permissions
and unhandled error.
2026-02-17 09:38:28 +10:00
Ben Duncan bb533dfbb6 multi-server tweaks, ec2 health, IAC templates, misc cleanup 2026-02-17 09:10:13 +10:00
Ben Duncan 3095a90090 e2e tests, multi server improvements, doc updates for workflow 2026-02-14 08:50:24 +10:00
Julian Sommer 202fffc8db chore: utils tests 2026-02-11 15:21:29 +10:00
Julian Sommer 5ce3773c42 fix: cryptographically secure ids 2026-02-11 10:51:41 +10:00
Julian Sommer b1762f445c fix: centralise nats connection logic 2026-02-11 10:18:30 +10:00
Julian Sommer 221a1ef258 fix: use typed aws errors 2026-02-11 10:11:37 +10:00
Julian Sommer e95c2536da feat: EIGW (#33) 2026-02-11 11:00:53 +11:00
Julian Sommer 51ffc4c3ab fix: add missing error handling 2026-02-10 10:38:36 +10:00
Julian Sommer e545e81e59 fix: run modernize again 2026-02-10 10:02:06 +10:00
Julian Sommer c5bfedcd98 chore: fmt 2026-02-10 09:10:42 +10:00
Julian Sommer e15c077d3a fix: simplify nats handlers 2026-02-09 10:42:47 +10:00
Julian Sommer 1c2174a10f fix: refactor handlers to use ObjectStore interface (#24) 2026-02-04 16:32:11 +11:00
Julian Sommer 801f0f8135 cleanup dead code 2026-02-04 14:02:48 +10:00
Julian Sommer fca82939f5 feat: attach-volume (#20) 2026-02-04 09:44:54 +11:00
Julian Sommer 1a8e273ac6 fix: use slog instead of log 2026-02-02 10:18:04 +10:00
Ben Duncan 83fd425a60 Latest changes 2026-01-27 08:17:06 +10:00
Julian Sommer 824faa6202 safe int conversions 2026-01-16 04:00:06 +00:00
Julian Sommer e6476ba3b0 minify xml 2026-01-08 03:32:36 +00:00
Julian Sommer b9b8c65e79 (fix) Linter fixes
* Fix go vet mutex copy issues and remove report files from git

* remove redundant nil checks (len of nil slice is 0)

* handle error

* add missing error handling

* run modernize to change interface{} to any

* run other modernise commands

* use crypto instead of rand.Intn
2026-01-06 14:20:56 +11:00
benduncan 803a3d3b35 Fixed pts 0 issue, tweaked install docs, and unit tests on MacOS 2025-11-25 14:49:52 +11:00
Ben Duncan 9fec764945 Trigger github action for fresh build 2025-11-18 10:12:08 +08:00
Ben Duncan 6c4953c72e Fixed UT mistakes 2025-11-18 10:02:09 +08:00
Ben Duncan 191ad659e8 Added start/stop/terminate instance, describe instance support, and improved install docs for development 2025-11-12 21:30:25 +08:00
benduncan eeba6a5bb4 AMI download bootstrap and utility tool 2025-11-10 02:08:29 +11:00
benduncan 1435282cb0 Improved AMI import feature, WIP 2025-11-08 23:32:58 +11:00
benduncan 69151be3bb Util helpers for image/AMI importer 2025-11-05 22:28:05 +11:00
benduncan 6edd8aec14 Added EC2 key-pair functions and updated install docs 2025-10-29 01:09:23 +11:00
benduncan e64c15ca7c Merge branch 'main' of github.com:mulgadc/hive 2025-10-16 15:00:39 +08:00
benduncan 6f1cadb0a3 Daemon logic cleanup 2025-10-16 14:55:06 +08:00
benduncan e6bea9f50a Logic cleanup 2025-10-16 17:54:57 +11:00
benduncan 8336374837 Expanded error coverage 2025-10-09 16:14:53 +08:00
benduncan 20f8920866 Improved validation and unit-testing for framework 2025-10-09 14:07:23 +08:00
benduncan ee9d094968 Debug log improvements 2025-10-08 20:34:46 +08:00
benduncan 2cdb575000 Improved unit-testing and framework for service events 2025-10-08 11:34:53 +08:00
benduncan cc28dd0768 WIP, moving to new gateway model for service control 2025-10-07 20:27:31 +08:00
benduncan ba27e6d588 Basic unit tests, go.mod cleanup for dev, EC2 query parser 2025-10-05 20:06:33 +08:00
Ben Duncan 55707211a1 Hive control plane features to start, stop, provision and manage instances 2025-07-31 22:33:59 +09:30
Ben Duncan a16a54b3b3 Alpha for ebs events to viperblock for mounting nbd volumes 2025-07-29 17:21:07 +10:00