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

[ha-agent] Run HA enabled integrations only on leader agent #31186

Merged
merged 19 commits into from
Nov 28, 2024

Conversation

AlexandreYang
Copy link
Member

@AlexandreYang AlexandreYang commented Nov 18, 2024

What does this PR do?

[ha-agent] Run agent integration only on leader agent

This PR changes a lot of files, but the actual change is only few lines located in pkg/collector/worker/worker.go:
https://github.com/DataDog/datadog-agent/pull/31186/files#diff-fa837122b5056960e5f1bcbe5e6da5ed11701b8e75a2dff72681905d9a1e0314R150-R234

the rest of the changes are only about injecting correctly the component.

Marked as qa/rc-required since it's a new feature that have impact on whether integrations skip or not.

  • Manual QA should test that when HA Agent feature is enabled:
    • non-HA integrations always run (whether the Agent is leader or not)
    • HA integrations are only run on leader agent (not run on follower agents)
  • We plan to have a e2e test soonish for HA Agent feature (NDMII-3190)

Motivation

Needed for HA Agent feature.

Describe how to test/QA your changes

1/ Run 2 Agents with HA Agent feature enabled:

ha_agent:
  enabled: true
  group: my-group01

2/ Write messages from backend to HA_AGENT RC product

4/ Check that only leader agent is running snmp integrations

Possible Drawbacks / Trade-offs

Additional Notes

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Nov 24, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=50072804 --os-family=ubuntu

Note: This applies to commit f64da61

@AlexandreYang AlexandreYang changed the title [ha-agent] Skip check if not leader [ha-agent] Run agent integration only on leader agent Nov 24, 2024
Copy link
Contributor

📥 📢 Info, this pull request increases the binary size of serverless extension by -8288 bytes. Each MB of binary size increase means about 10ms of additional cold start time, so this pull request would increase cold start time by 0ms.

Debug info

If you have questions, we are happy to help, come visit us in the #serverless slack channel and provide a link to this comment.

We suggest you consider adding the !serverless build tag to remove any new dependencies not needed in the serverless extension.

Copy link
Contributor

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between f0b4956 and 94bbef3.

tl;dr

Use these benchmarks as an insight tool during development.

  1. Skim down the vs base column in each chart. If there is a ~, then there was no statistically significant change to the benchmark. Otherwise, ensure the estimated percent change is either negative or very small.

  2. The last row of each chart is the geomean. Ensure this percentage is either negative or very small.

What is this benchmarking?

The BenchmarkStartEndInvocation compares the amount of time it takes to call the start-invocation and end-invocation endpoints. For universal instrumentation languages (Dotnet, Golang, Java, Ruby), this represents the majority of the duration overhead added by our tracing layer.

The benchmark is run using a large variety of lambda request payloads. In the charts below, there is one row for each event payload type.

How do I interpret these charts?

The charts below comes from benchstat. They represent the statistical change in duration (sec/op), memory overhead (B/op), and allocations (allocs/op).

The benchstat docs explain how to interpret these charts.

Before the comparison table, we see common file-level configuration. If there are benchmarks with different configuration (for example, from different packages), benchstat will print separate tables for each configuration.

The table then compares the two input files for each benchmark. It shows the median and 95% confidence interval summaries for each benchmark before and after the change, and an A/B comparison under "vs base". ... The p-value measures how likely it is that any differences were due to random chance (i.e., noise). The "~" means benchstat did not detect a statistically significant difference between the two inputs. ...

Note that "statistically significant" is not the same as "large": with enough low-noise data, even very small changes can be distinguished from noise and considered statistically significant. It is, of course, generally easier to distinguish large changes from noise.

Finally, the last row of the table shows the geometric mean of each column, giving an overall picture of how the benchmarks changed. Proportional changes in the geomean reflect proportional changes in the benchmarks. For example, given n benchmarks, if sec/op for one of them increases by a factor of 2, then the sec/op geomean will increase by a factor of ⁿ√2.

I need more help

First off, do not worry if the benchmarks are failing. They are not tests. The intention is for them to be a tool for you to use during development.

If you would like a hand interpreting the results come chat with us in #serverless-agent in the internal DataDog slack or in #serverless in the public DataDog slack. We're happy to help!

Benchmark stats
goos: linux
goarch: amd64
pkg: github.com/DataDog/datadog-agent/pkg/serverless/daemon
cpu: AMD EPYC 7763 64-Core Processor                
                                      │ baseline/benchmark.log │       current/benchmark.log        │
                                      │         sec/op         │   sec/op     vs base               │
