Skip to content
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

CA-394109: Reduce number of alerts #5696

Merged
merged 6 commits into from
Jul 10, 2024

Commits on Jul 10, 2024

  1. Refactor watcher creation code

    Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
    Vincent-lau committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    ff08a18 View commit details
    Browse the repository at this point in the history
  2. Only create watcher once

    Use the Atomic module to track whether a watcher has been created.
    
    Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
    Vincent-lau committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    733882a View commit details
    Browse the repository at this point in the history
  3. Refactor cluster change watcher interval

    Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
    Vincent-lau committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    e612873 View commit details
    Browse the repository at this point in the history
  4. Add new internal API cstack_sync

    This allows one to force sync the state of xapi db with the cluster
    stack, useful for cluster API methods change the state of the cluster.
    
    Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
    Vincent-lau committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    af142fc View commit details
    Browse the repository at this point in the history
  5. CP-394109: Alert only once for cluster host leave/join

    Previously there were two ways an alert for a cluster host join/leave
    can be raised: 1. through the cluster change watcher; 2. through the api
    call. These two can generate duplicate alerts as an API call can cause
    the cluster change watcher to notice the change as well.
    
    The idea of the fix here is still to let API and watcher raise alerts
    separately, but now add synchronous API calls to allow API call
    (cluster-host-join, etc) to call
    the cluster change update code at the right time so that the cluster
    change watcher won't see the change again, hence not generating duplicate
    alerts.
    
    Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
    Vincent-lau committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    3dc79e0 View commit details
    Browse the repository at this point in the history
  6. Feature flag the cstack_sync call

    Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
    Vincent-lau committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    cca43a4 View commit details
    Browse the repository at this point in the history