Skip to content

[Bug] Operator: LogSet Ready=False / NoEnoughReadyStores while availableStores=2 (1 of 3 Down) #26059

Closed

Description

Environment

Field Value
Cluster / Namespace mo-chaos-main-aa2a02c-202607172328
LogSet name mo-chaos-regression-dis
Spec replicas: 3, storeFailureTimeout: 10m0s, Log resources 2Gi
Operator matrixone ns deploy moop-shanghai-ci-matrixone-helm-operator-matrixone-operator
MO image (pods) commit-826a3e3d2
Analysis 2026-07-23 ~11:00 CST

Scope: matrixone-operator LogSet readiness / sync logic. With majority of stores Up, LogSet CR still reports not Ready.

Out of scope (sibling MO issue): CN/DN waitAnyShardReady + dials to deleted log-0 — runtime HA bug in matrixone.
Out of scope: chaos task_mem_log 2GB vs 2Gi limit (workflow trigger that produced the single Down store).

Summary

Kubernetes / CR snapshot while only one Log pod is unhealthy:

Store Pod phase Operator classification
log-1 Ready true availableStores Up
log-3 Ready true availableStores Up
log-2 CrashLoopBackOff failedStores Down
status.conditions:
  - type: Synced
    status: False
    message: reconcile error: logset is not synced or has unready members, retry after 15s
  - type: Ready
    status: False
    reason: NoEnoughReadyStores

For replicas=3, Raft/quorum majority is 2. Having 2 Up + 1 Down should be an acceptable degraded but Ready LogSet (or at least a distinct condition such as Degraded=True with Ready=True), not NoEnoughReadyStores.

Preferred root-cause chain:

  1. Symptom: kubectl / status shows Ready=False, NoEnoughReadyStores with len(availableStores)=2.
  2. Mechanism: Reconcile treats “enough” as available == replicas (all members) or otherwise refuses Ready while any member is unready / unsynced.
  3. Root cause (fixable): Readiness predicate too strict for HA LogSet; does not implement majority-based Ready (or does not honor storeFailureTimeout to drop a stuck CrashLoop member from the “required” set).

Why this matters

  • Operators, CI gates, and humans treat LogSet Ready as “log plane is usable”.
  • False NotReady with a live majority masks true health and can block or confuse rolling / dependent reconcile.
  • Complements (does not replace) the MO runtime bug where CN/DN still fail with 2/3 Up.

Evidence (json excerpt)

replicas: 3
availableStores:
  - podName: mo-chaos-regression-dis-log-3  phase: Up
  - podName: mo-chaos-regression-dis-log-1  phase: Up
failedStores:
  - podName: mo-chaos-regression-dis-log-2  phase: Down
conditions:
  - type: Ready  status: False  reason: NoEnoughReadyStores

Pods: log-1/log-3 1/1 Running; log-2 CrashLoopBackOff.

Proposed fixes (Operator)

Area Change
Ready predicate Define Ready when len(availableStores) >= ceil(replicas/2)+… i.e. majority (for odd replicas: (replicas/2)+1), not when available == replicas
Degraded Add/keep Degraded=True when 0 < failedStores but majority Up — so alerts can still fire without flipping Ready off
storeFailureTimeout After timeout, treat CrashLoop / NotReady store as failed and do not block Ready if majority of non-failed stores are Up; optionally recreate / replace the failed pod
Synced vs Ready Split “all pods exist & synced” from “service quorum available”; avoid coupling Synced=False on one bad member to Ready=False when quorum holds
Docs Document Ready semantics for LogSet HA (majority vs all)

Sketch (predicate):

// desired behavior
majority := replicas/2 + 1
readyForService := len(availableStores) >= majority
// Ready=true when readyForService
// Degraded=true when readyForService && len(failedStores) > 0

Verification

Check Expectation
Repro 3-replica LogSet; force one pod CrashLoop/OOM; wait > storeFailureTimeout
Pass Ready=True (optional Degraded=True); availableStores length ≥ 2
Fail (today) Ready=False, reason=NoEnoughReadyStores with exactly 2 Up / 1 Down

Related

  • Sibling (MO runtime): ghost log-0 member + waitAnyShardReady despite 2/3 Log Up
  • Workflow: lower task_mem_log size or raise Log memory so single-replica OOM is less trivial to trigger

Activity

  1. ghost added this to the MO-202607 milestone on Jul 23, 2026
  2. ghost added
    kind/bug
    on Jul 23, 2026
  3. ghost added
    severity/s0
    on Jul 23, 2026
  4. ghost added theissue type on Jul 23, 2026
  5. loveRhythm1990 commented on Sep 7, 2026

    @loveRhythm1990
    Contributor

    The current LogSet Ready condition describes Kubernetes resource readiness: whether the number of available Pods has reached the desired spec.replicas. It does not represent Raft quorum or log-service availability.

    The controller collects availableStores from Pod availability and sets Ready=True when len(availableStores) >= spec.replicas. It does not inspect HAKeeper or individual log shard membership, leaders, or quorum health. Consequently, a 3-Pod LogSet with only 2 available Pods reporting Ready=False is consistent with the current definition, even if the underlying Raft groups remain operational. These are different health dimensions.

    The proposed spec.replicas/2 + 1 check would not reliably establish service availability either: LogSet Pod count and per-shard replica count are separate settings, and an available replacement Pod does not by itself prove that it is a voting member of the relevant Raft groups. Likewise, storeFailureTimeout controls when failover is attempted; it does not redefine Raft membership or quorum.

    The issue mentions possible effects on CI, rolling updates, and dependent reconciliation, but does not provide a concrete example showing that this Ready condition caused those failures. The CN/DN runtime failure is explicitly tracked separately, so it should not be treated as evidence of that causal link.

    Could we identify a specific operation that is incorrectly blocked by this condition, and whether it requires all desired Pods to be ready or only the service to be available? That would help determine whether a dependency check needs changing. If service availability needs to be exposed, a separate condition backed by runtime health information would be worth discussing. The 2-Up/1-Down snapshot alone does not establish a bug in the current resource-readiness definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions