| index 3609e6813..f8861b37d 100644 |
| --- a/internal/host/edgesfile.go |
| +++ b/internal/host/edgesfile.go |
| @@ -15,7 +15,6 @@ import ( |
| "github.com/carlosframework/platform/internal/appconfig" |
| "github.com/carlosframework/platform/internal/registry" |
| "github.com/carlosframework/platform/internal/release" |
| - "github.com/carlosframework/platform/internal/status" |
| |
| "github.com/carlosframework/platform/internal/domains" |
| ) |
| @@ -155,14 +154,6 @@ type edgeHeadroom struct { |
| |
| const capRegionHA1 = "region-ha-1" |
| |
| -// edgesFileBoxID is the instance id on EC2 and the label everywhere else. |
| -func edgesFileBoxID(instanceID, label string) string { |
| - if instanceID != "" { |
| - return instanceID |
| - } |
| - return label |
| -} |
| - |
| // edgesFileCapabilities publishes region-ha-1 only when CARLOS_REGION_HA is |
| // set to something other than "" or "0". |
| func edgesFileCapabilities(getenv func(string) string) []string { |
| @@ -277,8 +268,10 @@ type edgesFile struct { |
| // R9). The console requires it to equal the fingerprint of its own |
| // CARLOS_SECRETS_PUBKEY before it places anything here automatically. |
| SecretsKeyFP string `json:"secrets_key_fp,omitempty"` |
| - // BoxID is the name claims use for this box (region HA spec 1 §2): the |
| - // EC2 instance id, or the label off EC2. It is NOT evidence of identity: |
| + // BoxID is the name claims use for this box (region HA spec 1 §2). |
| + // Today it is the box's label: every box predates region HA and keeps |
| + // it. Plan 1b adds instance ids for Auto Scaling boxes, from a positive |
| + // signal rather than from being on EC2. It is NOT evidence of identity: |
| // that is the box record (internal/boxid). A reader compares the two and |
| // treats a mismatch as an ineligible box. |
| BoxID string `json:"box_id,omitempty"` |
| @@ -738,7 +731,7 @@ func edgesFileLoop(reg *registry.Registry) { |
| ServesSharedPool: sharedPool, |
| AcceptsInbound: inbound, |
| SecretsKeyFP: edgesFileSecretsFP(os.Getenv), |
| - BoxID: edgesFileBoxID(status.InstanceID(), box), |
| + BoxID: box, |
| Capabilities: edgesFileCapabilities(os.Getenv), |
| } |
| dataDir := provisionTickConfig(os.Getenv).DataDir |