Say a pending new login without 'session', which the plain-words rule refuses (hq ADR 0253, issue 318 review)
mesh/delivery superseded: a newer head of the same pull request
mesh/merge-gate pass: builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step; every machine composes with the change as it…
mesh/repo-check pass: its merge-check.sh passed

This commit is contained in:
jochen
2026-10-08 15:05:53 +02:00
parent f3c2ef985e
commit 428bacc1b0
3 changed files with 11 additions and 4 deletions
+6 -2
View File
@@ -389,6 +389,10 @@ func moduleUnhealthyObservation(module, node string, rs []inventory.ResourceHeal
// reasonWords is why a resource is unhealthy, as a person reads it.
func reasonWords(r inventory.ResourceHealth) string {
// An account waiting for a new login (ADR 0252) is said in the mesh's words, not the engine's.
if r.Kind == link.KindAccount && strings.HasPrefix(r.Reason, link.ReasonRelogin) {
return fmt.Sprintf("waits for a new login of %s, which is in the group and logged in before it was", accountOf(r))
}
switch r.Reason {
case "restarting":
return fmt.Sprintf("keeps restarting (%d restart(s) counted)", r.Restarts)
@@ -453,11 +457,11 @@ func personWait(module, machine string, rs []inventory.ResourceHealth) (string,
}
}
said := fmt.Sprintf("relogin needed on %s: %s waits for a new login of %s, which is in its group and whose "+
"running session began before it was; log out of every session and in again, or reboot", machine, module,
"login began before it was; log out of %[1]s completely and log in again, or restart it", machine, module,
strings.Join(accounts, ", "))
if len(units) > 0 {
sort.Strings(units)
said += fmt.Sprintf(" (until then %s cannot run in that session)", strings.Join(units, ", "))
said += fmt.Sprintf(" (until then %s cannot run)", strings.Join(units, ", "))
}
return said, true
}
+1 -1
View File
@@ -661,7 +661,7 @@ func moduleNeeds(node string, rs []inventory.ResourceHealth) (string, []conditio
var actions []conditions.Action
for _, r := range rs {
if strings.Contains(r.Reason, "relogin needed") {
return fmt.Sprintf("log out of every session on %s and log in again.", node), nil
return fmt.Sprintf("log out of %s completely and log in again, or restart it.", node), nil
}
if r.Kind == link.KindUnit && len(actions) < 2 {
scope := "system"
+4 -1
View File
@@ -102,9 +102,12 @@ func TestAModuleUnhealthyOffersARestartOfItsService(t *testing.T) {
// An account waiting for a new login (ADR 0252) asks for the login, which no button can give.
o = moduleUnhealthyObservation("openrazer", "g14", []inventory.ResourceHealth{{Kind: "account",
Resource: "operator-in-group", Target: "jochen", Reason: "relogin needed: the account is in the group"}})
if o.Needs != "log out of every session on g14 and log in again." || len(o.Actions) != 0 {
if o.Needs != "log out of g14 completely and log in again, or restart it." || len(o.Actions) != 0 {
t.Errorf("relogin: %q %+v", o.Needs, o.Actions)
}
if strings.Contains(o.Summary, "session") || !strings.Contains(o.Summary, "waits for a new login of jochen") {
t.Errorf("relogin summary: %q", o.Summary)
}
}
// **Failed units on a machine**: "shanks's service manager is degraded: 3 failed unit(s) no module places —