diff --git a/src/plugins/registration.go b/src/plugins/registration.go index 1e113b69fb..d830ff9db0 100644 --- a/src/plugins/registration.go +++ b/src/plugins/registration.go @@ -45,6 +45,7 @@ type OneTimeRegistration struct { pipeline core.MessagePipeInterface dataplaneSoftwareDetailsMutex sync.Mutex processes []*core.Process + logOnce sync.Once } func NewOneTimeRegistration( @@ -186,6 +187,10 @@ func (r *OneTimeRegistration) registerAgent() { log.Tracef("NGINX non-master process: %d", proc.Pid) } } + + r.logOnce.Do(func() { + log.Errorf("NGINX master process not found yet, waiting for NGINX to start...") + }) return fmt.Errorf("waiting for NGINX master process... ") } err := backoff.WaitUntil( diff --git a/test/performance/vendor/github.com/nginx/agent/v2/src/plugins/registration.go b/test/performance/vendor/github.com/nginx/agent/v2/src/plugins/registration.go index 1e113b69fb..d830ff9db0 100644 --- a/test/performance/vendor/github.com/nginx/agent/v2/src/plugins/registration.go +++ b/test/performance/vendor/github.com/nginx/agent/v2/src/plugins/registration.go @@ -45,6 +45,7 @@ type OneTimeRegistration struct { pipeline core.MessagePipeInterface dataplaneSoftwareDetailsMutex sync.Mutex processes []*core.Process + logOnce sync.Once } func NewOneTimeRegistration( @@ -186,6 +187,10 @@ func (r *OneTimeRegistration) registerAgent() { log.Tracef("NGINX non-master process: %d", proc.Pid) } } + + r.logOnce.Do(func() { + log.Errorf("NGINX master process not found yet, waiting for NGINX to start...") + }) return fmt.Errorf("waiting for NGINX master process... ") } err := backoff.WaitUntil(