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

[Bug Fix] fix backward compatibility issue in remote tagger dca server #31711

Merged

Conversation

adel121
Copy link
Contributor

@adel121 adel121 commented Dec 3, 2024

What does this PR do?

Fixes backward compatibility issue in the remote tagger server.

The broken backward compatibility makes it impossible for cluster check runners to get tags using the remote tagger (except for the first runner that connects to the server). This happens if we use older versions of cluster check runners with newer versions of the cluster agent. The backward compatibility was broken in 7.60, but we are fixing it in 7.61 because this feature is disabled by default and has no customer impact since it is not exposed in helm-chart or the operator.

Motivation

Restore backward compatibility.

Describe how you validated your changes

Deploy the cluster agent with CLC runners enabled and using the remote tagger with at least 2 replicas of CLCs.
All CLC replicas should be able to get tags from the cluster tagger.

The CLC runner should have a version 7.59 or older, and the DCA should be using version 7.61 or newer.

Example:

datadog:
  kubelet:
    tlsVerify: false
  clusterChecks:
    enabled: true
  logLevel: DEBUG
  apiKeyExistingSecret: datadog-secret
  appKeyExistingSecret: datadog-secret
  envDict:
    DD_TAGS: "source:node-tags"
    DD_EXTRA_TAGS: "source:node-extra"
    DD_CLUSTER_CHECKS_EXTRA_TAGS: "source:node-cluster_extra" # Note: should never see these
    DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS: "source:node-orch_extra" # Note: should never see these

clusterChecksRunner:
  replicas: 3
  enabled: true
  image:
    tag: 7.59.0
  envDict:
    DD_CLC_RUNNER_REMOTE_TAGGER_ENABLED: "true"
clusterAgent:
  envDict:
    DD_TAGS: "source:dca-tags"
    DD_EXTRA_TAGS: "source:dca-extra"
    DD_CLUSTER_CHECKS_EXTRA_TAGS: "source:dca-cluster_extra"
    DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS: "source:dca-orch_extra"
  enabled: true
  replicas: 1

Once everything gets into running state, we should be able to see the same tags in all CLC runner taggers:

kubectl exec datadog-agent-clusterchecks-6bbb898c96-6tfl2 -- agent tagger-list

=== Entity internal://global-entity-id ===
== Source remote =
=Tags: [source:dca-cluster_extra source:dca-extra source:dca-orch_extra source:dca-tags]
===

Without this fix, only one runner will get the tags, and others would fail to get them.

Possible Drawbacks / Trade-offs

Customers who:

  • manually enable remote tagger in CLC runners (by setting DD_CLC_RUNNER_REMOTE_TAGGER_ENABLED to true)
  • AND upgrade from version 7.59 to 7.60
  • AND have at least 2 replicas of clustercheckrunners

Will still be facing broken backward compatibility.

However, we choose not to fix this in 7.60 in order to avoid building a new release candidate and considering that enabling remote tagger in clc runners is disabled by default and not exposed publicly in helm chart or in operator, so it should not have any customer impact (unless the customer manually sets this option).

Additional Notes

@adel121 adel121 requested a review from a team as a code owner December 3, 2024 14:30
@github-actions github-actions bot added the short review PR is simple enough to be reviewed quickly label Dec 3, 2024
@adel121 adel121 added this to the 7.61.0 milestone Dec 3, 2024
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Dec 3, 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=50268562 --os-family=ubuntu

Note: This applies to commit a19ce96

@adel121 adel121 added the backport/7.61.x Automatically create a backport PR to 7.61.x label Dec 3, 2024
Copy link

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 98850dd1-2549-4fdb-a260-1e29a1751a78

Baseline: 01c8ef8
Comparison: a19ce96
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.54 [+0.48, +0.60] 1 Logs
basic_py_check % cpu utilization +0.46 [-3.35, +4.27] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.21 [-0.43, +0.84] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.19 [-0.60, +0.97] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.13 [-0.76, +1.01] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.07 [-0.68, +0.81] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.02 [-0.07, +0.12] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.01, +0.01] 1 Logs
pycheck_lots_of_tags % cpu utilization +0.00 [-3.38, +3.38] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.05 [-0.81, +0.72] 1 Logs
quality_gate_idle memory utilization -0.10 [-0.15, -0.06] 1 Logs bounds checks dashboard
quality_gate_idle_all_features memory utilization -0.12 [-0.22, -0.02] 1 Logs bounds checks dashboard
otel_to_otel_logs ingress throughput -0.15 [-0.85, +0.54] 1 Logs
file_tree memory utilization -0.30 [-0.44, -0.15] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.30 [-0.76, +0.16] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.43 [-1.16, +0.30] 1 Logs
quality_gate_logs % cpu utilization -1.70 [-4.66, +1.26] 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
quality_gate_logs lost_bytes 10/10
quality_gate_logs memory_usage 10/10

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.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.

@adel121 adel121 added the qa/rc-required Only for a PR that requires validation on the Release Candidate label Dec 3, 2024
@adel121
Copy link
Contributor Author

adel121 commented Dec 3, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Dec 3, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-12-03 20:04:14 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 22m.

@dd-mergequeue dd-mergequeue bot merged commit 1c2acb4 into main Dec 3, 2024
291 of 298 checks passed
@dd-mergequeue dd-mergequeue bot deleted the adelhajhassan/fix_backward_compat_issue_in_remote_tagger branch December 3, 2024 20:27
@github-actions github-actions bot modified the milestones: 7.61.0, 7.62.0 Dec 3, 2024
agent-platform-auto-pr bot pushed a commit that referenced this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/7.61.x Automatically create a backport PR to 7.61.x bugfix/functional changelog/no-changelog component/cluster-agent component/tagger qa/rc-required Only for a PR that requires validation on the Release Candidate short review PR is simple enough to be reviewed quickly team/container-platform The Container Platform Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants