fix: keep internal section numbers out of runtime messages
Four messages that reach an operator or an API client cited sections of a specification nobody outside the project can read: - the unimplemented archive store error from config load - the running-server cap refusal, from both the user wake and the internal wake - the missing memory ceiling guard, in the API and in felis apply The references are gone and the wording is otherwise unchanged. Each message still says what went wrong and, where there is one, what to do about it. The test for the archive store message checks for the tarLocal remediation, which is still there.
This commit is contained in:
4 files changed
+5
-5
No files matched your search
+1
-1
@@ -220,7 +220,7 @@ func buildMinecraftServerFromApplyRequest(req applyRequest, namespace string) (*
|
||||
}
|
||||
memLim, ok := limits[corev1.ResourceMemory]
|
||||
if !ok || memLim.IsZero() {
|
||||
return nil, fmt.Errorf("internal error: refusing to create a server without a memory ceiling (§22)")
|
||||
return nil, fmt.Errorf("internal error: refusing to create a server without a memory ceiling")
|
||||
}
|
||||
|
||||
// ---- storage ----
|
||||
|
||||
@@ -149,7 +149,7 @@ func (a *API) handleInternalWake(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
if !ok {
|
||||
writeError(w, r, newError(http.StatusServiceUnavailable, "at_capacity",
|
||||
"the cluster is at its running-server cap (spec §9.1); retry once a server stops"))
|
||||
"the cluster is at its running-server cap; retry once a server stops"))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ func (a *API) handleWake(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
if !ok {
|
||||
writeError(w, r, newError(http.StatusServiceUnavailable, "at_capacity",
|
||||
"the cluster is at its running-server cap (spec §9.1); retry once a server stops"))
|
||||
"the cluster is at its running-server cap; retry once a server stops"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ func resolveResources(memory string, rr *resourceRequest) (string, corev1.Resour
|
||||
memLim, ok := limits[corev1.ResourceMemory]
|
||||
if !ok || memLim.IsZero() {
|
||||
return "", corev1.ResourceRequirements{}, newError(http.StatusInternalServerError, "internal",
|
||||
"refusing to create a server without a memory ceiling (§22)")
|
||||
"refusing to create a server without a memory ceiling")
|
||||
}
|
||||
|
||||
return deriveJavaHeap(memLim), corev1.ResourceRequirements{Limits: limits, Requests: requests}, nil
|
||||
|
||||
@@ -300,7 +300,7 @@ func (c *Config) Validate() error {
|
||||
return fmt.Errorf("config: [archive] store %q is not one of tarLocal|tarS3|volumeSnapshot|longhorn", c.Archive.Store)
|
||||
}
|
||||
if _, ok := implementedArchiveStores[c.Archive.Store]; !ok {
|
||||
return fmt.Errorf("config: [archive] store %q is recognized by §19 but not implemented in this build — only tarLocal is supported; set store = \"tarLocal\"", c.Archive.Store)
|
||||
return fmt.Errorf("config: [archive] store %q is not implemented in this build — only tarLocal is supported; set store = \"tarLocal\"", c.Archive.Store)
|
||||
}
|
||||
switch c.K8s.EgressMode {
|
||||
case "loadbalancer", "nodeport":
|
||||
|
||||
Reference in new issue
Block a user