api-gateway-appsec.json                            87.14µ ± 3%   83.32µ ± 5%       ~ (p=0.063 n=10)
api-gateway-kong-appsec.json                       66.31µ ± 5%   64.73µ ± 1%  -2.38% (p=0.000 n=10)
api-gateway-kong.json                              64.18µ ± 5%   62.62µ ± 1%  -2.44% (p=0.000 n=10)
api-gateway-non-proxy-async.json                  101.12µ ± 2%   97.73µ ± 1%  -3.35% (p=0.000 n=10)
api-gateway-non-proxy.json                         99.02µ ± 1%   97.27µ ± 1%  -1.77% (p=0.000 n=10)
api-gateway-websocket-connect.json                 66.83µ ± 3%   64.30µ ± 1%  -3.80% (p=0.000 n=10)
api-gateway-websocket-default.json                 59.22µ ± 2%   57.16µ ± 1%  -3.47% (p=0.001 n=10)
api-gateway-websocket-disconnect.json              60.89µ ± 4%   57.30µ ± 1%  -5.90% (p=0.000 n=10)
api-gateway.json                                   109.2µ ± 1%   105.6µ ± 1%  -3.30% (p=0.000 n=10)
application-load-balancer.json                     60.04µ ± 2%   57.08µ ± 1%  -4.93% (p=0.000 n=10)
cloudfront.json                                    44.80µ ± 2%   43.70µ ± 1%  -2.46% (p=0.007 n=10)
cloudwatch-events.json                             36.59µ ± 2%   35.51µ ± 2%  -2.93% (p=0.000 n=10)
cloudwatch-logs.json                               57.68µ ± 3%   57.69µ ± 1%       ~ (p=0.739 n=10)
custom.json                                        29.78µ ± 1%   29.28µ ± 1%  -1.70% (p=0.002 n=10)
dynamodb.json                                      88.02µ ± 1%   85.72µ ± 1%  -2.61% (p=0.000 n=10)
empty.json                                         28.32µ ± 2%   27.42µ ± 2%  -3.18% (p=0.000 n=10)
eventbridge-custom.json                            45.24µ ± 2%   44.21µ ± 1%  -2.28% (p=0.000 n=10)
eventbridge-no-bus.json                            43.63µ ± 1%   42.94µ ± 2%  -1.59% (p=0.009 n=10)
eventbridge-no-timestamp.json                      43.45µ ± 2%   43.08µ ± 1%       ~ (p=0.075 n=10)
eventbridgesns.json                                59.95µ ± 2%   58.31µ ± 1%  -2.73% (p=0.001 n=10)
eventbridgesqs.json                                67.39µ ± 2%   65.28µ ± 2%  -3.14% (p=0.000 n=10)
http-api.json                                      68.02µ ± 1%   65.28µ ± 1%  -4.04% (p=0.002 n=10)
kinesis-batch.json                                 66.23µ ± 1%   64.71µ ± 1%  -2.30% (p=0.000 n=10)
kinesis.json                                       51.00µ ± 1%   50.75µ ± 2%       ~ (p=0.436 n=10)
s3.json                                            55.44µ ± 1%   55.19µ ± 1%       ~ (p=0.063 n=10)
sns-batch.json                                     85.84µ ± 1%   83.88µ ± 1%  -2.29% (p=0.000 n=10)
sns.json                                           63.03µ ± 1%   62.26µ ± 1%  -1.22% (p=0.019 n=10)
snssqs.json                                        109.3µ ± 1%   106.8µ ± 1%  -2.36% (p=0.000 n=10)
snssqs_no_dd_context.json                          98.31µ ± 2%   96.36µ ± 1%  -1.98% (p=0.001 n=10)
sqs-aws-header.json                                54.50µ ± 1%   54.39µ ± 2%       ~ (p=0.579 n=10)
sqs-batch.json                                     88.63µ ± 3%   87.44µ ± 1%  -1.35% (p=0.002 n=10)
sqs.json                                           67.06µ ± 2%   66.17µ ± 1%  -1.33% (p=0.035 n=10)
sqs_no_dd_context.json                             62.52µ ± 2%   61.45µ ± 2%  -1.71% (p=0.015 n=10)
stepfunction.json                                  42.46µ ± 3%   40.54µ ± 4%  -4.51% (p=0.001 n=10)
geomean                                            62.07µ        60.54µ       -2.46%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │          B/op          │     B/op      vs base               │
api-gateway-appsec.json                           37.26Ki ± 0%   37.26Ki ± 0%       ~ (p=0.642 n=10)
api-gateway-kong-appsec.json                      26.90Ki ± 0%   26.90Ki ± 0%  -0.01% (p=0.049 n=10)
api-gateway-kong.json                             24.37Ki ± 0%   24.37Ki ± 0%       ~ (p=0.537 n=10)
api-gateway-non-proxy-async.json                  47.93Ki ± 0%   47.93Ki ± 0%       ~ (p=0.642 n=10)
api-gateway-non-proxy.json                        47.11Ki ± 0%   47.12Ki ± 0%       ~ (p=0.254 n=10)
api-gateway-websocket-connect.json                25.34Ki ± 0%   25.34Ki ± 0%       ~ (p=0.361 n=10)
api-gateway-websocket-default.json                21.23Ki ± 0%   21.23Ki ± 0%       ~ (p=0.437 n=10)
api-gateway-websocket-disconnect.json             20.99Ki ± 0%   20.99Ki ± 0%       ~ (p=0.490 n=10)
api-gateway.json                                  49.26Ki ± 0%   49.26Ki ± 0%       ~ (p=0.778 n=10)
application-load-balancer.json                    22.12Ki ± 0%   22.12Ki ± 0%       ~ (p=0.305 n=10)
cloudfront.json                                   17.43Ki ± 0%   17.43Ki ± 0%       ~ (p=0.055 n=10)
cloudwatch-events.json                            11.49Ki ± 0%   11.49Ki ± 0%       ~ (p=0.370 n=10)
cloudwatch-logs.json                              53.05Ki ± 0%   53.04Ki ± 0%       ~ (p=0.164 n=10)
custom.json                                       9.527Ki ± 0%   9.527Ki ± 0%   0.00% (p=0.019 n=10)
dynamodb.json                                     40.29Ki ± 0%   40.29Ki ± 0%       ~ (p=0.781 n=10)
empty.json                                        9.066Ki ± 0%   9.066Ki ± 0%       ~ (p=0.873 n=10)
eventbridge-custom.json                           14.67Ki ± 0%   14.67Ki ± 0%       ~ (p=0.387 n=10)
eventbridge-no-bus.json                           13.63Ki ± 0%   13.63Ki ± 0%       ~ (p=0.605 n=10)
eventbridge-no-timestamp.json                     13.63Ki ± 0%   13.63Ki ± 0%       ~ (p=1.000 n=10)
eventbridgesns.json                               20.43Ki ± 0%   20.43Ki ± 0%       ~ (p=0.080 n=10)
eventbridgesqs.json                               24.56Ki ± 0%   24.56Ki ± 0%       ~ (p=0.541 n=10)
http-api.json                                     23.25Ki ± 0%   23.25Ki ± 0%       ~ (p=0.560 n=10)
kinesis-batch.json                                26.49Ki ± 0%   26.50Ki ± 0%       ~ (p=0.933 n=10)
kinesis.json                                      17.37Ki ± 0%   17.37Ki ± 0%       ~ (p=1.000 n=10)
s3.json                                           19.87Ki ± 0%   19.87Ki ± 0%       ~ (p=0.959 n=10)
sns-batch.json                                    39.07Ki ± 0%   39.07Ki ± 0%       ~ (p=0.961 n=10)
sns.json                                          24.49Ki ± 0%   24.49Ki ± 0%       ~ (p=0.312 n=10)
snssqs.json                                       52.68Ki ± 0%   52.68Ki ± 0%       ~ (p=0.075 n=10)
snssqs_no_dd_context.json                         46.44Ki ± 0%   46.44Ki ± 0%       ~ (p=0.831 n=10)
sqs-aws-header.json                               18.78Ki ± 0%   18.78Ki ± 0%       ~ (p=0.419 n=10)
sqs-batch.json                                    41.26Ki ± 0%   41.26Ki ± 0%       ~ (p=0.856 n=10)
sqs.json                                          25.39Ki ± 0%   25.39Ki ± 0%       ~ (p=0.903 n=10)
sqs_no_dd_context.json                            21.01Ki ± 0%   21.01Ki ± 0%       ~ (p=0.116 n=10)
stepfunction.json                                 13.51Ki ± 0%   13.50Ki ± 0%       ~ (p=0.261 n=10)
geomean                                           24.08Ki        24.08Ki       -0.00%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │       allocs/op        │ allocs/op   vs base                 │
api-gateway-appsec.json                             630.0 ± 0%   630.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-kong-appsec.json                        488.0 ± 0%   488.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-kong.json                               466.0 ± 0%   466.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-non-proxy-async.json                    723.0 ± 0%   723.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-non-proxy.json                          713.0 ± 0%   713.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-websocket-connect.json                  451.0 ± 0%   451.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-default.json                  376.0 ± 0%   376.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-websocket-disconnect.json               366.0 ± 0%   366.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway.json                                    785.0 ± 0%   785.0 ± 0%       ~ (p=1.000 n=10) ¹
application-load-balancer.json                      348.0 ± 0%   348.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudfront.json                                     281.0 ± 0%   281.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudwatch-events.json                              218.0 ± 0%   218.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudwatch-logs.json                                211.0 ± 0%   211.0 ± 0%       ~ (p=1.000 n=10) ¹
custom.json                                         166.0 ± 0%   166.0 ± 0%       ~ (p=1.000 n=10) ¹
dynamodb.json                                       582.0 ± 0%   582.0 ± 0%       ~ (p=1.000 n=10) ¹
empty.json                                          157.0 ± 0%   157.0 ± 0%       ~ (p=1.000 n=10) ¹
eventbridge-custom.json                             261.0 ± 0%   261.0 ± 0%       ~ (p=1.000 n=10) ¹
eventbridge-no-bus.json                             252.0 ± 0%   252.0 ± 0%       ~ (p=1.000 n=10) ¹
eventbridge-no-timestamp.json                       252.0 ± 0%   252.0 ± 0%       ~ (p=1.000 n=10) ¹
eventbridgesns.json                                 318.0 ± 0%   318.0 ± 0%       ~ (p=1.000 n=10) ¹
eventbridgesqs.json                                 358.0 ± 0%   358.0 ± 0%       ~ (p=1.000 n=10) ¹
http-api.json                                       424.0 ± 0%   424.0 ± 0%       ~ (p=1.000 n=10) ¹
kinesis-batch.json                                  383.0 ± 0%   383.0 ± 0%       ~ (p=1.000 n=10) ¹
kinesis.json                                        279.0 ± 0%   279.0 ± 0%       ~ (p=1.000 n=10) ¹
s3.json                                             351.0 ± 0%   351.0 ± 0%       ~ (p=1.000 n=10) ¹
sns-batch.json                                      465.0 ± 0%   465.0 ± 0%       ~ (p=1.000 n=10) ¹
sns.json                                            336.0 ± 0%   336.0 ± 0%       ~ (p=1.000 n=10) ¹
snssqs.json                                         460.0 ± 0%   460.0 ± 0%       ~ (p=1.000 n=10) ¹
snssqs_no_dd_context.json                           420.0 ± 0%   420.0 ± 0%       ~ (p=1.000 n=10) ¹
sqs-aws-header.json                                 276.0 ± 0%   276.0 ± 0%       ~ (p=1.000 n=10) ¹
sqs-batch.json                                      500.0 ± 0%   500.0 ± 0%       ~ (p=1.000 n=10) ¹
sqs.json                                            351.0 ± 0%   351.0 ± 0%       ~ (p=1.000 n=10) ¹
sqs_no_dd_context.json                              337.0 ± 0%   337.0 ± 0%       ~ (p=1.000 n=10) ¹
stepfunction.json                                   226.0 ± 0%   226.0 ± 0%       ~ (p=1.000 n=10) ¹
geomean                                             360.0        360.0       +0.00%
¹ all samples are equal

