Skip to content

Commit

Permalink
Add logs for GetBootstrapDataRequest request and
Browse files Browse the repository at this point in the history
ReportStatus request and the sender IP.
  • Loading branch information
yvetteyuanw committed Sep 3, 2024
1 parent e0eb604 commit 93ec3ca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion server/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (s *Service) GetBootstrapData(ctx context.Context, req *bpb.GetBootstrapDat
if err != nil {
return nil, err
}
log.Infof("Received GetBootstrapData request from %v", peerAddr)
log.Infof("Received GetBootstrapData request(%+v) from %v", req, peerAddr)
fixedChasis := true
ccSerial := ""
chassisDesc := req.GetChassisDescriptor()
Expand Down Expand Up @@ -266,6 +266,13 @@ func (s *Service) ReportStatus(ctx context.Context, req *bpb.ReportStatusRequest
log.Infof("=============================================================================")
log.Infof("========================== Status report received ===========================")
log.Infof("=============================================================================")

peerAddr, err := peerAddressFromContext(ctx)
if err != nil {
return nil, err
}
log.Infof("Received ReportStatus(%+v) request from %v", req, peerAddr)

return &bpb.EmptyResponse{}, s.em.SetStatus(ctx, req)
}

Expand Down

0 comments on commit 93ec3ca

Please sign in to comment.