Commit e549271
authored
Add gateway replica statuses and pipeline (#3990)
- Introduce gateway replica statuses.
- Provision and terminate gateway replicas
independently from each other, in a separate
pipeline.
In this version, the pipelines have the following
responsibilities.
Gateway pipeline:
- `SUBMITTED` — create replica DB records,
transition to `PROVISIONING`; in a future
version — create the load balancer (e.g., AWS
ALB).
- `PROVISIONING` — once all replicas reach
`RUNNING`, transition to `RUNNING`; if any
replica enters `TERMINATING` or `TERMINATED`,
transition to `FAILED`.
- `RUNNING`, `FAILED` — delete the gateway if
deletion requested and all replicas are
`TERMINATED`.
Gateway replica pipeline:
- `SUBMITTED` — call backend to create the cloud
instance, transition to `PROVISIONING` on
success, or `TERMINATED` on failure.
- `PROVISIONING` — SSH-connect to the instance and
configure the gateway, transition to `RUNNING`
on success, or `TERMINATING` on failure.
- `RUNNING` — nothing to do.
- `TERMINATING` — call backend to destroy the
cloud instance, transition to `TERMINATED`.
- `TERMINATED` — nothing to do.
- also `SUBMITTED`, `PROVISIONING`, or `RUNNING` —
transition to `TERMINATING` or `TERMINATED` if
the gateway is `FAILED` or gateway deletion is
requested.1 parent 28ea5f8 commit e549271
18 files changed
Lines changed: 2263 additions & 572 deletions
File tree
- mkdocs/docs/concepts
- src
- dstack/_internal
- cli/utils
- core/models
- server
- background
- pipeline_tasks
- scheduled_tasks
- compatibility
- migrations/versions/2026
- services
- backends
- gateways
- testing
- tests/_internal/server
- background/pipeline_tasks
- compatibility
- routers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
| 214 | + | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| 133 | + | |
129 | 134 | | |
| 135 | + | |
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| |||
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
122 | | - | |
| 130 | + | |
123 | 131 | | |
124 | | - | |
125 | | - | |
| 132 | + | |
| 133 | + | |
126 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
127 | 138 | | |
128 | 139 | | |
129 | 140 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
0 commit comments