From 838c54870675fff42151e8ae75b791578f3dff5d Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Tue, 8 Nov 2022 14:54:31 +0100 Subject: [PATCH] Fix random bugs related to using garage cli tools --- AppDir/etc/daemon.yml | 4 ++-- entrypoint/src/cmd/entrypoint/garage.go | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/AppDir/etc/daemon.yml b/AppDir/etc/daemon.yml index 7308d6a..9d59d13 100644 --- a/AppDir/etc/daemon.yml +++ b/AppDir/etc/daemon.yml @@ -78,6 +78,6 @@ storage: #- data_path: /foo/bar/data # meta_path: /foo/bar/meta # capacity: 1200 - # #s3_api_port: 3900 - # #rpc_port: 3901 + # #rpc_port: 3900 + # #s3_api_port: 3901 # #admin_port: 3902 diff --git a/entrypoint/src/cmd/entrypoint/garage.go b/entrypoint/src/cmd/entrypoint/garage.go index 37e77c4..ce346d4 100644 --- a/entrypoint/src/cmd/entrypoint/garage.go +++ b/entrypoint/src/cmd/entrypoint/garage.go @@ -3,6 +3,7 @@ package main import ( "fmt" "os" + "path/filepath" "syscall" ) @@ -55,7 +56,7 @@ var subCmdGarageMC = subCmd{ args = append([]string{"mc"}, args...) var ( - binPath = "mc" + binPath = filepath.Join(envAppDirPath, "bin/mc") cliEnv = append( os.Environ(), fmt.Sprintf( @@ -92,11 +93,11 @@ var subCmdGarageCLI = subCmd{ } var ( - binPath = "garage" + binPath = filepath.Join(envAppDirPath, "bin/garage") args = append([]string{"garage"}, subCmdCtx.args...) cliEnv = append( os.Environ(), - "GARAGE_RPC_HOST="+hostBootstrap.ChooseGaragePeer().RPCAddr(), + "GARAGE_RPC_HOST="+hostBootstrap.ChooseGaragePeer().RPCPeerAddr(), "GARAGE_RPC_SECRET="+hostBootstrap.Garage.RPCSecret, ) )