From 7507a250c7a34d0a225814ac9d9101db723f3694 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 15 Nov 2026 17:20:35 +0100 Subject: [PATCH] grants: say each pass's decision on the user list; stop creating buckets for the pass once the bus refuses one The user list in force on novox stayed at 14:53 UTC while the shadow list changed, and the pass said nothing of why; each refused create of a state's object store waited out its bound, one after another. Recovery mode (lead-47). --- modules/mesh-grants/internal/grants/part.go | 11 ++++++++++- modules/mesh-grants/internal/grants/sealed.go | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/mesh-grants/internal/grants/part.go b/modules/mesh-grants/internal/grants/part.go index 1c84dc26..243b87b3 100644 --- a/modules/mesh-grants/internal/grants/part.go +++ b/modules/mesh-grants/internal/grants/part.go @@ -570,13 +570,14 @@ func (p *Part) Compose() Result { res.NotAsserted = append(res.NotAsserted, "kept event "+why) } } + createRefused := false for _, module := range sortedKeys(in.Manifests) { if !assigned(in, module) { continue } a := Assert(module, in.Digests[module], in.Manifests[module], in.Nodes, held, heldErr) // Created only where the bus was read and lacks it, never changed where it holds it (issue 1790). - if p.Create != nil && heldErr == nil { + if p.Create != nil && heldErr == nil && !createRefused { if made, raises := createMissing(p.Create, &p.made, &a, in.Manifests[module], in.Nodes, forced == module); len(made) > 0 { res.Asserted = append(res.Asserted, fmt.Sprintf("%s at %s: created %s", module, a.Manifest, strings.Join(made, ", "))) if p.Logf != nil { @@ -586,6 +587,14 @@ func (p *Part) Compose() Result { } for _, why := range notCreated(a) { res.NotAsserted = append(res.NotAsserted, module+" "+why) + // A create the bus refuses or leaves unanswered is not tried for the rest of this pass: each waits out its + // bound, and the grant that admits it comes with the list this pass wrote (lead-47, 2026-11-15). + if strings.Contains(why, "deadline exceeded") || strings.Contains(why, "ermission") { + createRefused = true + } + } + if createRefused && p.Logf != nil { + p.Logf("a create was refused at %s: no more buckets are created this pass", module) } } res.Assertions++ diff --git a/modules/mesh-grants/internal/grants/sealed.go b/modules/mesh-grants/internal/grants/sealed.go index cd5b27ff..aec8e29e 100644 --- a/modules/mesh-grants/internal/grants/sealed.go +++ b/modules/mesh-grants/internal/grants/sealed.go @@ -126,6 +126,9 @@ func (p *Part) writeSealed(res *Result, list []byte, users int, leftOut, dropped next.Digest, next.Object, next.SealedTo, next.Node = digest, grantsstate.UserListObjectName(digest), grantsstate.SealingKeyID(key), in.BusNode } p.sayHeld(held) + if p.Logf != nil { + p.Logf("the user list: composed %s, in force %s, sealed to key %q, bus node %q, held %q, why %q", short(digest), short(cur.Digest), short(key), in.BusNode, held, why) + } if next.Digest == digest { next.Users, next.LeftOut = users, leftOut }