Repository navigation
test(otel): run the every-series checks on every node and model the label filters - #791
Closed
petruanica wants to merge 3 commits into
Closed
petruanica wants to merge 3 commits into
petruanica wants to merge 3 commits into
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the issue
Several gaps remain in which series the OTel suites test.
host.typematcher. The matcher names the instance types that the suite expects, for examplet3.mediumin the standard suite. So the tests that must hold on every series never see GPU, Neuron or Karpenter nodes.host.typematcher, so they can look absent.Description of changes
OTEL_HOST_TYPES(util/otelmetrics/host_types.go) is a comma-separated list that replaces a suite's host types. Ten suites use it, and eachTestMainprints the host types and the variable.source_registry.go,query_cache.go).allNodesCache, a cache with no host types. The tests that must hold on every series read through it. The presence tests keep the host-type pin.TallySchemareads throughGet, so the schema rows reuse the cached reads. It fails for a cache that pins host types.WithSharedConcurrencylets two caches share one concurrency limit, soallNodesCachedoes not double the parallel load on the endpoint.util/otelmetrics/gpu_roles.go). The idle node has nok8s.pod.name. The busy node runsmulti-gpu-burn. A multi-GPU node has annvidia.com/gpuallocatable above 1 in kube-state-metrics.TestDCGMGPUCountMatchesAllocatablecompares the DCGM GPU count of every GPU node with its allocatable. With anOTEL_HOST_TYPESoverride and no multi-GPU node, the multi-GPU tests skip. With the default host types, they fail.k8sattributeslabel rules and the namespace filter conditions from each agent's ConfigMap (label_extraction.go,namespace_filter.go). A label that no rule extracts must be absent. A pod in a namespace that the filter drops needs no series. If the model cannot read a filter, the subtest skips and names the processor and the reason (ErrFilterNotModeled). The tests read the rendered collector configuration, not the Helm values.ReconcileLabelsandReconcileObjectstake aLabelExtractionin place of the label prefix.TestDenylistSparesNeverDeniedAttributesstays strict by default.OTEL_POD_LABEL_EXCLUDESandOTEL_NODE_LABEL_EXCLUDESdeclare thepodLabels.excludeandnodeLabels.excludepatterns that a cluster was deployed with. The test logs the denylist entries that those patterns render to. It fails for every other entry that removes a never-denied attribute.This is PR 3 of 3. It builds on PR 2.
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
The unit tests in
util/otelmetricsrun without a cluster and pass with-race. They cover these areas:go vet -tags integrationpasses onutil/otelmetricsand on every package undertest/otel.gofmtreports nothing, andmake compilepasses. These commands also pass on PR 1 and PR 2 alone.The standard and gpu suites ran on this commit against an EKS test cluster, with the chart from main and aws-observability/helm-charts#405:
TestKarpenterGroupingLabelsRetainedfails because Karpenter 1.0.11 sets noinstance-tenancylabel.TestKSM_PodBucket_JobPodNameandTestKSM_WorkloadBucket_Job_HasNamefail because the cluster has noksm-test-job.OTEL_HOST_TYPES=g5.xlarge, on two single-GPU nodes: 25 tests pass. The 9 multi-GPU tests skip, because no node has more than one GPU.