diff --git a/entrypoint/src/cmd/entrypoint/garage_util.go b/entrypoint/src/cmd/entrypoint/garage_util.go index a9bbca1..b860b69 100644 --- a/entrypoint/src/cmd/entrypoint/garage_util.go +++ b/entrypoint/src/cmd/entrypoint/garage_util.go @@ -265,9 +265,14 @@ func garageApplyLayout( id := bootstrapGarageHostForAlloc(thisHost, alloc).ID + zone := hostName + if alloc.Zone != "" { + zone = alloc.Zone + } + clusterLayout[id] = peerLayout{ Capacity: alloc.Capacity / 100, - Zone: hostName, + Zone: zone, Tags: []string{}, } } diff --git a/entrypoint/src/daemon/config.go b/entrypoint/src/daemon/config.go index 1e45458..51d78e3 100644 --- a/entrypoint/src/daemon/config.go +++ b/entrypoint/src/daemon/config.go @@ -36,6 +36,10 @@ type ConfigStorageAllocation struct { S3APIPort int `yaml:"s3_api_port"` RPCPort int `yaml:"rpc_port"` AdminPort int `yaml:"admin_port"` + + // Zone is a secret option which makes it easier to test garage bugs, but + // which we don't want users to otherwise know about. + Zone string `yaml:"zone"` } // Config describes the structure of the daemon config file.