Skip to content

B2-4: Day-two operations documentation #148

Closed

Description

@scttfrdmn

Summary

Create two admin guide documents covering ongoing operations: rolling upgrades and cluster topology changes (operations.md) and a troubleshooting decision tree (troubleshooting.md). Both linked from README and included in mkdocs navigation.

Files to Create

docs/admin-guide/operations.md

Topics:

  1. Rolling upgrade procedure — upgrade nodes one at a time; leader last; verify objectfs cluster status shows all alive at each step
  2. Growing cluster: 1→3 — add two nodes with OBJECTFS_CLUSTER_SEEDS pointing at existing node; verify quorum
  3. Shrinking cluster: 3→1 — drain nodes gracefully; verify remaining node degrades to ConsistencyEventual mode
  4. Leader failure recovery — what happens automatically (Raft election); when to intervene (split-brain)
  5. Cache sizing formula: cache_size ≥ hot_dataset_size × replication_factor; worked example with genomics dataset
  6. Log rotation and data dir management (when persistent log enabled in v0.13.0)

docs/admin-guide/troubleshooting.md

Decision tree format:

Mount fails?
  └─ Check FUSE: modprobe fuse; ls /dev/fuse
  └─ Check credentials: aws sts get-caller-identity
  └─ Check config: objectfs mount --dry-run

Cache hit rate < 20%?
  └─ Single node: increase cache_size_gb
  └─ Multi-node: check gossip port 7946 is open between nodes
  └─ Check: objectfs cluster status --json | jq .cache

Gossip not forming?
  └─ Verify all nodes share same cluster_secret
  └─ Check firewall: UDP 7946 between nodes
  └─ Check advertise_addr matches reachable IP

High S3 costs?
  └─ Check cache hit rate (above)
  └─ Enable cache warming (A2-5)
  └─ Consider storage tier optimization

README Changes

Add "Administration" section linking to both documents:

## Administration
- [Operations guide](docs/admin-guide/operations.md)
- [Troubleshooting](docs/admin-guide/troubleshooting.md)
- [Distributed mode](docs/admin-guide/distributed.md) (A3-3)

Acceptance Criteria

  • Both documents exist at paths above
  • Both linked from README under "Administration"
  • Both included in mkdocs.yml nav
  • Cache sizing formula includes worked example
  • Troubleshooting tree covers mount failure, low cache hit rate, gossip failure, high S3 costs

