feat(linux): network isolated cluster install package via cached first#8292
feat(linux): network isolated cluster install package via cached first#8292
Conversation
There was a problem hiding this comment.
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. |
parts/linux/cloud-init/artifacts/mariner/cse_helpers_mariner.sh
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
||
| # 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 |
There was a problem hiding this comment.
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.
| 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 |
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 #