Repository navigation
Conversation
Kata was deferred when node-exporter moved into the VHD, not excluded for a technical reason. Resolve the package through azurelinuxkata, copy the startup and unit files, and require the baked exporter in content tests. The Kata host kernel (kernel-mshv) is built without CONFIG_PSI, so the pressure collector returns no data there. E2E requires PSI metrics on every other image and, on Kata, requires them only when /proc/pressure exists; otherwise it asserts the collector reports no data. See microsoft/azurelinux#19417.
Contributor
Windows Unit Test Results 3 files 18 suites 1m 13s ⏱️ Results for commit baaa790. |
Contributor
Contributor
|
Contributor
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The coordinated installation and validation changes preserve existing exclusions and non-Kata requirements, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Extends VHD-owned node-exporter to Azure Linux 3 Kata, using the existing provisioning startup path.
Changes:
- Adds Kata package resolution and enables exporter installation and service assets.
- Updates VHD content checks to require the exporter on Kata.
- Adds PSI-aware validation and unit tests while preserving non-Kata pressure metric requirements.
| File | Description |
|---|---|
| vhdbuilder/packer/test/linux-vhd-content-test.sh | Requires baked node-exporter on Kata. |
| vhdbuilder/packer/packer_source.sh | Includes exporter service assets on Kata. |
| vhdbuilder/packer/install-dependencies.sh | Enables exporter installation on Kata. |
| parts/common/components.json | Adds the Azure Linux 3 Kata package entry. |
| e2e/scenario/validators.go | Detects Kata PSI availability for validation. |
| e2e/nodeexporter/metrics.go | Makes pressure metric expectations conditional. |
| e2e/nodeexporter/metrics_test.go | Tests metrics validation with and without PSI. |
Review effort: Balanced
This branch has not been deployed
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.
What this PR does / why we need it:
Bakes Prometheus node-exporter into Azure Linux 3 Kata (Pod Sandboxing) VHDs, so Kata uses the same VHD-owned exporter as regular Azure Linux 3 instead of the VM extension's copy.
Kata was left out when node-exporter moved into the VHD (#7704) only to keep that PR's scope small. No technical reason was recorded.
Changes
components.json: adds anazurelinuxkataentry fornode-exporter, mirroringazurelinuxv3.0. Kata builds look up packages underazurelinuxkata, so before this no version resolved.install-dependencies.sh/packer_source.sh: removes the Kata skips for the install and for the startup script and unit files. Both skips are removed together, since installing without the unit files fails the build.configureNodeExporteralready starts the exporter wheneverskip_vhd_node_exporterexists.Expected behavior: no pressure (PSI) metrics on Kata
The Kata host kernel (
kernel-mshv) is built withoutCONFIG_PSI, so/proc/pressuredoes not exist. node-exporter'spressurecollector then returns no data: there are nonode_pressure_*series andnode_scrape_collector_success{collector="pressure"}is0. The exporter keeps running and scrapes succeed.This matches the extension-managed exporter on Kata today. PSI was enabled for
kernel-mshvin microsoft/azurelinux#9720 and appears to have been dropped by a later config sync. Tracked in microsoft/azurelinux#19417.E2E (
ValidateMetrics) therefore:node_pressure_cpu_waiting_seconds_totalon every non-Kata image, so losing PSI there remains a failure;/proc/pressure/cpuexists. Otherwise it asserts that the pressure collector reports no data and that no PSI metric is exposed, so the scenario starts requiring the metric once the kernel is fixed.Validation
AzureLinuxV3Gen2Kata, node-exporter validation ran and passed withPSI available=false.go vet,pkg/agenttests, CUE validation, shellcheck, and the relevant ShellSpec suites (483 examples) pass.6.18.34.mshv3-1.azl3):node-exporter-kubernetes-1.12.1-10.azl3started from CSE.CONFIG_PSIis not set,/proc/pressureis absent, and the pressure collector reports0.AKSLinuxExtension1.515: the extension honoredskip_vhd_node_exporter. It installed no exporter of its own, and the baked exporter was not restarted. Extension-managed NPD loaded its node-exporter health monitor, which reports healthy. NPD conditions are published.node_filesystem_*series (still six host mounts) and no Kata/virtiofs/erofs mounts in the host namespace. The exporter stayed healthy (about 33 MB RSS).6.6.137.mshv2-2.azl3) shows the same PSI behavior with the extension's exporter 1.9.1.Which issue(s) this PR fixes:
Related: microsoft/azurelinux#19417