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

[Backport 7.61.x] [Bug Fix] fix backward compatibility issue in remote tagger dca server #31726

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

agent-platform-auto-pr[bot]
Copy link
Contributor

Backport 1c2acb4 from #31711.


<!--

  • Contributors are encouraged to read our CONTRIBUTING documentation.
  • Both Contributor and Reviewer Checklists are available at https://datadoghq.dev/datadog-agent/guidelines/contributing/#pull-requests.
  • The pull request:
    • Should only fix one issue or add one feature at a time.
    • Must update the test suite for the relevant functionality.
    • Should pass all status checks before being reviewed or merged.
  • Commit titles should be prefixed with general area of pull request's change.
  • Please fill the below sections if possible with relevant information or links.
    -->

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

<!--
Validate your changes before merge, ensuring that:

  • Your PR is tested by static / unit / integrations / e2e tests
  • Your PR description details which e2e tests cover your changes, if any
  • The PR description contains details of how you validated your changes. If you validated changes manually and not through automated tests, add context on why automated tests did not fit your changes validation.

If you want additional validation by a second person, you can ask reviewers to do it. Describe how to set up an environment for manual tests in the PR description. Manual validation is expected to happen on every commit before merge.

Any manual validation step should then map to an automated test. Manual validation should not substitute automation, minus exceptions not supported by test tooling yet.
-->

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: &quot;source:node-tags&quot;
    DD_EXTRA_TAGS: &quot;source:node-extra&quot;
    DD_CLUSTER_CHECKS_EXTRA_TAGS: &quot;source:node-cluster_extra&quot; # Note: should never see these
    DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS: &quot;source:node-orch_extra&quot; # Note: should never see these

clusterChecksRunner:
  replicas: 3
  enabled: true
  image:
    tag: 7.59.0
  envDict:
    DD_CLC_RUNNER_REMOTE_TAGGER_ENABLED: &quot;true&quot;
clusterAgent:
  envDict:
    DD_TAGS: &quot;source:dca-tags&quot;
    DD_EXTRA_TAGS: &quot;source:dca-extra&quot;
    DD_CLUSTER_CHECKS_EXTRA_TAGS: &quot;source:dca-cluster_extra&quot;
    DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS: &quot;source:dca-orch_extra&quot;
  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

<!--

  • Anything else we should know when reviewing?
  • Include benchmarking information here whenever possible.
  • Include info about alternatives that were considered and why the proposed
    version was chosen.
    -->

@agent-platform-auto-pr agent-platform-auto-pr bot requested a review from a team as a code owner December 3, 2024 20:28
@agent-platform-auto-pr agent-platform-auto-pr bot added component/tagger changelog/no-changelog component/cluster-agent bugfix/functional backport bot team/container-platform The Container Platform Team short review PR is simple enough to be reviewed quickly qa/rc-required Only for a PR that requires validation on the Release Candidate labels Dec 3, 2024
@agent-platform-auto-pr
Copy link
Contributor Author

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=50293875 --os-family=ubuntu

Note: This applies to commit 5e86b260

@adel121
Copy link
Contributor

adel121 commented Dec 24, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Dec 24, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-12-24 10:37:31 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in 7.61.x is 33m.


2024-12-24 11:16:18 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit a4cad4d into 7.61.x Dec 24, 2024
315 of 316 checks passed
@dd-mergequeue dd-mergequeue bot deleted the backport-31711-to-7.61.x branch December 24, 2024 11:16
@github-actions github-actions bot added this to the 7.61.0 milestone Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bot 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.

1 participant