Skip to content

Fix panic when updating NGINX config and fix remotely enabling/disabling the metrics feature #1013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 37 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6e3dc83
fix: fixing panic when updating config concurrently
bejjrajesh Mar 19, 2025
a097938
fix: adding nil check
bejjrajesh Mar 19, 2025
7d743bd
fix: adding nil check
bejjrajesh Mar 20, 2025
cfd35a2
fix: making toggle true once agent connected
bejjrajesh Apr 9, 2025
d455735
fix: adding debug log for metricsSender readyToSend Status
bejjrajesh Apr 9, 2025
c7dbfb5
fix: updating with main
bejjrajesh Apr 11, 2025
4b8fd54
fix: debugging
bejjrajesh Apr 11, 2025
0928fc0
fix: debugging
bejjrajesh Apr 11, 2025
779ef6c
fix: updating config reader features when on disk config changed
bejjrajesh Apr 11, 2025
fd17a92
fix: updating readyToSend when config changed
bejjrajesh Apr 12, 2025
dbee456
fix: updating readyToSend when config changed
bejjrajesh Apr 14, 2025
92f037b
fix: updating readyToSend when config changed
bejjrajesh Apr 15, 2025
f65680f
fix: adding conf to metrics sender
bejjrajesh Apr 16, 2025
5adfeac
fix: removing debug logs
bejjrajesh Apr 17, 2025
9c9f838
fix: fixing import issue
bejjrajesh Apr 17, 2025
a8dcf7b
Add nil pointer check to GenerateMetricsReportBundle (#1047)
dhurley Apr 16, 2025
fcb499e
Update net and nats dependencies (#1070)
dhurley May 1, 2025
1ec3554
fix: updating with main
bejjrajesh May 7, 2025
68eca9f
fix: running go deps
bejjrajesh May 7, 2025
468e6cc
fix: updating go.sum
bejjrajesh May 7, 2025
1dd35f0
fix: fixing test failures
bejjrajesh May 7, 2025
c299b17
fix: updating vendor folders
bejjrajesh May 7, 2025
2b35964
fix: updating go.sum
bejjrajesh May 7, 2025
16bb285
fix: fixing conflict
bejjrajesh May 7, 2025
106bc87
fix: fixing minor bug
bejjrajesh May 8, 2025
a9725c7
fix: fixing imports
bejjrajesh May 8, 2025
7892d7e
fix: updating default features
bejjrajesh May 9, 2025
c922b0f
fix: updating default features
bejjrajesh May 10, 2025
21d2a0c
fix: adding debug log
bejjrajesh May 10, 2025
9a8dfac
fix: removing lock when de-registering
bejjrajesh May 10, 2025
8573d86
fix: removing lock when de-registering
bejjrajesh May 10, 2025
4832ba4
fix: fixing compile issue
bejjrajesh May 10, 2025
49b2173
fix: fixing compile issue
bejjrajesh May 10, 2025
0837ab5
fix: fixing metrics-sender not initializing issue
bejjrajesh May 11, 2025
691d54b
fix: adding debug log
bejjrajesh May 11, 2025
f4fb5d0
fix: adding debug logs
bejjrajesh May 11, 2025
e06e490
fix: adding metrics sender issue
bejjrajesh May 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: updating readyToSend when config changed
  • Loading branch information
bejjrajesh committed Apr 14, 2025
commit dbee4563e9763c985e53eb73f9a8952c2b54d10b
7 changes: 4 additions & 3 deletions src/plugins/config_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (r *ConfigReader) updateAgentConfig(payloadAgentConfig *proto.AgentConfig)
sort.Strings(onDiskAgentConfig.Features)
sort.Strings(payloadAgentConfig.Details.Features)
log.Debugf("OnDisk Agent Features %v", onDiskAgentConfig.Features)
log.Debugf("Payload Agent Features %v", onDiskAgentConfig.Features)
log.Debugf("Payload Agent Features %v", payloadAgentConfig.Details.Features)
r.detailsMu.Unlock()

r.detailsMu.RLock()
Expand Down Expand Up @@ -139,8 +139,7 @@ func (r *ConfigReader) updateAgentConfig(payloadAgentConfig *proto.AgentConfig)
log.Errorf("Failed updating Agent config - %v", err)
}
if configUpdated {
r.config.Features = features
log.Debugf("Updated agent config on disk")
log.Debugf("Updated agent config on disk %v %v", features, synchronizeFeatures)
}
}

Expand All @@ -155,11 +154,13 @@ func (r *ConfigReader) updateAgentConfig(payloadAgentConfig *proto.AgentConfig)
}

if synchronizeFeatures {
log.Debugf("agent config changed, synchronizeFeatures")
r.synchronizeFeatures(payloadAgentConfig)
}

log.Debugf("agent config changed, updating all plugins %v", payloadAgentConfig)
r.messagePipeline.Process(core.NewMessage(core.AgentConfigChanged, payloadAgentConfig))
r.config.Features = payloadAgentConfig.Details.Features
}
}

Expand Down