When Only Some Servers Have Changed, How Do Stopping a Deploy and Rolling Back Differ?

Press stop in the middle of a sequential rollout and every server halts at a different point. Separate the moment the stop was accepted from the state each server actually stopped in, so the next on-call can decide which server to look at first. Next steps for five servers by state, the restart-resend trap, and a handover sentence that works.

John Baek
John Baek
Founder, CollabOps
3 min read

A new version is rolling out to five production servers, one after another. A has been replaced and verified. B has received the new file but is still running the old version. C lost its connection right after the restart request went out. D and E are still queued. Then an error report comes in, and the operator presses stop deploy.

If the log at this moment says "all five servers are back to the original," the next on-call starts the incident response with wrong information. You know when the stop was requested, but each server had gotten to a different point by then. AWS CodeDeploy says as much: stopping an EC2 or on-premises deployment can leave some instances in an uncertain state, and it offers "stop" and "stop and roll back" as separate actions (AWS CodeDeploy: Stop a deployment). (The server layout and history are illustrative.)

Stopping a deploy happens at one moment, but the state each server stopped in differs per server. The stop record has to be kept per server.

ServerWhat we confirmed at the stopNext step
ANew version running and business check passedCheck whether the error relates to the new version; if a full revert is decided, replace with the previous version
BNew file received in a staging path, old version runningCancel the scheduled swap and confirm the live service is the old version
CNo response after the restart requestCheck the current process, running version and business response, then decide how to recover
D, ENot startedStop assigning new work and check the existing service

Pressing restart again because there was no response

On C, the restart may have succeeded and only the connection carrying the result dropped. Send the same command again and you take down a service that just came back. On the other hand, if you exclude every server marked "failed" from recovery, you might miss C, which is already running the new version. What you need first is an action that reads the actual state on the server again.

How do you undo a server that has only received the new file?

A server like B, which has only received the new file, is handled according to how you deploy. If, as in the table, the new file sits in a separate staging path and the old version is serving, cancelling the swap may be enough. If your deploy overwrites files in the running directory, the next restart can pick up the new file even though the current process is the old version. In that case you also need to restore the files left on disk.

How should a deploy tool show a stopped rollout?

A deploy tool should show the stop request time separately from the state each server stopped in. In CollabOps you can see step-by-step pipeline logs and run history along with deploy status per environment. When you connect a legacy deploy, you can review the last step recorded on that screen side by side with the version observed on each target server. What matters most is whether it separates "the time the stop request was accepted" from "the state each server stopped changing in." That separation is something to verify server by server in a PoC on the customer's environment.

A good handover sentence is this specific: "New work on D and E is blocked. A is serving the new version, B is still on the old version. We're confirming which version C is running." Only at that level of detail can the next operator decide which server to look at first.

The same principle applies when stopping and undoing work that an agent started rather than a person. That case is covered in how to undo what an agent did.

  • #legacy-deploy
  • #rollback
  • #deployment
  • #incident
  • #vm