Restart a server after its updates, and check that it came back
An update run can name a second Semaphore playbook that restarts the server once the updates are in and it says a restart is due. The run keeps the maintenance window up, follows the restart, waits for the server to report again and checks from its uptime (or its restart flag clearing) that it did start again. A server that only needs a restart has a Restart button on the Updates page, and a patch plan can carry the restart playbook too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
97df28c6dc
commit
e4f3a54189
19 files changed
+10275
-87
No files matched your search
+19
-1
@@ -858,7 +858,7 @@ export interface UpdateRun {
|
||||
taskId: number | null;
|
||||
/** Semaphore's own word for the run. */
|
||||
taskStatus: string | null;
|
||||
status: "running" | "waiting_for_host" | "done" | "failed" | "cancelled";
|
||||
status: "running" | "waiting_for_host" | "restarting" | "waiting_for_restart" | "done" | "failed" | "cancelled";
|
||||
active: boolean;
|
||||
message: string | null;
|
||||
startedBy: string | null;
|
||||
@@ -868,6 +868,16 @@ export interface UpdateRun {
|
||||
updatesBefore: number | null;
|
||||
updatesAfter: number | null;
|
||||
rebootRequired: boolean;
|
||||
/** "restart": a restart on its own (the template is the restart playbook). */
|
||||
kind: "update" | "restart";
|
||||
/** The playbook that restarts the server once its updates are in, if one was chosen. */
|
||||
restartTemplate: string | null;
|
||||
restartTaskId: number | null;
|
||||
restartTaskStatus: string | null;
|
||||
/** ISO — when the restart playbook was started (after the updates). */
|
||||
restartedAt: string | null;
|
||||
/** The server was seen to have started again. */
|
||||
restarted: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateRunInput {
|
||||
@@ -879,6 +889,10 @@ export interface UpdateRunInput {
|
||||
windowMinutes: number;
|
||||
/** Somebody is streaming from the machine and the person has seen the warning. */
|
||||
startAnyway?: boolean;
|
||||
/** "restart": the template is a playbook that only restarts the server. */
|
||||
kind?: "update" | "restart";
|
||||
/** Restart the server with this playbook (same Semaphore) once the updates are in, if it says a restart is due. */
|
||||
restart?: { projectId: number; templateId: number };
|
||||
}
|
||||
|
||||
export interface UpdatesServer {
|
||||
@@ -1216,6 +1230,10 @@ export interface PatchPlan {
|
||||
onlyWithUpdates: boolean;
|
||||
silenceDependents: boolean;
|
||||
windowMinutes: number;
|
||||
/** The playbook that restarts a server that says a restart is due after its updates (in the same Semaphore); null = none. */
|
||||
restartProjectId: number | null;
|
||||
restartTemplateId: number | null;
|
||||
restartTemplateName: string | null;
|
||||
createdBy: string | null;
|
||||
/** The servers it covers right now. */
|
||||
servers: { id: number; name: string }[];
|
||||
|
||||
Reference in new issue
Block a user