bootstrap: the slot the installer fills is not a registry to reach for
The first real run of mesh-bootstrap stopped in preflight, dialling 192.0.2.250:5000 for ninety seconds on a machine whose network was fine. That address is the registry the lab used to raise; the substrate template still names the control plane by it, and step 3 replaces that reference with the id of the image this installer carries. Nothing ever pulls it. So preflight excludes the control plane's resource by identity, rather than by the happy accident of the template filling its slot with something that needs no registry. Every other container's registry is still dialled, because those are somebody else's images at somebody else's registry and a machine that cannot reach one fails inside a pull, which says the wrong thing. Also: `make bootstrap` takes BOOTSTRAP_OUT. The lab now builds the installer from source before every raise, into a path it chooses, and a caller that could not say where the output goes would have to copy it afterwards. Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
This commit is contained in:
@@ -104,6 +104,15 @@ func Preflight(ctx context.Context, o Options, d Deps, say func(string)) ([]byte
|
||||
// reason. Everything else is somebody else's image at somebody else's registry, and a machine
|
||||
// that cannot reach it fails inside a pull, which reports a network error where a person
|
||||
// reads a missing image.
|
||||
//
|
||||
// "The mesh's own image is skipped" used to mean "skipped if the template happened to name it
|
||||
// in a way that needs no registry", and that is not the same sentence. A template names the
|
||||
// control plane by SOMETHING — the reference is a slot, and step 3 replaces whatever is in it
|
||||
// with the id of the image this installer carries. Whatever the slot held is therefore never
|
||||
// pulled, never fetched, and never reached; requiring it to be reachable refuses a correct
|
||||
// install because of a string that is about to be thrown away. Found on the first real run: the
|
||||
// lab's template still carried `192.0.2.250:5000/mesh-control@…`, the address of a registry that
|
||||
// no longer exists, and preflight timed out dialling it.
|
||||
for _, host := range registriesIn(parsed) {
|
||||
dialing, cancel := context.WithTimeout(ctx, o.Timeout)
|
||||
err := d.Dial(dialing, host)
|
||||
@@ -171,12 +180,17 @@ func containerRuntimeDetector(run Runner) profile.Detector {
|
||||
|
||||
// registriesIn is every host the bundle's images would be fetched from, without duplicates and in
|
||||
// the order they appear.
|
||||
//
|
||||
// The control plane's own resource is excluded by identity rather than by the shape of what it
|
||||
// names. Its image reference is a slot the installer overwrites with the id of the image it
|
||||
// carries, so no registry ever serves it — and a template that filled that slot with a registry
|
||||
// this machine cannot reach is not a machine with a network problem.
|
||||
func registriesIn(d *declaration.Declaration) []string {
|
||||
var hosts []string
|
||||
seen := map[string]bool{}
|
||||
for _, r := range d.Resources {
|
||||
container, ok := r.(*declaration.Container)
|
||||
if !ok {
|
||||
if !ok || container.Identity() == ControlPlaneID {
|
||||
continue
|
||||
}
|
||||
host, served := registryOf(container.Image)
|
||||
|
||||
Reference in New Issue
Block a user