Activity

  1. added
    type: documentation
    priority: medium
    area: config
    on Apr 7, 2026
  2. scttfrdmn commented on Jul 30, 2026

    @scttfrdmn
    OwnerAuthor

    Correction: most of the specified content documents behavior that does not exist

    Filing note from the v0.10.0 review.

    Roughly 60% of the outlined content describes distributed behavior the code does not implement. Writing it now would produce documentation that is wrong on day one — the worst possible outcome for a day-two operations guide, because operators will act on it during incidents.

    Specifically, the following outlined topics have no implementation to document:

    • Raft leader election and failover. The consensus engine elects a leader, but nothing consumes the result. Coordinator.executeLocally (internal/distributed/coordinator.go:550-602) calls the S3 backend directly and never consults leadership, term, or commitIndex. There is no failover behavior to describe.
    • Split-brain detection and recovery. No implementation. Also note that because every node writes the same S3 key, the failure mode operators would actually hit is not classical split-brain.
    • Degradation to ConsistencyEventual. No code path downgrades the consistency level in response to node loss.
    • "Strong consistency" guarantees. executeStrongConsistency (coordinator.go:356) fans the same operation to N nodes and succeeds on successCount >= len(targetNodes)/2+1 (line 399). Since all nodes write the identical S3 key, these are N redundant identical PUTs — majority success is a reachability signal, not a linearizability guarantee. internal/distributed/doc.go:47-84 already claims linearizability; that claim is itself incorrect and should be corrected rather than propagated into operator docs.

    There is also no ClusterManager in a running process at all (#139), so none of this is observable even in principle today.

    Suggested adjustment

    1. Add A2-1: Wire ClusterManager into Adapter and FileSystem #139, A2-6: Implement NegotiateConsistency in coordinator #144, and A3-1: Implement BboltPersistentState and BboltConsensusLog #150 as blocking dependencies.
    2. Split the issue: the parts that are truthful today — mount/unmount, cache tuning, metrics and health endpoints, log interpretation, backup/restore, upgrade procedure — can be written now against single-node behavior. Do that as a separate, unblocked issue.
    3. Hold the distributed half until the behavior exists.
    4. Separately worth filing: correct the linearizability claim in internal/distributed/doc.go. Note doc.go:89 and doc.go:326 also contain example code setting a ClusterConfig.Enabled field that does not exist on the struct (cluster.go:35-65), so those examples do not compile.

    See also #169 (evaluating S3 conditional writes as a Raft substitute) — if that changes the consistency model, the distributed half of this guide should be written against the new design, not the current one.

  3. scttfrdmn commented on Aug 2, 2026

    @scttfrdmn
    OwnerAuthor

    Correction: roughly 60% of this documents behavior that does not exist

    Re-verified against main. Operations documentation that describes unbuilt features is worse than none — it is the mechanism by which v0.10.0 accumulated ~190 documentation overclaims, and an admin guide is exactly the document an operator trusts under pressure.

    Going through operations.md topic by topic:

    topic status
    1. Rolling upgrade, verify with objectfs cluster status blocked on #147, which is itself blocked on #132/#140
    2. Growing 1→3 with OBJECTFS_CLUSTER_SEEDS that variable does not exist. Zero hits repo-wide; internal/config/config.go:720-850 maps 24 env vars, none cluster-related. "Verify quorum" is #132
    3. Shrinking 3→1, "verify remaining node degrades to ConsistencyEventual" no such degradation exists. ConsistencyEventual (coordinator.go:75) is a per-operation level the caller passes in; nothing anywhere lowers the level in response to lost quorum
    4. Leader failure recovery / "what happens automatically (Raft election)" nothing happens automatically. broadcastProposal (consensus.go:754-759) logs and then self-accepts its own proposals on a timer — #133. Documenting automatic recovery would tell an operator not to intervene in a situation where intervention is the only thing that works
    5. Cache sizing formula + worked example writable today, and useful
    6. Log rotation / data dir correctly scoped to v0.13.0

    And troubleshooting.md:

    branch status
    modprobe fuse; ls /dev/fuse fine
    aws sts get-caller-identity fine
    objectfs mount --dry-run wrong invocation. The flag exists (cmd/objectfs/main.go:45, used at :108) but there is no mount subcommand — it is objectfs --dry-run --config c.yaml s3://bucket /mnt, per cmd/objectfs/doc.go:33. Depends on #134 to become true as written
    increase cache_size_gb check the real key name against the loader before publishing — v0.10.1 found configs/example.yaml documenting enable/zstd_level/min_file_size against the real enabled/level/min_size, undetected because the whole block was inert under non-strict decoding. Decoding is strict now, so a wrong key in the admin guide is an immediate hard failure for whoever copies it
    gossip port 7946 the port is not a default anywhere in the code; ListenAddr has no cluster default. Either set one or document the field, not a number
    objectfs cluster status --json | jq .cache #147
    "Verify all nodes share same cluster_secret" there is no cluster_secret. Zero hits in Go or YAML. Gossip is unauthenticated. Telling an operator to check a nonexistent shared secret sends them looking for a config key that cannot be set — and quietly implies gossip is authenticated when it is not
    UDP 7946 firewall / advertise_addr reachability fine in substance
    "Enable cache warming (A2-5)" #143, which is itself under revision — see the correcting comment there; Warmup currently issues one full-object S3 GET per key, so as a cost-reduction step this is backwards

    Recommendation: split, and land the true half now.

    One structural request. Whatever lands, gate it: a test that extracts config keys, env var names, and CLI invocations from the admin guide and asserts each one exists — the same shape as the config-docs admission gate and version-claim test added in v0.10.1. Every wrong item above would have been caught by it at authoring time, and an admin guide that drifts is the one document where drift costs the most.

    Also worth noting: unauthenticated gossip is not a documentation problem, but this issue is where it surfaced. Filing it separately.

  4. added
    effort: medium
    on Aug 3, 2026
  5. scttfrdmn commented on Aug 9, 2026

    @scttfrdmn
    OwnerAuthor

    Moved to v0.14.0. This documents day-two operations for distributed mode, and two of the things it would describe do not exist yet: objectfs cluster status is #147, filed against v0.14.0, and the Raft leader-election recovery this would walk an operator through is not on the mount path — v0.13.0 wires the cluster manager for gossip and cache coordination only, and consensus is deliberately not started (#139). The recorded direction is CAS via internal/coord rather than Raft.

    Written now, this page describes a specification. Written in v0.14.0, alongside the CLI that inspects the thing, it describes behavior — and can state verification steps a reader can actually run.

  6. scttfrdmn commented on Aug 9, 2026

    @scttfrdmn
    OwnerAuthor

    Unblocked as of #147 (merged in #414): objectfs cluster status and --json now exist, so the verification steps in the rolling-upgrade section and the objectfs cluster status --json | jq .cache leaf of the troubleshooting tree can be written against a real command rather than a spec. That was the reason this was deferred out of v0.13.0.

    Before anyone writes it, though — most of the identifiers in the body above do not exist, and the docs tests will catch it. TestDocumentedCLIInvocationsAreRunnable, TestDocumentedGoSymbolsExist and TestDocumentedConfigYAMLMatchesTheSchema in internal/config parse committed markdown and fail on names the code does not have. Grepped just now against c47be1b:

    Named in this issue Reality
    OBJECTFS_CLUSTER_SEEDS Does not exist. Seeds are cluster.seed_nodes in YAML (ClusterConfig.SeedNodes); there is no environment variable for them.
    ConsistencyEventual Deleted by #284. All three levels issued the same unconditional PutObject and differed only in request count, not guarantee — see the "Consistency Levels" post-mortem in internal/distributed/doc.go:99. A node cannot "degrade to ConsistencyEventual mode" because the type is gone.
    cache_size_gb Does not exist. The key is cache.cache_size, a string (e.g. "10GB"), not a number of gigabytes.
    persistent log / cluster data_dir Still absent — this was #152's blocker too. The parenthetical "when persistent log enabled in v0.13.0" did not happen; v0.13.0 shipped no such field.
    gossip port 7946 Not the default. ClusterConfig.ListenAddr defaults to 0.0.0.0:8080 (cluster.go:246). 7946 appears only as a literal in test fixtures, presumably from memberlist's convention. A firewall instruction naming the wrong port is worse than none.

    Two sections need rescoping rather than fact-checking, both for the reason recorded in #147 and in the CAS-not-Raft decision:

    • "Leader failure recovery — what happens automatically (Raft election); when to intervene (split-brain)" — a mount does not start the consensus engine. enable_consensus is off by default and objectfs cluster status prints Role: n/a — leader election is not running; coordination is compare-and-swap against S3. There is no election to recover from and no split-brain to intervene in on the path an operator actually runs. What belongs here instead is what a CAS conflict looks like and what happens when a node holding a claim dies.
    • "verify quorum" in the 1→3 and 3→1 procedures — there is no quorum. feat(cluster): objectfs cluster status, and the endpoint it reads (#147) #414 deliberately made the exit code dead-or-suspect-nodes rather than quorum-loss, because a two-node cluster with one node down works correctly. The 3→1 procedure should verify membership converged, not that a majority survived.

    The cache sizing formula needs a second look too: cache_size ≥ hot_dataset_size × replication_factor multiplies by a factor that does not do what its name suggests here — ReplicationFactor is a selection width and only the first node is used, since S3 holds the single copy (see the field comment in cluster.go). Each node caches what it reads, so the per-node figure has no replication term in it at all.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configeffort: mediumpriority: mediumtype: documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions