From de141e34a9098c41c2e604e06d8503ed0643bf69 Mon Sep 17 00:00:00 2001 From: Ryan Derr <54389874+RyanDerr@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:51:55 -0500 Subject: [PATCH] Worker Connection Failure Add Controller Target (#5109) * ICU-11692 Add Upstream Controller Addrs When Throwing Controller Connection Failure * Reference Consistant Load Variable For Client Connection --- internal/daemon/worker/status.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/daemon/worker/status.go b/internal/daemon/worker/status.go index dbddbc8b2..6e4f97870 100644 --- a/internal/daemon/worker/status.go +++ b/internal/daemon/worker/status.go @@ -181,8 +181,9 @@ func (w *Worker) sendWorkerStatus(cancelCtx context.Context, sessionManager sess return true }) + clientCon := w.GrpcClientConn.Load() // Send status information - client := pbs.NewServerCoordinationServiceClient(w.GrpcClientConn.Load()) + client := pbs.NewServerCoordinationServiceClient(clientCon) var tags []*pb.TagPair // If we're not going to request a tag update, no reason to have these // marshaled on every status call. @@ -230,7 +231,7 @@ func (w *Worker) sendWorkerStatus(cancelCtx context.Context, sessionManager sess UpdateTags: w.updateTags.Load(), }) if err != nil { - event.WriteError(cancelCtx, op, err, event.WithInfoMsg("error making status request to controller")) + event.WriteError(cancelCtx, op, err, event.WithInfoMsg("error making status request to controller", "controller_address", clientCon.Target())) // Check for last successful status. Ignore nil last status, this probably // means that we've never connected to a controller, and as such probably // don't have any sessions to worry about anyway.