File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,10 @@ APK_PACKAGE := ./build/$(PACKAGE_NAME).apk
6060DEB_PACKAGE := ./build/$(PACKAGE_NAME ) .deb
6161RPM_PACKAGE := ./build/$(PACKAGE_NAME ) .rpm
6262
63- MOCK_MANAGEMENT_PLANE_CONFIG_DIRECTORY ?=
64- MOCK_MANAGEMENT_PLANE_LOG_LEVEL ?= INFO
65- MOCK_MANAGEMENT_PLANE_GRPC_ADDRESS ?= 127.0.0.1:0
66- MOCK_MANAGEMENT_PLANE_API_ADDRESS ?= 127.0.0.1:0
63+ MOCK_MANAGEMENT_PLANE_CONFIG_DIRECTORY ?= /mnt/hgfs/go/configs/
64+ MOCK_MANAGEMENT_PLANE_LOG_LEVEL ?= DEBUG
65+ MOCK_MANAGEMENT_PLANE_GRPC_ADDRESS ?= 127.0.0.1:9091
66+ MOCK_MANAGEMENT_PLANE_API_ADDRESS ?= 127.0.0.1:9092
6767OLD_BENCHMARK_RESULTS_FILE ?= $(TEST_BUILD_DIR ) /benchmark.txt
6868
6969uname_m := $(shell uname -m)
Original file line number Diff line number Diff line change @@ -219,9 +219,10 @@ func (w *Watcher) monitorWatchers(ctx context.Context) {
219219 w .handleInstanceUpdates (newCtx , message )
220220 case message := <- w .nginxConfigContextChannel :
221221 newCtx := context .WithValue (ctx , logger .CorrelationIDContextKey , message .CorrelationID )
222- slog .Info ("============= Nginx Config Context Channel got Context " )
223- // w.watcherMutex.Lock()
222+ slog .Info ("============= Nginx Config Context Channel" )
223+ w .watcherMutex .Lock ()
224224 if ! slices .Contains (w .instancesWithConfigApplyInProgress , message .NginxConfigContext .InstanceID ) {
225+ slog .Info ("============= Nginx Config Context update" )
225226 slog .DebugContext (
226227 newCtx ,
227228 "Updated NGINX config context" ,
@@ -239,7 +240,8 @@ func (w *Watcher) monitorWatchers(ctx context.Context) {
239240 "nginx_config_context" , message .NginxConfigContext ,
240241 )
241242 }
242- // w.watcherMutex.Unlock()
243+ w .watcherMutex .Unlock ()
244+ slog .Info ("============= Nginx Config Unlock" )
243245 case message := <- w .instanceHealthChannel :
244246 newCtx := context .WithValue (ctx , logger .CorrelationIDContextKey , message .CorrelationID )
245247 w .messagePipe .Process (newCtx , & bus.Message {
Original file line number Diff line number Diff line change 66
77log:
88 # set log level (error, info, debug; default "info")
9- level: info
9+ level: debug
1010 # set log path. if empty, don't log to file.
1111 path: /var/log/nginx-agent/
1212
@@ -17,6 +17,14 @@ allowed_directories:
1717 - /var/run/nginx
1818 - /var/log/nginx
1919
20+ command:
21+ server:
22+ # the server host to connect to in order to send and receive commands e.g. config apply instructions
23+ host: 127.0.0.1
24+ # the server port to connect to in order to send and receive commands e.g. config apply instructions
25+ port: 9091
26+ # the type of connection. Options are "grpc" or "http"
27+ type: grpc
2028## command server settings
2129# command:
2230# server:
You can’t perform that action at this time.
0 commit comments