mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 23:24:52 +09:00
Add a request to mark hosts and the controller as needing a restart (#1043)
* 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> * Cover the mark-restart-required ctl commands Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
commit
2efb53aab1
13 files changed
+112
-1
No files matched your search
@@ -550,6 +550,12 @@ describe("Integration of Clusterio", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("controller mark-restart-required", function() {
|
||||
it("runs", async function() {
|
||||
await execCtl("controller mark-restart-required");
|
||||
});
|
||||
});
|
||||
|
||||
describe("host list", function() {
|
||||
it("runs", async function() {
|
||||
await execCtl("host list");
|
||||
@@ -635,6 +641,12 @@ describe("Integration of Clusterio", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("host mark-restart-required", function() {
|
||||
it("runs", async function() {
|
||||
await execCtl("host mark-restart-required 4");
|
||||
});
|
||||
});
|
||||
|
||||
describe("host generate-token", function() {
|
||||
it("runs", async function() {
|
||||
await execCtl("host generate-token --id 42");
|
||||
|
||||
@@ -29,6 +29,15 @@ describe("messages/controller", function() {
|
||||
controlConnection = new ControlConnection({ version: "2.0.0" }, connection, controller, user, 1);
|
||||
});
|
||||
|
||||
describe("ControllerMarkRestartRequiredRequest", function() {
|
||||
it("runs", async function() {
|
||||
await controlConnection.handleControllerMarkRestartRequiredRequest(
|
||||
new lib.ControllerMarkRestartRequiredRequest()
|
||||
);
|
||||
assert.equal(controller.config.restartRequired, true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("ControllerUpdateRequest", function() {
|
||||
it("runs", async function() {
|
||||
controller.config.set("controller.allow_remote_updates", true);
|
||||
|
||||
@@ -32,6 +32,13 @@ describe("messages/host", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("HostMarkRestartRequiredRequest", function() {
|
||||
it("runs", async function() {
|
||||
await host.handleHostMarkRestartRequiredRequest(new lib.HostMarkRestartRequiredRequest());
|
||||
assert.equal(host.config.restartRequired, true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("HostConfigGetRequest", function() {
|
||||
it("runs", async function() {
|
||||
const config = await host.handleHostConfigGetRequest(new lib.HostConfigGetRequest());
|
||||
|
||||
Reference in new issue
Block a user