Hub 2.3.1: a server running a job is busy, not down
An agent before 1.1.1 neither polls nor sends stats while it runs a job, so after 5 minutes the Hub alerted (and emailed) that it was down. While a job it handed out is within its time limit, the server counts as busy: no agent_silent alert, online for New install, "Running a job" in the UI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,7 @@ export default function ServerPage() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<PageTitle title={s.name} subtitle={<>{s.mode === "central" ? "Central server" : "Church server"} · {s.hostname} · agent {s.agentVersion} · last heard {ago(s.lastSeenAt)} <StatusPill status={s.online ? "online" : "offline"} /></>} />
|
||||
<PageTitle title={s.name} subtitle={<>{s.mode === "central" ? "Central server" : "Church server"} · {s.hostname} · agent {s.agentVersion} · last heard {ago(s.lastSeenAt)} <StatusPill status={s.busy ? "busy" : s.online ? "online" : "offline"} /></>} />
|
||||
<ServersNav active="/servers" />
|
||||
<Message msg={msg} />
|
||||
</div>
|
||||
|
||||
@@ -99,7 +99,7 @@ export default function InstallsPage() {
|
||||
<label key={s.id} className={`flex cursor-pointer gap-2 rounded-lg border p-3 text-sm ${form.serverId === s.id ? "border-indigo-500 bg-indigo-50" : "border-slate-200"}`}>
|
||||
<input type="radio" name="server" value={s.id} checked={form.serverId === s.id} onChange={() => setForm({ ...form, serverId: s.id })} disabled={!s.online} />
|
||||
<span>
|
||||
<span className="font-medium">{s.name}</span> <StatusPill status={s.online ? "online" : "offline"} />
|
||||
<span className="font-medium">{s.name}</span> <StatusPill status={s.busy ? "busy" : s.online ? "online" : "offline"} />
|
||||
<span className="block text-xs text-slate-500">RAM free {s.ram ? `${(s.ram.availableBytes / 1024 ** 3).toFixed(1)} GB` : "?"} · CPU day avg {pct(s.lastDay?.cpuAvg)} · disk {pct(s.disk.reduce((m, d) => Math.max(m, d.totalBytes ? (d.usedBytes / d.totalBytes) * 100 : 0), 0))} · {s.deployments ?? 0} site(s)</span>
|
||||
{low && <span className="block text-xs font-medium text-amber-800">Not recommended: under 1.5 GB RAM free</span>}
|
||||
</span>
|
||||
|
||||
@@ -76,7 +76,7 @@ export default function ServersPage() {
|
||||
<div className="font-medium">{s.name}</div>
|
||||
<div className="text-xs text-slate-500">{s.mode === "central" ? "Central server" : "Church server"} · {s.hostname || "?"} · agent {s.agentVersion || "?"}</div>
|
||||
</div>
|
||||
<StatusPill status={s.online ? "online" : "offline"} />
|
||||
<StatusPill status={s.busy ? "busy" : s.online ? "online" : "offline"} />
|
||||
</div>
|
||||
<dl className="mt-4 grid grid-cols-3 gap-2 text-sm">
|
||||
<div><dt className="text-xs text-slate-500">RAM used</dt><dd className="tabular-nums">{pct(s.ram?.usedPercent)} <span className="text-xs text-slate-500">of {bytes(s.ram?.totalBytes)}</span></dd></div>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { fmtDate } from "@/lib/format";
|
||||
|
||||
export type ServerSummary = {
|
||||
id: string; name: string; mode: "church" | "central"; hostname: string | null; agentVersion: string | null;
|
||||
lastSeenAt: string | null; joinedAt: string; removedAt: string | null; notes: string | null; online: boolean;
|
||||
lastSeenAt: string | null; joinedAt: string; removedAt: string | null; notes: string | null; online: boolean; busy?: boolean;
|
||||
ram: { totalBytes: number; availableBytes: number; usedPercent: number } | null;
|
||||
cpu: { percent: number; load1: number; cores: number } | null;
|
||||
disk: { mount: string; totalBytes: number; usedBytes: number; freeBytes: number }[];
|
||||
@@ -47,6 +47,8 @@ const STATUS: Record<string, [string, string]> = {
|
||||
// deployments
|
||||
installing: ["Installing", "blue"], waiting_for_proxy: ["Waiting for proxy", "amber"], live: ["Live", "green"], failed: ["Failed", "red"],
|
||||
uninstalling: ["Uninstalling", "amber"], removed: ["Removed", "grey"],
|
||||
// servers: busy = running a job the Hub handed it (agents before 1.1.1 go quiet then)
|
||||
busy: ["Running a job", "blue"],
|
||||
// jobs
|
||||
scheduled: ["Waiting its turn", "grey"], queued: ["Due", "blue"], delivered: ["Running", "blue"], succeeded: ["Succeeded", "green"],
|
||||
rolled_back: ["Rolled back", "amber"], refused: ["Refused", "red"], expired: ["Expired", "red"], missed: ["Missed", "red"], cancelled: ["Cancelled", "grey"],
|
||||
|
||||
Reference in New Issue
Block a user