Skip to content

feat: enable Artifact Streaming on Flatcar#7425

Open
chewi wants to merge 3 commits intomainfrom
chewi/flatcar-artifact-streaming
Open

feat: enable Artifact Streaming on Flatcar#7425
chewi wants to merge 3 commits intomainfrom
chewi/flatcar-artifact-streaming

Conversation

@chewi
Copy link
Contributor

@chewi chewi commented Nov 20, 2025

What type of PR is this?

/kind cleanup
/kind feature

What this PR does / why we need it:

Artifact Streaming is an important feature for Flatcar.

This uses Flatcar's own systemd system extension for overlaybd and Azure Linux's RPM for acr and the configuration scripts. It's not perfect, but we cannot improve on this until acr changes its build process or goes open source.

Which issue(s) this PR fixes:

Fixes Flatcar for AKS work item #34435545

Requirements:

  • uses conventional commit messages
  • includes documentation
  • adds unit tests
  • tested upgrade from previous version
  • commits are GPG signed and Github marks them as verified

Release note:

* Enabled Artifact Streaming on Flatcar.

@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from e5850e9 to aa6de29 Compare November 20, 2025 16:09
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from aa6de29 to 154b46c Compare November 21, 2025 10:50
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 154b46c to 3fcc733 Compare November 25, 2025 10:20
@chewi chewi changed the base branch from master to main November 25, 2025 10:21
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 3fcc733 to 6b656a9 Compare November 26, 2025 09:28
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 6b656a9 to 34e6f00 Compare November 28, 2025 15:51
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 34e6f00 to 4ef58f9 Compare December 15, 2025 09:47
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 4ef58f9 to b142fe7 Compare December 15, 2025 18:01
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from b142fe7 to 12be550 Compare December 16, 2025 16:46
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 12be550 to 6bdcf78 Compare December 19, 2025 10:55
@chewi
Copy link
Contributor Author

chewi commented Dec 19, 2025

It took a long time, but I was finally able to test this under RP. I couldn't see any details, but after removing Flatcar's exclusion of the ArtifactStreaming test, I saw that it passed along with the other E2Ev3 tests.

@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 6bdcf78 to 8f1d9c4 Compare December 23, 2025 12:10
@chewi
Copy link
Contributor Author

chewi commented Dec 23, 2025

To be extra sure, I also ran E2Ev3 without this change and saw that Scenario_Flatcar_Artifact_Streaming failed while the other tests passed.

@chewi chewi marked this pull request as ready for review December 23, 2025 12:12
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 8f1d9c4 to 4f8be1a Compare December 29, 2025 11:29
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 4f8be1a to f121791 Compare January 20, 2026 17:06
@chewi chewi requested review from YaoC and yewmsft as code owners January 20, 2026 17:06
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from f121791 to 0647170 Compare January 20, 2026 21:43
Copilot AI review requested due to automatic review settings February 4, 2026 17:12
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 0647170 to c493e64 Compare February 4, 2026 17:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enables Artifact Streaming on Flatcar by refactoring the isARM64 function and implementing Flatcar-specific installation logic. Artifact Streaming is an important performance feature for container image management.

Changes:

  • Refactored isARM64() function to return an exit code directly instead of echoing 0/1, simplifying all usage patterns
  • Added Flatcar-specific Artifact Streaming installation using Flatcar's overlaybd system extension and Azure Linux's RPM package
  • Updated Flatcar custom data to enable the overlaybd system extension and mask related services initially

Reviewed changes

Copilot reviewed 15 out of 75 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
parts/linux/cloud-init/artifacts/cse_helpers.sh Refactored isARM64() to return exit code directly
parts/linux/cloud-init/artifacts/cse_install.sh Updated 3 call sites to use new isARM64 pattern
parts/linux/cloud-init/artifacts/cse_config.sh Updated 2 call sites and added unmask logic for Flatcar overlaybd services
parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh Updated 1 call site to use new isARM64 pattern
vhdbuilder/packer/install-dependencies.sh Added Flatcar-specific artifact streaming installation logic and updated 4 call sites
vhdbuilder/scripts/linux/tool_installs.sh Updated 1 call site to use new isARM64 pattern
vhdbuilder/scripts/linux/ubuntu/tool_installs_ubuntu.sh Updated 1 call site to use new isARM64 pattern
vhdbuilder/packer/test/linux-vhd-content-test.sh Updated 2 call sites to use new isARM64 pattern
vhdbuilder/packer/flatcar-customdata.yaml Added overlaybd system extension configuration and service masking
vhdbuilder/packer/flatcar-customdata.json Compiled JSON version of the YAML custom data
pkg/agent/testdata/MarinerV2+Kata/CustomData Regenerated test data with updated code

@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from c493e64 to 6c2bfb5 Compare February 11, 2026 18:27
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This uses Flatcar's own systemd system extension for overlaybd and Azure
Linux's RPM for acr and the configuration scripts. It's not perfect, but
we cannot improve on this until acr changes its build process or goes
open source.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi force-pushed the chewi/flatcar-artifact-streaming branch from 6c2bfb5 to 59750ef Compare February 16, 2026 10:53
Copilot AI review requested due to automatic review settings February 16, 2026 10:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 75 changed files in this pull request and generated 1 comment.

}

ensureArtifactStreaming() {
systemctl unmask overlaybd-{tcmu,snapshotter}.service # Flatcar masks these initially.
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

systemctl unmask is executed unconditionally, but the inline comment indicates this is Flatcar-specific. If this script runs with set -e (common in CSE), systemctl unmask can fail on non-Flatcar (or before the units exist) and abort provisioning. Make this conditional on Flatcar (e.g., if isFlatcar "$OS"; then ... fi) and/or make the unmask tolerant to missing units (e.g., append || true).

Suggested change
systemctl unmask overlaybd-{tcmu,snapshotter}.service # Flatcar masks these initially.
systemctl unmask overlaybd-{tcmu,snapshotter}.service || true # Flatcar masks these initially.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant