mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
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:
1 parent
e2817eba39
commit
bca681b5ea
12 files changed
+100
-1
No files matched your search
@@ -73,6 +73,9 @@ export default class ControlConnection extends BaseConnection {
|
||||
|
||||
this.handle(lib.ControllerStopRequest, this.handleControllerStopRequest.bind(this));
|
||||
this.handle(lib.ControllerRestartRequest, this.handleControllerRestartRequest.bind(this));
|
||||
this.handle(
|
||||
lib.ControllerMarkRestartRequiredRequest, this.handleControllerMarkRestartRequiredRequest.bind(this)
|
||||
);
|
||||
this.handle(lib.ControllerUpdateRequest, this.handleControllerUpdateRequest.bind(this));
|
||||
this.handle(lib.ControllerConfigGetRequest, this.handleControllerConfigGetRequest.bind(this));
|
||||
this.handle(lib.ControllerConfigSetRequest, this.handleControllerConfigSetRequest.bind(this));
|
||||
@@ -1297,6 +1300,10 @@ export default class ControlConnection extends BaseConnection {
|
||||
return usersToSend;
|
||||
}
|
||||
|
||||
async handleControllerMarkRestartRequiredRequest() {
|
||||
this._controller.config.restartRequired = true;
|
||||
}
|
||||
|
||||
async handleControllerUpdateRequest(request: lib.ControllerUpdateRequest) {
|
||||
if (!this._controller.config.get("controller.allow_remote_updates")) {
|
||||
throw new lib.RequestError("Remote updates are disabled on this machine");
|
||||
|
||||
Reference in new issue
Block a user