Compare commits
No commits in common. "b1fa3be97041390363497770506ecf2d6b4b41ec" and "da100c6170f14f30ca6099fece6e47b39ef81530" have entirely different histories.
b1fa3be970
...
da100c6170
@ -36,12 +36,15 @@ var subCmdGarageMC = subCmd{
|
|||||||
|
|
||||||
s3APIAddr := hostBootstrap.ChooseGaragePeer().S3APIAddr()
|
s3APIAddr := hostBootstrap.ChooseGaragePeer().S3APIAddr()
|
||||||
|
|
||||||
if *keyID == "" {
|
if *keyID == "" || *keySecret == "" {
|
||||||
*keyID = hostBootstrap.Garage.GlobalBucketS3APICredentials.ID
|
|
||||||
}
|
|
||||||
|
|
||||||
if *keySecret == "" {
|
if *keyID == "" {
|
||||||
*keySecret = hostBootstrap.Garage.GlobalBucketS3APICredentials.Secret
|
*keyID = hostBootstrap.Garage.GlobalBucketS3APICredentials.ID
|
||||||
|
}
|
||||||
|
|
||||||
|
if *keySecret == "" {
|
||||||
|
*keyID = hostBootstrap.Garage.GlobalBucketS3APICredentials.Secret
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
args := flags.Args()
|
args := flags.Args()
|
||||||
@ -53,15 +56,13 @@ var subCmdGarageMC = subCmd{
|
|||||||
args = append([]string{"mc"}, args...)
|
args = append([]string{"mc"}, args...)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
mcHostVar = fmt.Sprintf(
|
|
||||||
"MC_HOST_garage=http://%s:%s@%s",
|
|
||||||
*keyID, *keySecret, s3APIAddr,
|
|
||||||
)
|
|
||||||
|
|
||||||
binPath = filepath.Join(envAppDirPath, "bin/mc")
|
binPath = filepath.Join(envAppDirPath, "bin/mc")
|
||||||
cliEnv = append(
|
cliEnv = append(
|
||||||
os.Environ(),
|
os.Environ(),
|
||||||
mcHostVar,
|
fmt.Sprintf(
|
||||||
|
"MC_HOST_garage=http://%s:%s@%s",
|
||||||
|
*keyID, *keySecret, s3APIAddr,
|
||||||
|
),
|
||||||
|
|
||||||
// The garage docs say this is necessary, though nothing bad
|
// The garage docs say this is necessary, though nothing bad
|
||||||
// seems to happen if we leave it out *shrug*
|
// seems to happen if we leave it out *shrug*
|
||||||
|
@ -265,14 +265,9 @@ func garageApplyLayout(
|
|||||||
|
|
||||||
id := bootstrapGarageHostForAlloc(thisHost, alloc).ID
|
id := bootstrapGarageHostForAlloc(thisHost, alloc).ID
|
||||||
|
|
||||||
zone := hostName
|
|
||||||
if alloc.Zone != "" {
|
|
||||||
zone = alloc.Zone
|
|
||||||
}
|
|
||||||
|
|
||||||
clusterLayout[id] = peerLayout{
|
clusterLayout[id] = peerLayout{
|
||||||
Capacity: alloc.Capacity / 100,
|
Capacity: alloc.Capacity / 100,
|
||||||
Zone: zone,
|
Zone: hostName,
|
||||||
Tags: []string{},
|
Tags: []string{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,10 +36,6 @@ type ConfigStorageAllocation struct {
|
|||||||
S3APIPort int `yaml:"s3_api_port"`
|
S3APIPort int `yaml:"s3_api_port"`
|
||||||
RPCPort int `yaml:"rpc_port"`
|
RPCPort int `yaml:"rpc_port"`
|
||||||
AdminPort int `yaml:"admin_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.
|
// Config describes the structure of the daemon config file.
|
||||||
|
Loading…
Reference in New Issue
Block a user