Commit 6f51cf4
committed
Fix wait command to always check replica count
Previously, the wait command had two issues:
1. It would trust UpdateStatus.State when present without verifying
that all replicas were actually running.
2. The desired-state:running filter excluded tasks being scheduled
(which have DesiredState:"ready"), causing the command to see 0
tasks and incorrectly exit with success.
Now we:
- Remove the desired-state filter to see all tasks
- Compare running task count against the service's configured
replica count (Spec.Mode.Replicated.Replicas)
This matches the behavior of docker-stack-wait.1 parent d782389 commit 6f51cf4
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments