feat(gorgone): trigger nodesync on RS after config import#3172
Conversation
When the central syncs configuration to a Remote Server via SENDEXPORTFILE, the RS database gets updated but the nodes module is unaware until its next periodic resync (600s default). This adds a listener on the CentreonWorker command token so that upon successful completion, CENTREONNODESSYNC is triggered immediately, allowing the RS to discover node changes without delay. Also adds the nodes module to the ZMQ RS example config for consistency with the SSH RS config. Ref: MON-194473
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Great job! No new security vulnerabilities introduced in this pull request |
|
🤖 This is an automatic comment generated by an internal tool. Complexity Classification: StandardJustification: Automatic classification failed; defaulting to standard.
A maintainer can override this classification at any time. |

Description
When the central Gorgone syncs configuration to a Remote Server (RS) via
SENDEXPORTFILE, the RS database gets updated with new poller/server information. However, the RS's Gorgonenodesmodule is unaware of these changes until its next periodic resync (every 600 seconds by default). This means newly added or removed pollers behind the RS are not discovered promptly.This PR triggers a
CENTREONNODESSYNCaction on the RS after the CentreonWorker import completes, so the RS immediately discovers node changes. It uses the sameADDLISTENER+ callback pattern as the statistics module.Fixes MON-194473
Type of change
Target serie
How this pull request can be tested ?
SENDEXPORTFILE).[listener] add token '<worker_token>'— listener registered[listener] trigger event '<worker_token>'— CentreonWorker completed[legacycmd] -class- triggering nodesync after import task completion[nodes] action nodesresync proceed/[nodes] Finish resyncEdge cases to verify:
GORGONE_ACTION_FINISH_OKguard).nodesmodule is not loaded on the RS, the import and broker reload should still succeed (non-fatal "unknown action" error).Checklist