fix bin worker failure due to reaper
@@ -11,6 +11,7 @@ import (
"github.com/concourse/flag"
concourseWorker "github.com/concourse/worker"
"github.com/concourse/worker/beacon"
+ "github.com/concourse/worker/reaper"
workerConfig "github.com/concourse/worker/start"
"github.com/concourse/worker/tsa"
"github.com/tedsuo/ifrit"
@@ -90,7 +91,7 @@ func (cmd *WorkerCommand) Runner(args []string) (ifrit.Runner, error) {
if cmd.PeerIP.IP != nil {
worker.GardenAddr = fmt.Sprintf("%s:%d", cmd.PeerIP.IP, cmd.BindPort)
worker.BaggageclaimURL = fmt.Sprintf("http://%s:%d", cmd.PeerIP.IP, cmd.Baggageclaim.BindPort)
- worker.ReaperAddr = fmt.Sprintf("http://%s:%d", cmd.PeerIP.IP, "7799")
+ worker.ReaperAddr = fmt.Sprintf("http://%s:%d", cmd.PeerIP.IP, 7799)
beaconConfig.RegistrationMode = "direct"
} else {
@@ -100,7 +101,7 @@ func (cmd *WorkerCommand) Runner(args []string) (ifrit.Runner, error) {
worker.GardenAddr = beaconConfig.GardenForwardAddr
worker.BaggageclaimURL = fmt.Sprintf("http://%s", beaconConfig.BaggageclaimForwardAddr)
- worker.ReaperAddr = fmt.Sprintf("http://%s:%d", cmd.BindIP.IP, "7799")
+ worker.ReaperAddr = fmt.Sprintf("http://%s:%d", cmd.BindIP.IP, 7799)
}
members = append(members, grouper.Member{
@@ -111,6 +112,14 @@ func (cmd *WorkerCommand) Runner(args []string) (ifrit.Runner, error) {
beaconConfig,
),
})
+ members = append(members, grouper.Member{
+ Name: "reaper",
+ Runner: reaper.NewReaperRunner(
+ logger.Session("reaper"),
+ worker.GardenAddr,
+ "7799",
+ ),
+ })
}
return grouper.NewParallel(os.Interrupt, members), nil
