Handle restarting containers in cluster status, logs, and stop #1638

Closed
opened 2026-08-02 06:22:52 +00:00 by coilyco-ops · 0 comments
Member

Problem

When a collaboration cluster broker is restarting, Ward cannot inspect or remove the cluster. On v0.868.0 these commands all fail:

ward agent cluster status <cluster-id> --json
ward agent cluster logs <cluster-id> --tail 100
ward agent cluster stop <cluster-id>

Each reports an error shaped like:

unexpected Docker cluster row "<container>\tRestarting (1) ...\t<project>\tbroker\t<harness>"

The failure mode was exposed by a broker startup crash. Direct Docker logs and cleanup were required because Ward's own diagnostic and scoped cleanup surfaces rejected the container state.

Expected behavior

Cluster discovery should recognize valid Docker lifecycle states. A failed or restarting cluster must remain observable and removable through Ward.

Acceptance criteria

  • Cluster row parsing accepts valid restarting, exited, created, paused, dead, healthy, and unhealthy states emitted by the supported Docker Compose surface.
  • cluster status --json reports the actual state and health of a restarting or stopped service.
  • cluster logs reads logs from restarting and exited services.
  • cluster stop removes exactly the targeted cluster even when one or more services are unhealthy or restarting.
  • Truly malformed rows still fail closed with a contextual error.
  • Fixtures cover a Restarting (1) row with spaces and parentheses.
  • A focused lifecycle test proves diagnosis and cleanup after broker startup failure.
  • Healthy cluster behavior and project isolation remain unchanged.
## Problem When a collaboration cluster broker is restarting, Ward cannot inspect or remove the cluster. On v0.868.0 these commands all fail: ```text ward agent cluster status <cluster-id> --json ward agent cluster logs <cluster-id> --tail 100 ward agent cluster stop <cluster-id> ``` Each reports an error shaped like: ```text unexpected Docker cluster row "<container>\tRestarting (1) ...\t<project>\tbroker\t<harness>" ``` The failure mode was exposed by a broker startup crash. Direct Docker logs and cleanup were required because Ward's own diagnostic and scoped cleanup surfaces rejected the container state. ## Expected behavior Cluster discovery should recognize valid Docker lifecycle states. A failed or restarting cluster must remain observable and removable through Ward. ## Acceptance criteria * Cluster row parsing accepts valid restarting, exited, created, paused, dead, healthy, and unhealthy states emitted by the supported Docker Compose surface. * `cluster status --json` reports the actual state and health of a restarting or stopped service. * `cluster logs` reads logs from restarting and exited services. * `cluster stop` removes exactly the targeted cluster even when one or more services are unhealthy or restarting. * Truly malformed rows still fail closed with a contextual error. * Fixtures cover a `Restarting (1)` row with spaces and parentheses. * A focused lifecycle test proves diagnosis and cleanup after broker startup failure. * Healthy cluster behavior and project isolation remain unchanged. ## Related * #1635 * #1636
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/ward#1638
No description provided.