Skip to content

feat(linux): network isolated cluster install package via cached first#8292

Open
fseldow wants to merge 6 commits intomainfrom
xinhl/cache2
Open

feat(linux): network isolated cluster install package via cached first#8292
fseldow wants to merge 6 commits intomainfrom
xinhl/cache2

Conversation

@fseldow
Copy link
Copy Markdown
Contributor

@fseldow fseldow commented Apr 13, 2026

What this PR does / why we need it:
feat(linux): network isolated cluster install package via cached first

Which issue(s) this PR fixes:

Fixes #

Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Enable installing Linux bootstrap tools in network-isolated clusters by attempting a cache-only package install before falling back to pulling artifacts from a registry.

Changes:

  • Add cache-only install paths for Ubuntu (.deb via apt simulation + local install) and Mariner (.rpm via dnf plan + local install).
  • Refactor Mariner RPM cache selection into helper functions.
  • Update shared installer flow to try cache-first (with an e2e-only test-mode escape hatch) and extend the e2e scenario config.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh Adds installPackageFromCache for cache-only .deb installs.
parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh Uses new helpers for RPM selection and adds cache-only install function.
parts/linux/cloud-init/artifacts/mariner/cse_helpers_mariner.sh Introduces helpers to pick cached RPM filenames and build install argument lists.
parts/linux/cloud-init/artifacts/cse_install.sh Tries installPackageFromCache before pulling from registry; adds test-mode bypass.
parts/linux/cloud-init/artifacts/cse_cmd.sh Adds env var wiring for NETWORK_ISOLATED_CLUSTER_TEST_MODE.
e2e/scenario_test.go Enables “TestMode” for the network-isolated cluster e2e scenario.

Copilot AI review requested due to automatic review settings April 13, 2026 19:12
Copy link
Copy Markdown
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 6 out of 6 changed files in this pull request and generated 6 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 13, 2026 19:39
Copy link
Copy Markdown
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 6 out of 6 changed files in this pull request and generated 2 comments.


# Simulate install first to detect whether apt would pull additional dependencies.
aptPlanOutput=$(apt-get -s install "${debFile}" 2>&1 || true)
if echo "${aptPlanOutput}" | grep -Eqi "unmet dependencies|depends:|unable to correct problems|but it is not installable"; then
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The precheck treats any occurrence of depends: as a resolution failure, which is overly broad and can produce false positives if apt-get -s output ever includes that token outside an error context. Narrow the pattern to known error phrases (e.g., Unmet dependencies, Depends: .* but it is not installable, Depends: .* but it is not going to be installed, Unable to correct problems) to avoid incorrectly rejecting valid cache-only installs.

Suggested change
if echo "${aptPlanOutput}" | grep -Eqi "unmet dependencies|depends:|unable to correct problems|but it is not installable"; then
if echo "${aptPlanOutput}" | grep -Eqi "unmet dependencies|depends: .* but it is not installable|depends: .* but it is not going to be installed|unable to correct problems"; then

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.

2 participants