Fix global bucket key path in bootstrap having accidentally changed

This commit is contained in:
Brian Picciano 2022-10-15 18:55:24 +02:00
parent af7c8dde32
commit 30584973be
3 changed files with 4 additions and 2 deletions

View File

@ -57,7 +57,7 @@ func FromFS(bootstrapFS fs.FS) (Bootstrap, error) {
bootstrapFS,
garageGlobalBucketKeyYmlPath,
); err != nil {
return Bootstrap{}, fmt.Errorf("loading %q from fs: %w", b.GarageGlobalBucketS3APICredentials, err)
return Bootstrap{}, fmt.Errorf("loading %q from fs: %w", garageGlobalBucketKeyYmlPath, err)
}
filesToLoadAsString := []struct {

View File

@ -6,7 +6,7 @@ import (
// Paths within the bootstrap FS related to garage.
const (
garageGlobalBucketKeyYmlPath = "garage/global-bucket-key.yml"
garageGlobalBucketKeyYmlPath = "garage/cryptic-net-global-bucket-key.yml"
garageRPCSecretPath = "garage/rpc-secret.txt"
)

View File

@ -10,6 +10,8 @@ import (
// will otherwise return a random endpoint.
func (env *Env) ChooseGaragePeer() garage.Peer {
// TODO this only works well within the daemon process, otherwise daemon.yml
// isn't available.
if allocs := env.ThisDaemon().Storage.Allocations; len(allocs) > 0 {
return garage.Peer{