mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
docs: close phase35 d6 event identity gate
This commit is contained in:
1 parent
6e24d17bbb
commit
5119dd97bc
2 files changed
+138
-16
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Current Plan: Phase 35 - Kubernetes-Native Read-Only Operator Foundation
|
||||
|
||||
Status: active, 82% complete. Started on 2026-06-02.
|
||||
Status: active, 88% complete. Started on 2026-06-02.
|
||||
|
||||
Branch: `phase33-testops-failure-hardening`
|
||||
|
||||
@@ -251,7 +251,7 @@ Result:
|
||||
|
||||
Goal: make important transitions visible through standard Kubernetes Events.
|
||||
|
||||
Status: event identity hygiene local PASS; live QA pending.
|
||||
Status: PASS.
|
||||
|
||||
Required Events:
|
||||
|
||||
@@ -282,18 +282,33 @@ Local verification:
|
||||
[done] helm lint charts/seaweed-block
|
||||
```
|
||||
|
||||
Open D6 validation:
|
||||
QA signoff:
|
||||
|
||||
```text
|
||||
[pending] live QA should run repeated write-mode reconciles for a persistent
|
||||
blocked volume and verify Event object count stays bounded.
|
||||
[pending] live QA should verify Event reason/type alignment for:
|
||||
first_volume_verified -> Normal
|
||||
csi_node_image_pull_failed -> Warning
|
||||
transparent_host_path_recovered -> Normal
|
||||
evidence_stale/status_endpoint_unreachable -> Warning
|
||||
[pending] CleanupRequired Event remains pending until cleanup residue evidence
|
||||
is projected as a ManagedVolume condition.
|
||||
internal/docs/qa-assignments/phase35-d6-stable-event-identity-qa-signoff.md
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
[done] three repeated write-mode reconciles against a persistent
|
||||
wal_integrity_fault volume all exited 0.
|
||||
[done] distinct Event object count stayed at 1 across all three reconciles.
|
||||
[done] Event name is stable per object/type/reason:
|
||||
pvc-walfault-warning-wal-integrity-fault.
|
||||
[done] status stayed blocked/Ready=False with no Ready=True.
|
||||
[done] SA boundary stayed status/events only.
|
||||
```
|
||||
|
||||
Non-blocking follow-ups:
|
||||
|
||||
```text
|
||||
[open] 409 dedupe does not patch count++/lastTimestamp; CRD status carries
|
||||
freshness, so this is optional telemetry polish.
|
||||
[open] same type+reason conditions still collapse to one Event; CRD conditions
|
||||
carry the detailed Ready/Blocked split, so this is acceptable for D6.
|
||||
[open] CleanupRequired Event remains pending until cleanup residue evidence is
|
||||
projected as a ManagedVolume condition.
|
||||
```
|
||||
|
||||
## D7: Read-Only Boundary Gate
|
||||
@@ -392,13 +407,19 @@ finished plan moved under internal/docs/finished-plans/
|
||||
idempotent 409 handling instead of producing timestamp-suffixed Event spam.
|
||||
Scoped Go tests and Helm lint pass. Live QA and full reason/type coverage are
|
||||
pending.
|
||||
- 88%: D6 live QA passed on `1b22ccc`. Three repeated write-mode reconciles
|
||||
against a persistent `wal_integrity_fault` blocked volume all exited 0 and
|
||||
left exactly one distinct Kubernetes Event named
|
||||
`pvc-walfault-warning-wal-integrity-fault`. Status remained
|
||||
blocked/Ready=False and RBAC remained status/events only.
|
||||
|
||||
## Next Step
|
||||
|
||||
Ask QA to run the D6 live Event hygiene gate on the current branch tip. The
|
||||
main proof is repeated write-mode reconcile against a persistent blocked volume:
|
||||
the second reconcile should exit 0 and not grow a new Event object for the same
|
||||
object/type/reason.
|
||||
Run D7 read-only boundary close. Re-audit the operator-status service account
|
||||
and code path now that real status writes and Events are enabled: it may patch
|
||||
only CRD status and create Events, and it must not mutate PVC/PV/workloads,
|
||||
storage classes, Secrets, Helm releases, iSCSI sessions, multipath maps, or
|
||||
hostPath data.
|
||||
|
||||
```text
|
||||
VolumeReady -> Normal
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
# QA Sign-off - Phase 35 D6 Stable Operator Event Identity
|
||||
|
||||
Verdict: **PASS, no findings.** Repeated write-mode reconciles against a
|
||||
persistent blocked volume now produce a **single, stable** Kubernetes Event that
|
||||
does not grow per reconcile. Three consecutive one-shot reconciles all exit 0
|
||||
and the distinct Event count stays at **1**. This closes the event-hygiene
|
||||
follow-up filed in the D4/D5 sign-offs (the timestamped name that minted a new
|
||||
Event every iteration).
|
||||
|
||||
Date: 2026-06-04
|
||||
|
||||
Source commit: `1b22ccc phase35: stabilize operator event identity`
|
||||
(branch `phase33-testops-failure-hardening`; HEAD, on top of
|
||||
`d6506dc docs: close phase35 d5 stale status gate`)
|
||||
|
||||
## The fix (verified in code)
|
||||
|
||||
`kubernetesEventName` dropped its `at time.Time` parameter and the
|
||||
`.UnixNano()` suffix. The name is now stable per **object + type + reason**:
|
||||
|
||||
```go
|
||||
func kubernetesEventName(event OperatorKubernetesEvent) string {
|
||||
base := kubernetesName(event.InvolvedObject.Name + "-" + event.Type + "-" + event.Reason)
|
||||
if base == "unknown-volume" { base = "sw-block-event" }
|
||||
return base
|
||||
}
|
||||
```
|
||||
|
||||
So the same persistent condition resolves to the same Event name on every
|
||||
reconcile → the existing idempotent `409 Conflict` handling (D4 `a2714c8`)
|
||||
deduplicates it instead of creating a fresh Event. Including `event.Type` keeps
|
||||
`Normal` and `Warning` for the same object/reason on distinct names.
|
||||
|
||||
Only `core/ops/kubernetes_status_writer.go` changed (product) vs `a2714c8`;
|
||||
fresh images built + imported to m01/m02/tp01. `go test ./core/ops` ok.
|
||||
|
||||
## Live results — repeated reconcile, no Event growth
|
||||
|
||||
Persistent blocked volume driven via a one-volume `cluster-evidence.json`
|
||||
(`pvc-walfault`, `reason=wal_integrity_fault`), one-shot reconcile run **3×**
|
||||
inside the operator-status pod (as the constrained SA):
|
||||
|
||||
```text
|
||||
RUN #1 exit=0 | operator_status=write_status volumes=1 events=2 | distinct_events=1
|
||||
RUN #2 exit=0 | operator_status=write_status volumes=1 events=2 | distinct_events=1
|
||||
RUN #3 exit=0 | operator_status=write_status volumes=1 events=2 | distinct_events=1
|
||||
```
|
||||
|
||||
The one Event, after all three runs:
|
||||
|
||||
```text
|
||||
NAME TYPE REASON COUNT
|
||||
pvc-walfault-warning-wal-integrity-fault Warning wal_integrity_fault 1
|
||||
```
|
||||
|
||||
| Check | Result | Evidence |
|
||||
|---|---|---|
|
||||
| Repeated reconcile exits 0 | PASS | RUN #1/#2/#3 all `exit=0` |
|
||||
| Second/third reconcile creates **no new** Event for same object/type/reason | PASS | `distinct_events` stays `1` across all runs |
|
||||
| Event name stable, no timestamp suffix | PASS | name = `pvc-walfault-warning-wal-integrity-fault` (object-type-reason) |
|
||||
| Type embedded (Normal vs Warning distinct names) | PASS | `…-warning-…`; a Normal event for the same object/reason would be `…-normal-…` |
|
||||
| Status surface still correct | PASS | `status=blocked reason=wal_integrity_fault Ready=False Blocked=True`, `Ready=True` count 0 |
|
||||
| SA mutation boundary unchanged | PASS | `create events: yes`, `patch …/status: yes`; `patch swblockvolumes (spec): no`, `create pods: no`, `delete pvc: no` |
|
||||
|
||||
Before this fix (D4/D5), the name embedded `observedAt.UnixNano()`, so three
|
||||
reconciles would have left **three** distinct Events for the same condition.
|
||||
Now it is one.
|
||||
|
||||
## Minor observations (non-blocking, not regressions)
|
||||
|
||||
1. **Dedupe, not aggregate.** The repeated Event keeps `COUNT=1` and its
|
||||
original `lastTimestamp` — the `409` short-circuits before any update. The
|
||||
D6 goal (no unbounded Event growth) is fully met; if richer telemetry is ever
|
||||
wanted, the conventional core/v1 pattern is to `PATCH count++` /
|
||||
`lastTimestamp` on the 409 path so a long-running blocker reads as "seen N
|
||||
times, still active." The CRD `.status.observedAt` already carries live
|
||||
freshness, so this is optional polish, not a gap.
|
||||
2. **Within one reconcile, the two same-type+reason conditions still collapse
|
||||
to one Event.** A blocked volume emits `Ready=False` and `Blocked=True`, both
|
||||
`Warning` + `wal_integrity_fault`, so they share the (now stable) name and
|
||||
dedupe to a single Event (`events=2` reported, 1 distinct). This is the same
|
||||
D4 nuance #1 and is acceptable — the CRD status conditions carry both Ready
|
||||
and Blocked detail; the Event is a breadcrumb. D6 intentionally only splits
|
||||
on `type` (Normal vs Warning), which is the meaningful split.
|
||||
|
||||
## Lab State
|
||||
|
||||
Clean — `SwBlockVolume`/`SwBlockCluster` stubs deleted, the Event deleted, helm
|
||||
uninstalled, both CRDs deleted; 0 sw-block pods, 0 CRDs, 0 iSCSI sessions.
|
||||
|
||||
## Bottom Line
|
||||
|
||||
- **D6 PASS.** Operator Event identity is stable per object+type+reason; repeated
|
||||
write-mode reconciles against a persistent blocked volume exit 0 and produce
|
||||
no new Event objects (distinct count stays 1), the status surface stays
|
||||
correct, and the SA still has zero storage/workload mutation power.
|
||||
- This **closes the D4/D5 event-hygiene carry-forward** (per-reconcile Event
|
||||
growth). The remaining items are optional polish only: count++/lastTimestamp
|
||||
aggregation on the 409 path, and per-condition Event splitting — neither
|
||||
blocks D6 or anything downstream.
|
||||
- **D6 can close.**
|
||||
Reference in new issue
Block a user