Skip to content

Fix panic when updating config concurrently #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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

bejjrajesh
Copy link

@bejjrajesh bejjrajesh commented Mar 19, 2025

Proposed changes

Agent currently has the support to enable/disable features dynamically from NIM. This MR contains change to support dynamically enable/disable metrics feature from NIM based on a flag in nms.conf file. When customer flip the flag to false in nms.conf, we remove metrics and metrics-sender features from payload and send an update to agent, when customer enables flag we add metrics and metrics-sender feature in the payload and send an update to agent.

  1. This MR will fix the panic error happen when updating the nginx config concurrently.
    image
  2. The metrics_sender plugin is updated with access to current configuration and it's updated to set readyToSend flag when metrics and metrics_sender is present in the agent config and set to false when metrics and metrics_sender is not present in the current agent config. These changes are tested with NIM and working properly.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@bejjrajesh bejjrajesh requested a review from a team as a code owner March 19, 2025 14:26
@github-actions github-actions bot added bug Something isn't working chore Pull requests for routine tasks dependencies labels Mar 19, 2025
Copy link
Contributor

github-actions bot commented Mar 19, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@bejjrajesh
Copy link
Author

I have hereby read the F5 CLA and agree to its terms

@dhurley dhurley changed the title fix: fixing panic when updating config concurrently Fix panic when updating config concurrently Mar 19, 2025
@dhurley dhurley added the v2.x Issues and Pull Requests related to the major version v2 label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Pull requests for routine tasks dependencies v2.x Issues and Pull Requests related to the major version v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants