diff --git a/modules/distribution/cmd/distribution-tools/main.go b/modules/distribution/cmd/distribution-tools/main.go index baf4b2b3c..dc80fc85d 100644 --- a/modules/distribution/cmd/distribution-tools/main.go +++ b/modules/distribution/cmd/distribution-tools/main.go @@ -417,10 +417,10 @@ func tools(v *holder.Verbs, windows kept[holder.Window], callers func() (holder. } 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{}), 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) }}, stdio.Tool{Name: "registry_incoming", Description: "Open transfers of incoming and its fill; with drop, drops one by hand (a hand act, why required).", diff --git a/modules/distribution/cmd/distribution/main.go b/modules/distribution/cmd/distribution/main.go index 0de9470b9..8db8da6a4 100644 --- a/modules/distribution/cmd/distribution/main.go +++ b/modules/distribution/cmd/distribution/main.go @@ -71,7 +71,7 @@ func run(ctx context.Context, getenv func(string) string) error { d, err := oci.Digest(name, tag) 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) go func() { errs <- srv.ListenAndServe() }() logger.Printf("serving the store's port %s in front of %s", srv.Addr, store) diff --git a/modules/distribution/internal/holder/health.go b/modules/distribution/internal/holder/health.go index 1473e5639..4613b331f 100644 --- a/modules/distribution/internal/holder/health.go +++ b/modules/distribution/internal/holder/health.go @@ -17,7 +17,7 @@ func Health(front Catalog, finding func(kind, subject, words string, raised bool for _, seat := range Seats { got, err := front.Versions(ProbeName) 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 { finding(FindingReadSide, seat, words, true) } diff --git a/modules/distribution/internal/holder/holder_test.go b/modules/distribution/internal/holder/holder_test.go index 473c11379..eb7026021 100644 --- a/modules/distribution/internal/holder/holder_test.go +++ b/modules/distribution/internal/holder/holder_test.go @@ -869,7 +869,7 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) { switch r["id"] { case "store": 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"]) } // 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 { 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 // (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. diff --git a/modules/distribution/module.json b/modules/distribution/module.json index c73e74dd7..e834f13fc 100644 --- a/modules/distribution/module.json +++ b/modules/distribution/module.json @@ -147,7 +147,7 @@ "listens": [ { "name": "registry", - "port": 5000, + "port": 5100, "protocol": "tcp", "from": "mesh", "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", "image": "registry@sha256:a3d8aaa63ed8681a604f1dea0aa03f100d5895b6a58ace528858a7b332415373", "ports": [ - "127.0.0.1:5001:5000" + "127.0.0.1:5001:5001" ], "volumes": [ "/var/lib/mesh-registry:/var/lib/registry" ], "env": { + "REGISTRY_HTTP_ADDR": ":5001", "REGISTRY_STORAGE_DELETE_ENABLED": "true" }, "health": { @@ -225,7 +226,7 @@ "env": { "MESH_BROKER_FILE": "/var/lib/mesh/registry/broker", "MESH_REGISTRY_LOOPBACK": "http://127.0.0.1:5001", - "MESH_REGISTRY_LISTEN": ":5000" + "MESH_REGISTRY_LISTEN": ":5100" }, "user": "distribution", "health": {