Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C connector-centreon-engine
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • canopsis-connectors
  • connector-centreon-engine
  • Merge requests
  • !8

Open
Created Aug 13, 2019 by Florian Moussous@fmoussousDeveloper
  • Report abuse
Report abuse

Enabling new configuration without restarting broker

  • Overview 0
  • Commits 1
  • Changes 4

Until now, the broker had to be restarted if an engine's configuration changed. Especially, when a host was removed from a hostgroup, the broker module's cache kept the former information that the host was joined to group. To fix this, the whole instance's cache is invalidated when we know that an instance is not running anymore.

  • Added a method to clear an instance's cache (clear_cache)
  • Called this method if the information is received that an instance is not running anymore
  • There were cases where an event of deletion of a hostgroup membership was sent to and processed by the broker, removing objets in instance's cache, thus preventing further host group membership to that group. To prevent such case, the _host_group_names map is now filled on each host group membership event.

Tested on centreon-broker 3.0.16 and centreon engine v1.8.1 :

  • When a host is removed from a hostgroup, restarting poller is now enough
  • If a host or other object is changed to another poller, the two pollers will be restarted so both caches will be flushed

Limitations spotted:

  • If the cbd somehow is restarted, centengines must be restarted after that, otherwise the cache won't be in a consistent state (this must already have been the case before)
Edited Aug 13, 2019 by Florian Moussous
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: cache-invalidation