Add a request to mark hosts and the controller as needing a restart

Not every plugin arrives through PluginInstallRequest. Plugins checked
out into external_plugins or installed by hand on the machine never
flag a restart, so the web UI shows nothing and tooling that acts on
the flag never fires.

HostMarkRestartRequiredRequest and ControllerMarkRestartRequiredRequest
set config.restartRequired, guarded by the existing restart
permissions. They are exposed as "Mark Restart Required" in the control
dropdown of the host and controller pages, hidden once the flag is set,
and as mark-restart-required ctl commands. The mark shows up on the
next system metrics poll.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Fable 5.1 committed 2026-09-17 19:52:03 +00:00
1 parent e2817eba39
commit bca681b5ea
12 files changed
+100 -1

No files matched your search

+6
View File
@@ -25,6 +25,12 @@ controllerCommands.add(new lib.Command({
await ctl.send(new lib.ControllerRestartRequest());
},
}));
controllerCommands.add(new lib.Command({
definition: ["mark-restart-required", "Mark the controller as requiring a restart"],
handler: async function(_args: object, ctl: Ctl) {
await ctl.send(new lib.ControllerMarkRestartRequiredRequest());
},
}));
controllerCommands.add(new lib.Command({
definition: ["update", "Update the controller", (yargs) => {
yargs.option("restart", { alias: "r", type: "boolean", description: "Restart after update" });
+10
View File
@@ -33,6 +33,16 @@ hostCommands.add(new lib.Command({
},
}));
hostCommands.add(new lib.Command({
definition: ["mark-restart-required <host>", "Mark the given host as requiring a restart", (yargs) => {
yargs.positional("host", { describe: "Host to mark", type: "string" });
}],
handler: async function(args: { host: string }, ctl: Ctl) {
let hostId = await lib.resolveHost(ctl, args.host);
await ctl.sendTo({ hostId }, new lib.HostMarkRestartRequiredRequest());
},
}));
hostCommands.add(new lib.Command({
definition: [["list", "l"], "List hosts connected to the controller"],
handler: async function(args: object, ctl: Ctl) {