@AlexandreYang AlexandreYang force-pushed the NDMII-3154-ha-agent-collector-worker branch 2 times, most recently from a9a00d1 to 5f3f483 Compare November 26, 2024 06:39
Copy link

cit-pr-commenter bot commented Nov 26, 2024

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: cc0cbccb-d183-4100-8e99-f723ee944499

Baseline: 8f7cb53
Comparison: f64da61
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
tcp_syslog_to_blackhole ingress throughput +0.70 [+0.64, +0.77] 1 Logs
pycheck_lots_of_tags % cpu utilization +0.45 [-2.95, +3.84] 1 Logs
quality_gate_idle_all_features memory utilization +0.33 [+0.23, +0.44] 1 Logs bounds checks dashboard
otel_to_otel_logs ingress throughput +0.32 [-0.38, +1.03] 1 Logs
quality_gate_idle memory utilization +0.18 [+0.13, +0.23] 1 Logs bounds checks dashboard
file_to_blackhole_300ms_latency egress throughput +0.02 [-0.61, +0.65] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.01 [-0.10, +0.12] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.01, +0.01] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.00 [-0.78, +0.78] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.01 [-0.48, +0.46] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.03 [-0.76, +0.71] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.05 [-0.87, +0.77] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.07 [-0.83, +0.70] 1 Logs
file_tree memory utilization -0.12 [-0.26, +0.01] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.16 [-0.88, +0.56] 1 Logs
basic_py_check % cpu utilization -1.01 [-4.87, +2.85] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency_linear_load memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency lost_bytes 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@AlexandreYang AlexandreYang force-pushed the NDMII-3154-ha-agent-collector-worker branch from 5f3f483 to b0213d3 Compare November 26, 2024 11:58
@AlexandreYang AlexandreYang changed the title [ha-agent] Run agent integration only on leader agent [ha-agent] Run HA integrations only on leader agent Nov 26, 2024
@AlexandreYang AlexandreYang changed the title [ha-agent] Run HA integrations only on leader agent [ha-agent] Run HA enabled integrations only on leader agent Nov 26, 2024
@AlexandreYang AlexandreYang marked this pull request as ready for review November 26, 2024 15:03
@AlexandreYang AlexandreYang requested review from a team as code owners November 26, 2024 15:03
@github-actions github-actions bot added the long review PR is complex, plan time to review it label Nov 26, 2024
pkg/collector/worker/worker.go Outdated Show resolved Hide resolved
pkg/collector/worker/worker.go Outdated Show resolved Hide resolved
pkg/collector/worker/worker.go Outdated Show resolved Hide resolved
@jhgilbert jhgilbert self-assigned this Nov 26, 2024
Copy link
Contributor

