distribution's program listens on 5100 and the registry container on 5001, so no mapping names the store's port
mesh/delivery closed: a newer head of the same pull request
mesh/check checking 6cf7f67a1dfd on 08fbc51af26f

The composer finds a listen's machine port in a container mapping that names
it on either side (MachineSide). The program's listen 5000 matched the
registry container's inner 5000 in 127.0.0.1:5001:5000, so the store's address
became the container's loopback side and the program's own port was never
opened: the move to 83cd1a3d on 2026-11-08 23:25 UTC cut the artifact store off
(issue 1966 note 109). The program now binds 5100, where every machine fetches
(the artifact-store alias and the seats' reach agree), and the container serves
5001 inside and out. A row holds that no container names 5100.

Undo: revert this commit.

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-09 01:40:49 +01:00
parent 08fbc51af2
commit 6cf7f67a1d
5 changed files with 18 additions and 8 deletions
@@ -417,10 +417,10 @@ func tools(v *holder.Verbs, windows kept[holder.Window], callers func() (holder.
} }
return map[string]any{"callers": c}, nil return map[string]any{"callers": c}, nil
}}, }},
stdio.Tool{Name: "registry_health", Description: "distribution's health check, run by the runtime each minute: versions of each seat asked through the store's read side (the program's port 5000); fails naming the program when it does not answer.", stdio.Tool{Name: "registry_health", Description: "distribution's health check, run by the runtime each minute: versions of each seat asked through the store's read side (the program's port 5100); fails naming the program when it does not answer.",
Input: obj(map[string]any{}), Input: obj(map[string]any{}),
Run: func(map[string]any) (any, error) { Run: func(map[string]any) (any, error) {
front, _ := url.Parse("http://127.0.0.1:5000") front, _ := url.Parse("http://127.0.0.1:5100")
return holder.Health(&holder.OCI{Base: front}, finding) return holder.Health(&holder.OCI{Base: front}, finding)
}}, }},
stdio.Tool{Name: "registry_incoming", Description: "Open transfers of incoming and its fill; with drop, drops one by hand (a hand act, why required).", stdio.Tool{Name: "registry_incoming", Description: "Open transfers of incoming and its fill; with drop, drops one by hand (a hand act, why required).",
@@ -71,7 +71,7 @@ func run(ctx context.Context, getenv func(string) string) error {
d, err := oci.Digest(name, tag) d, err := oci.Digest(name, tag)
return d != "", err return d != "", err
}} }}
srv := &http.Server{Addr: or(getenv("MESH_REGISTRY_LISTEN"), ":5000"), Handler: front, ReadHeaderTimeout: 30 * time.Second} srv := &http.Server{Addr: or(getenv("MESH_REGISTRY_LISTEN"), ":5100"), Handler: front, ReadHeaderTimeout: 30 * time.Second}
errs := make(chan error, 1) errs := make(chan error, 1)
go func() { errs <- srv.ListenAndServe() }() go func() { errs <- srv.ListenAndServe() }()
logger.Printf("serving the store's port %s in front of %s", srv.Addr, store) logger.Printf("serving the store's port %s in front of %s", srv.Addr, store)
@@ -17,7 +17,7 @@ func Health(front Catalog, finding func(kind, subject, words string, raised bool
for _, seat := range Seats { for _, seat := range Seats {
got, err := front.Versions(ProbeName) got, err := front.Versions(ProbeName)
if err != nil { if err != nil {
words := fmt.Sprintf("the store's read side does not answer %s's versions through distribution's program (port 5000): %v; is the program distribution running?", seat, err) words := fmt.Sprintf("the store's read side does not answer %s's versions through distribution's program (port 5100): %v; is the program distribution running?", seat, err)
if finding != nil { if finding != nil {
finding(FindingReadSide, seat, words, true) finding(FindingReadSide, seat, words, true)
} }
@@ -869,7 +869,7 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) {
switch r["id"] { switch r["id"] {
case "store": case "store":
store = i store = i
if ports, _ := r["ports"].([]any); len(ports) != 1 || ports[0] != "127.0.0.1:5001:5000" { if ports, _ := r["ports"].([]any); len(ports) != 1 || ports[0] != "127.0.0.1:5001:5001" {
t.Errorf("the store's ports = %v, want the loopback only", r["ports"]) t.Errorf("the store's ports = %v, want the loopback only", r["ports"])
} }
// The check of another kind beside the program's tool (ADR 0227 rule 8, ADR 0240 rule 2; the operator, // The check of another kind beside the program's tool (ADR 0227 rule 8, ADR 0240 rule 2; the operator,
@@ -887,6 +887,15 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) {
if store < 0 || program < 0 || store > program { if store < 0 || program < 0 || store > program {
t.Errorf("store at %d, program at %d: want the store listed first", store, program) t.Errorf("store at %d, program at %d: want the store listed first", store, program)
} }
// The store's address is the listen registry where the machine put it (ADR 0632 §1), and the program binds it
// itself: no container's mapping may name its port on either side, or the composer reads that mapping's loopback
// side as the address (the move of 2026-11-08 23:25 UTC cut the store off so; issue 1966 note 109).
if len(m.Listens) != 1 || m.Listens[0].Port != 5100 {
t.Fatalf("listens = %+v, want registry on 5100, where every machine fetches", m.Listens)
}
if at, mayAssign := m.MachineSide(5100); at != 5100 || mayAssign {
t.Errorf("the machine side of 5100 = %d (may assign %v), want 5100 bound by the program, named by no container", at, mayAssign)
}
// Running review F2: incoming asks the bus 8 GiB, the most the objects template allows, equal to IncomingCap // Running review F2: incoming asks the bus 8 GiB, the most the objects template allows, equal to IncomingCap
// (said only where no binding is read); transfers keeps for good, the holder dropping an idle one by its key // (said only where no binding is read); transfers keeps for good, the holder dropping an idle one by its key
// in idle, a state of keys with their own time to live. // in idle, a state of keys with their own time to live.
+4 -3
View File
@@ -147,7 +147,7 @@
"listens": [ "listens": [
{ {
"name": "registry", "name": "registry",
"port": 5000, "port": 5100,
"protocol": "tcp", "protocol": "tcp",
"from": "mesh", "from": "mesh",
"why": "every machine pulls images and artifacts from here; distribution's program serves it in front of the store" "why": "every machine pulls images and artifacts from here; distribution's program serves it in front of the store"
@@ -195,12 +195,13 @@
"name": "mesh-registry", "name": "mesh-registry",
"image": "registry@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373", "image": "registry@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373",
"ports": [ "ports": [
"127.0.0.1:5001:5000" "127.0.0.1:5001:5001"
], ],
"volumes": [ "volumes": [
"/var/lib/mesh-registry:/var/lib/registry" "/var/lib/mesh-registry:/var/lib/registry"
], ],
"env": { "env": {
"REGISTRY_HTTP_ADDR": ":5001",
"REGISTRY_STORAGE_DELETE_ENABLED": "true" "REGISTRY_STORAGE_DELETE_ENABLED": "true"
}, },
"health": { "health": {
@@ -225,7 +226,7 @@
"env": { "env": {
"MESH_BROKER_FILE": "/var/lib/mesh/registry/broker", "MESH_BROKER_FILE": "/var/lib/mesh/registry/broker",
"MESH_REGISTRY_LOOPBACK": "http://127.0.0.1:5001", "MESH_REGISTRY_LOOPBACK": "http://127.0.0.1:5001",
"MESH_REGISTRY_LISTEN": ":5000" "MESH_REGISTRY_LISTEN": ":5100"
}, },
"user": "distribution", "user": "distribution",
"health": { "health": {