update documents
This commit is contained in:
parent
c705cadadc
commit
d70bf6a402
51 changed files with 995 additions and 1997 deletions
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
- [x] **#1 P0-1a: Add HostConfig + Cluster fields to models**
|
||||
- `models/clusters.go` — Added `HeartbeatInterval`, `Vcpus`, `InactiveHeartbeatCount` to `ClusterInfo`
|
||||
- `models/hosts.go` — Changed `HostStateStr(0)` from `"OK"` to `"UNKNOWN"`
|
||||
- `models/hosts.go` — This task changed `HostStateStr(0)` from `"OK"` to `"UNKNOWN"`; commit `d7afd72e` ("fix front end issues") later reverted that branch, so `HostStateStr(0)` currently returns `"OK"` again
|
||||
- `models/clusters_test.go` — New: verifies new fields serialize + existing fields unchanged
|
||||
- `models/hosts_test.go` — New: verifies `HostStateStr` for zero, flags, non-flag, combined
|
||||
- All 15 tests passing
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
- `include/xceapi.h` — Added `xce_hostctrl()` declaration
|
||||
- `include/request.h` — Added `xce_hostctrl_req()` declaration
|
||||
- `lib/client.c` — Implemented `xcecli_hostctrl()`
|
||||
- `lib/xceapi.c` — Implemented `xce_hostctrl()` with `cbuf_get()` wait
|
||||
- `lib/xceapi.c` — Implemented `xce_hostctrl()` with `cbuf_get()` wait (a later, unrelated repo-wide change converted this to `cbuf_timedget()` with a 10s deadline)
|
||||
- `lib/request.c` — Implemented `xce_hostctrl_req()` (validates HOST_OPEN/HOST_CLOSE only, rejects HOST_TAG/UNTAG)
|
||||
- `lib/helper.c` — Added `Request_body_hostctrlmsg` case to `xce_request_body()` + `xce_request_msg_name()`
|
||||
- `controller/cluster.c` — Added `OPCode_hostcontrol` case → `do_hostcontrol_op()`
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
- All tests passing (`controllers` package)
|
||||
|
||||
- [x] **#9 P0-2d: Update stub.go with new function stubs**
|
||||
- `backend/stub.go` — Added `StartHeartbeat(_ context.Context){}`, `SetHeartbeatInterval(_ int){}`, `EvalSelectForHost(_, _ string) error` (returns `errNoCGO`), `Cleanup(){}`, added `"context"` to imports
|
||||
- `backend/stub.go` — Added `StartHeartbeat(_ context.Context){}`, `SetHeartbeatInterval(_ int){}`, `EvalSelectForHost(_, _ string) error` (returns `errNoCGO`), `Cleanup(){}`, added `"context"` to imports (`SetHeartbeatInterval` was later pulled out of `stub.go`/`clib.go` entirely into the shared, no-build-tag `backend/heartbeat.go`)
|
||||
- `backend/stub_funcs_test.go` — 4 TDD tests: `TestStartHeartbeat_StubNoOp`, `TestSetHeartbeatInterval_StubNoOp` (3 edge values), `TestEvalSelectForHost_StubErrNoCGO`, `TestCleanup_StubNoOp`
|
||||
- All backend tests passing
|
||||
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
## P1-3: Heartbeat Keep-Alive
|
||||
|
||||
- [x] **#13 P1-3: Heartbeat keep-alive implementation**
|
||||
- `backend/clib.go` — Added `heartbeatIntervalSecs int32` (default 30), `SetHeartbeatInterval()`, `heartbeatFn` var, `StartHeartbeat(ctx context.Context)` goroutine with ticker
|
||||
- `backend/clib.go` — Added `heartbeatIntervalSecs int32` (default 30), `SetHeartbeatInterval()`, `StartHeartbeat(ctx context.Context)` goroutine with ticker (within the same P1-3 commits, `heartbeatIntervalSecs`/`SetHeartbeatInterval()`/the tick loop were extracted into the shared, no-build-tag `backend/heartbeat.go` for CGO-free testability; `clib.go` now passes an inline closure to `runHeartbeat` rather than a named `heartbeatFn` var)
|
||||
- `backend/handler.go` — `OnClusterUpdated` calls `SetHeartbeatInterval(cluster.HeartbeatInterval)` after store update (zero-preserve: skips if interval==0)
|
||||
- `cmd/main.go` — Calls `backend.StartHeartbeat(ctx)` after `backend.RegisterToBackend(...)`
|
||||
- `backend/handler_test.go` — Tests for heartbeat interval update, zero-preserve, timer leak, test drain, store consistency
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
- Input safety — comment limit 512 chars; select expression limit 4094 chars (1024 reduction deferred to P1-2b)
|
||||
- **CGO fix applied:** extracted `static` val helpers from `clib.go` preamble into `val_helpers.h` shared header; `convert.go` now includes it; added explicit `float64()` cast for `C.double` return
|
||||
|
||||
- [x] **#15 Integration test suite** — see [`apiserver-backend-integration-test-plan.md`](apiserver-backend-integration-test-plan.md)
|
||||
- [x] **#15 Integration test suite** — plan doc `apiserver-backend-integration-test-plan.md` was later removed from `src/docs/` in an unrelated cleanup commit; see the test files below for current coverage
|
||||
- `backend/integration_test.go` — §1 (config push), §3 (resource values), §4 (heartbeat), §5 (cross-feature): 17 tests
|
||||
- `controllers/integration_test.go` — §2 (host control), §6 (RBAC), §8 (input safety): 17 tests + 1 skip (§8.1 pending P1-2b)
|
||||
- `store/concurrency_test.go` — §7 (thread safety): 3 concurrent-access tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue