fix(operator): StatefulSet 显式保留世界卷,同名旧世界卷仍在时建服回 409 world_volume_exists,文档写明孤儿卷查找与单节点约束
This commit is contained in:
11 files changed
+112
-22
No files matched your search
@@ -274,6 +274,21 @@ func TestCreateServerRejections(t *testing.T) {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
// A CR deleted by hand keeps its world volume; a new server of that
|
||||
// name would mount it and inherit the old world.
|
||||
name: "world volume left by a deleted server",
|
||||
body: validCreateBody,
|
||||
setup: func(_ *fakeRepo, cl *fakeCluster) {
|
||||
cl.orphanWorld = map[string]bool{"survival": true}
|
||||
},
|
||||
wantCode: http.StatusConflict, wantErr: "world_volume_exists",
|
||||
check: func(t *testing.T, repo *fakeRepo, _ *fakeCluster) {
|
||||
if repo.seeded["survival"] {
|
||||
t.Error("a create refused over a leftover volume must not seed a servers row")
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
|
||||
Reference in new issue
Block a user