Repository navigation
Commit db7d7a6
fix(server): keep the reconcile sweep from failing a sandbox mid-start (#5265)
* fix(podman): keep a polled stale exit from failing an in-progress start
The gateway's reconcile sweep applies polled snapshots without waiting
for an in-progress start. During a stop/start restart, get_sandbox and
list_sandboxes built the stopped workload from its list entry, so the
previous run's exit was reported as ContainerExited and moved the
sandbox from Starting to Error.
While a start is in progress, inspect a stopped workload before
reporting it. If it is running again, or still shows the exit recorded
before the start, report it as ContainerStarting. A new exit, and any
exit once the start has returned, is still reported. The start is
tracked by a guard that clears the in-progress mark on every return
path.
Closes #5258
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
* docs(podman): describe how restarts fence the previous exit
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
* fix(podman): keep a restart from containing its own workload
A restart starts the workload before its exited supervisor. Watch
reconciliation, start events, and polled snapshots could inspect the
workload in that gap, see a running workload beside an exited
supervisor, and stop it.
Record the supervisor exit that the start observed. While that start is
in progress, an exited supervisor with the recorded FinishedAt reports
the workload as starting instead of containing it. A missing
supervisor, a new supervisor exit, and any exit after the start returns
are still contained.
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
* fix(server): skip the reconcile poll of a sandbox whose start is in progress
StartSandbox holds the sandbox lifecycle gate for the whole driver call,
and the workload can still show its previous exit until the driver starts
it. The watch path already waits on that gate for Starting sandboxes; the
reconcile sweep did not, so a poll could move a restarting sandbox from
Starting to Error. Skip such a sandbox and let the next tick or event
report the settled state. This replaces the Podman-specific fence of
polled snapshots.
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
* fix(server): preserve cleanup during start reconciliation
Signed-off-by: Shiju <shiju@nvidia.com>
* fix(server): defer the reconcile sweep for a start claimed by another replica
The sweep skipped a Starting sandbox only when this replica's lifecycle gate was held, so a replica that did not own the start could still apply the previous run's exit. Also skip sandboxes whose driver operation is durably pending. Deletion keeps its own pending-operation handling.
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
* test(server): check a sweep still applies an exit after the start settles
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
* refactor(server): narrow the reconcile start guard to the snapshot path
Check for an in-progress start only after the driver poll: the resource-version fence already rejects a poll that overlaps a start beginning earlier. Limit the durable-claim check to Starting sandboxes, drop the prune-path guard (pending operations already block pruning), restore the original watch-delay test, and cover the gap where only the local gate defers the sweep.
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
---------
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Shiju <shiju@nvidia.com>
Co-authored-by: Shiju <shiju@nvidia.com>1 parent 7c8e018 commit db7d7a6
1 file changed
Lines changed: 187 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6660 | 6660 | | |
6661 | 6661 | | |
6662 | 6662 | | |
| 6663 | + | |
| 6664 | + | |
| 6665 | + | |
| 6666 | + | |
| 6667 | + | |
| 6668 | + | |
| 6669 | + | |
| 6670 | + | |
| 6671 | + | |
| 6672 | + | |
| 6673 | + | |
| 6674 | + | |
| 6675 | + | |
| 6676 | + | |
| 6677 | + | |
| 6678 | + | |
| 6679 | + | |
| 6680 | + | |
| 6681 | + | |
| 6682 | + | |
6663 | 6683 | | |
6664 | 6684 | | |
6665 | 6685 | | |
| |||
6700 | 6720 | | |
6701 | 6721 | | |
6702 | 6722 | | |
| 6723 | + | |
6703 | 6724 | | |
6704 | 6725 | | |
6705 | 6726 | | |
| |||
14383 | 14404 | | |
14384 | 14405 | | |
14385 | 14406 | | |
| 14407 | + | |
| 14408 | + | |
| 14409 | + | |
| 14410 | + | |
| 14411 | + | |
| 14412 | + | |
| 14413 | + | |
| 14414 | + | |
| 14415 | + | |
| 14416 | + | |
| 14417 | + | |
| 14418 | + | |
| 14419 | + | |
| 14420 | + | |
| 14421 | + | |
| 14422 | + | |
| 14423 | + | |
| 14424 | + | |
| 14425 | + | |
| 14426 | + | |
| 14427 | + | |
| 14428 | + | |
| 14429 | + | |
| 14430 | + | |
| 14431 | + | |
| 14432 | + | |
| 14433 | + | |
| 14434 | + | |
| 14435 | + | |
| 14436 | + | |
| 14437 | + | |
| 14438 | + | |
| 14439 | + | |
| 14440 | + | |
| 14441 | + | |
| 14442 | + | |
| 14443 | + | |
| 14444 | + | |
| 14445 | + | |
| 14446 | + | |
| 14447 | + | |
| 14448 | + | |
| 14449 | + | |
| 14450 | + | |
| 14451 | + | |
| 14452 | + | |
| 14453 | + | |
| 14454 | + | |
| 14455 | + | |
| 14456 | + | |
| 14457 | + | |
| 14458 | + | |
| 14459 | + | |
| 14460 | + | |
| 14461 | + | |
| 14462 | + | |
| 14463 | + | |
| 14464 | + | |
| 14465 | + | |
| 14466 | + | |
| 14467 | + | |
| 14468 | + | |
| 14469 | + | |
| 14470 | + | |
| 14471 | + | |
| 14472 | + | |
| 14473 | + | |
| 14474 | + | |
| 14475 | + | |
| 14476 | + | |
| 14477 | + | |
| 14478 | + | |
| 14479 | + | |
| 14480 | + | |
| 14481 | + | |
| 14482 | + | |
| 14483 | + | |
| 14484 | + | |
| 14485 | + | |
| 14486 | + | |
| 14487 | + | |
| 14488 | + | |
| 14489 | + | |
| 14490 | + | |
| 14491 | + | |
| 14492 | + | |
| 14493 | + | |
| 14494 | + | |
| 14495 | + | |
| 14496 | + | |
| 14497 | + | |
| 14498 | + | |
| 14499 | + | |
| 14500 | + | |
| 14501 | + | |
| 14502 | + | |
| 14503 | + | |
| 14504 | + | |
| 14505 | + | |
| 14506 | + | |
| 14507 | + | |
| 14508 | + | |
| 14509 | + | |
| 14510 | + | |
| 14511 | + | |
| 14512 | + | |
| 14513 | + | |
| 14514 | + | |
| 14515 | + | |
| 14516 | + | |
| 14517 | + | |
| 14518 | + | |
| 14519 | + | |
| 14520 | + | |
| 14521 | + | |
| 14522 | + | |
| 14523 | + | |
| 14524 | + | |
| 14525 | + | |
| 14526 | + | |
| 14527 | + | |
| 14528 | + | |
| 14529 | + | |
14386 | 14530 | | |
14387 | 14531 | | |
14388 | 14532 | | |
| |||
16452 | 16596 | | |
16453 | 16597 | | |
16454 | 16598 | | |
| 16599 | + | |
| 16600 | + | |
| 16601 | + | |
| 16602 | + | |
| 16603 | + | |
| 16604 | + | |
| 16605 | + | |
| 16606 | + | |
| 16607 | + | |
| 16608 | + | |
| 16609 | + | |
| 16610 | + | |
| 16611 | + | |
| 16612 | + | |
| 16613 | + | |
| 16614 | + | |
| 16615 | + | |
| 16616 | + | |
| 16617 | + | |
| 16618 | + | |
| 16619 | + | |
| 16620 | + | |
| 16621 | + | |
| 16622 | + | |
| 16623 | + | |
| 16624 | + | |
| 16625 | + | |
| 16626 | + | |
| 16627 | + | |
| 16628 | + | |
| 16629 | + | |
| 16630 | + | |
| 16631 | + | |
| 16632 | + | |
| 16633 | + | |
| 16634 | + | |
| 16635 | + | |
| 16636 | + | |
| 16637 | + | |
| 16638 | + | |
| 16639 | + | |
| 16640 | + | |
| 16641 | + | |
16455 | 16642 | | |
16456 | 16643 | | |
16457 | 16644 | | |
| |||
0 commit comments