Skip to content

Commit

Permalink
add debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed Oct 26, 2023
1 parent af8f8ff commit d4fff00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,7 @@ func (a *Agent) Failed() <-chan struct{} {
// the PRoxyWatcher interface and registers the XDS server with Consul's
// external facing GRPC server.
func (a *Agent) configureXDSServer(proxyWatcher xds.ProxyWatcher, server *consul.Server) {
a.logger.Debug("configureXDSServer", "proxyWatcher", proxyWatcher, "server", server)
// TODO(agentless): rather than asserting the concrete type of delegate, we
// should add a method to the Delegate interface to build a ConfigSource.
if server != nil {
Expand Down Expand Up @@ -964,6 +965,7 @@ func (a *Agent) configureXDSServer(proxyWatcher xds.ProxyWatcher, server *consul
}

func (a *Agent) listenAndServeGRPC(proxyTracker *proxytracker.ProxyTracker, server *consul.Server) error {
a.logger.Debug("listenAndServeGRPC", "proxyTracker", proxyTracker, "server", server)
if len(a.config.GRPCAddrs) < 1 && len(a.config.GRPCTLSAddrs) < 1 {
return nil
}
Expand Down Expand Up @@ -4570,6 +4572,7 @@ func (a *Agent) listenerPortLocked(svcID structs.ServiceID, checkID structs.Chec
}

func (a *Agent) proxyDataSources(server *consul.Server) proxycfg.DataSources {
a.logger.Debug("proxyDataSources", "server", server)
sources := proxycfg.DataSources{
CARoots: proxycfgglue.CacheCARoots(a.cache),
CompiledDiscoveryChain: proxycfgglue.CacheCompiledDiscoveryChain(a.cache),
Expand Down
3 changes: 3 additions & 0 deletions agent/consul/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@ type ProxyUpdater interface {
func NewServer(config *Config, flat Deps, externalGRPCServer *grpc.Server,
incomingRPCLimiter rpcRate.RequestLimitsHandler, serverLogger hclog.InterceptLogger, proxyUpdater ProxyUpdater) (*Server, error) {
logger := flat.Logger
logger.Debug("NewServer", "config", config, "flat", flat, "externalGRPCServer", externalGRPCServer,
"incomingRPCLimiter", incomingRPCLimiter, "serverLogger", serverLogger, "proxyUpdater", proxyUpdater)

if err := config.CheckProtocolVersion(); err != nil {
return nil, err
}
Expand Down

0 comments on commit d4fff00

Please sign in to comment.