@jhgilbert jhgilbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with a minor suggestion for style, thanks!

AlexandreYang and others added 2 commits November 26, 2024 18:00
…2469c669c3.yaml

Co-authored-by: Jen Gilbert <j.h.gilbert@gmail.com>
@AlexandreYang AlexandreYang added this to the 7.61.0 milestone Nov 26, 2024
Base automatically changed from NDMII-3154-ha-agent-rc to main November 26, 2024 20:09
@dd-mergequeue dd-mergequeue bot requested a review from a team as a code owner November 26, 2024 20:10
@AlexandreYang AlexandreYang removed the request for review from a team November 27, 2024 07:20
@AlexandreYang AlexandreYang added the qa/done QA done before merge and regressions are covered by tests label Nov 27, 2024
// When ha-agent is disabled, the agent behave as standalone agent (non HA) and will always run all integrations.
func (h *haAgentImpl) ShouldRunIntegration(integrationName string) bool {
if h.Enabled() {
return validHaIntegrations[integrationName] && h.isLeader.Load()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this logic is correct: when I run the agent with DD_HA_AGENT_ENABLED=true, the agent skips all checks:

2024-11-27 16:26:36 UTC | CORE | DEBUG | (pkg/collector/worker/check_logger.go:76 in Debug) | check:uptime | Check is an HA integration and current agent is not leader, skipping execution...
2024-11-27 16:26:36 UTC | CORE | DEBUG | (pkg/collector/worker/check_logger.go:76 in Debug) | check:ntp | Check is an HA integration and current agent is not leader, skipping execution...
2024-11-27 16:26:36 UTC | CORE | DEBUG | (pkg/collector/worker/check_logger.go:76 in Debug) | check:service_discovery | Check is an HA integration and current agent is not leader, skipping execution...
2024-11-27 16:26:37 UTC | CORE | DEBUG | (pkg/collector/worker/check_logger.go:76 in Debug) | check:memory | Check is an HA integration and current agent is not leader, skipping execution...
2024-11-27 16:26:38 UTC | CORE | DEBUG | (pkg/collector/worker/check_logger.go:76 in Debug) | check:io | Check is an HA integration and current agent is not leader, skipping execution...

Could you also please add a test that makes sure that non-HA checks continue to run when HA-agent is enabled.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vickenty thanks for catching that, it's fixed here f65d6d3 with updated tests.

looks like I introduced the bug when I moved move the logic from worker.go to haagent component: 5ed60bb#diff-fa837122b5056960e5f1bcbe5e6da5ed11701b8e75a2dff72681905d9a1e0314R225-R226

@AlexandreYang AlexandreYang added qa/rc-required Only for a PR that requires validation on the Release Candidate and removed qa/done QA done before merge and regressions are covered by tests labels Nov 28, 2024
@AlexandreYang
Copy link
Member Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Nov 28, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-11-28 13:07:34 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 23m.

@dd-mergequeue dd-mergequeue bot merged commit 0f9693f into main Nov 28, 2024
220 checks passed
@dd-mergequeue dd-mergequeue bot deleted the NDMII-3154-ha-agent-collector-worker branch November 28, 2024 13:29
@AlexandreYang AlexandreYang added qa/done QA done before merge and regressions are covered by tests and removed qa/rc-required Only for a PR that requires validation on the Release Candidate labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
long review PR is complex, plan time to review it qa/done QA done before merge and regressions are covered by tests team/ndm-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants