Repository navigation
fix(restart): show how to recover after startup fails - #73
Conversation
When restart has removed the old container and the new one does not come up, it now prints a start command with the same port, image, persist dir, services and namespace. When the new container is running but did not become ready, it says to check logs and run wait instead, because start refuses a running container. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
[Medium impact] The change affects restart recovery across the four product trees. The remote-host recovery issue still needs a complete fix before merging. Findings
|
| if (running) { | ||
| return "The new container is running but did not become ready.\n" | ||
| + "Check it with '" + profile.commandPrefix() + " logs" + selector + "', then run '" | ||
| + profile.commandPrefix() + " wait" + selector + "' to wait again."; |
There was a problem hiding this comment.
The printed wait command drops the endpoint used by restart. If a remote Docker instance was restarted with --endpoint http://build-host:4588 on host port 14588, the embedded wait checks build-host:14588, but the suggested command checks localhost:14588. It can keep timing out after the remote server becomes ready. Include the endpoint that start actually waited on.
Knowledge Base Used: Environment lifecycle operations
…ctory They name floci aws, because a bare floci follows the configured default product. The suggested wait keeps a typed --endpoint with the port start bound, and --persist prints the directory a local daemon would mount, so a retry from another directory finds the same state. Addresses the review of #73. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This branch changes the skill, and 1.0.1 shipped with #71. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This branch changes the skill, and 1.0.2 shipped with #73. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Summary
When
restarthad removed the old container and the new one failed, the settings of the instance were gone with it and nothing said how to get them back.startcommand with the same container, port, image, persist dir, services and namespace.logsand runwait, becausestartrefuses a running container.floci aws), a typed--endpointis kept, and--persistprints the directory a local daemon would mount.RestartCommand. Exit codes and-o jsonstdout are unchanged.Type of change
fix:)feat:)feat!:orfix!:)Product trees affected
commands/gcp/)commands/az/)Checklist
mvn testpasses locallyREADME.mdupdated (if a command or flag changed)mvn package -Pnative), required if Jackson serialization or dependencies changedfeat/fix/perfsubject becomes the release note, soCHANGELOG.mdneeds no hand editTests
RestartRecoveryTestcovers a faileddocker runin text and JSON, a failed stop, and a readiness timeout. 760 tests, 0 failures. Ran the fat JAR against real docker withnginx:alpineas a container that runs but never answers. Native build and smoke pass on linux/amd64 and darwin/arm64 with this change merged alongside the other open work; the smoke script does not exerciserestart. OCI is covered too: the template has no box for it.