fix(operator): StatefulSet 显式保留世界卷,同名旧世界卷仍在时建服回 409 world_volume_exists,文档写明孤儿卷查找与单节点约束
This commit is contained in:
11 files changed
+112
-22
No files matched your search
@@ -12,6 +12,7 @@
|
||||
"image_change_unconfirmed": "Changing the image opens the world with the new build's Minecraft version, and upgraded chunks can't be opened by the old one again. Back the world up, tick the confirmation, then save.",
|
||||
"subdomain_taken": "That subdomain is already in use.",
|
||||
"already_exists": "A server with that name already exists.",
|
||||
"world_volume_exists": "An earlier server with that name left its world volume behind. Choose another name, or ask the operator to delete the old volume.",
|
||||
"cooldown": "Wake is cooling down — try again shortly.",
|
||||
"not_running": "The server isn't running — wake it before managing access.",
|
||||
"console_unavailable": "Can't reach the server console right now — try again shortly.",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"image_change_unconfirmed": "更换镜像会让世界用新构建的 Minecraft 版本打开,区块升级后无法再用旧版本打开。请先备份世界,再勾选确认后保存。",
|
||||
"subdomain_taken": "该子域名已被占用。",
|
||||
"already_exists": "同名服务器已存在。",
|
||||
"world_volume_exists": "同名的旧服务器留下了世界卷。请换一个名称,或请运维删除旧的世界卷。",
|
||||
"cooldown": "启动冷却中——请稍后再试。",
|
||||
"not_running": "服务器未在运行——请先启动它再管理访问权限。",
|
||||
"console_unavailable": "暂时无法连接服务器控制台,请稍后重试。",
|
||||
|
||||
@@ -392,6 +392,13 @@ describe("api access-control wire shapes", () => {
|
||||
expect(humanizeError({ code: "console_unavailable" })).toMatch(/console/i);
|
||||
});
|
||||
|
||||
it("says a server name is held by a world volume left behind", async () => {
|
||||
const { humanizeError } = await import("./api");
|
||||
expect(humanizeError({ status: 409, code: "world_volume_exists" })).toBe(
|
||||
"An earlier server with that name left its world volume behind. Choose another name, or ask the operator to delete the old volume.",
|
||||
);
|
||||
});
|
||||
|
||||
it("says why a user change was refused for the caller's own or the owner account", async () => {
|
||||
const { humanizeError } = await import("./api");
|
||||
expect(humanizeError({ status: 403, code: "self_protected" })).toBe(
|
||||
|
||||
@@ -910,6 +910,10 @@ export function humanizeError(e: unknown): string {
|
||||
return t("subdomain_taken");
|
||||
case "already_exists":
|
||||
return t("already_exists");
|
||||
// A server deleted by hand left its world volume; the name stays taken so a
|
||||
// new server cannot mount the old world.
|
||||
case "world_volume_exists":
|
||||
return t("world_volume_exists");
|
||||
case "cooldown":
|
||||
return t("cooldown");
|
||||
// Access control (spec §7): the server must be Running for any RCON-backed
|
||||
|
||||
Reference in new issue
Block a user