Skip to content

fix(bootstrap): rewrite salt.sources URIs to honor -R custom repo URL on Debian/Ubuntu - #2124

Merged
twangboy merged 4 commits into
saltstack:developfrom
twangboy:fix/2123/develop
Aug 3, 2026
Merged

fix(bootstrap): rewrite salt.sources URIs to honor -R custom repo URL on Debian/Ubuntu#2124
twangboy merged 4 commits into
saltstack:developfrom
twangboy:fix/2123/develop

Conversation

@twangboy

@twangboy twangboy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

The Debian/Ubuntu repo functions downloaded a salt.sources template that hardcodes packages.broadcom.com/artifactory in its URIs line. Only the GPG key fetch used $_REPO_URL, so -R had no effect on which apt repo packages actually came from. Add a sed rewrite of the URIs line to $_REPO_URL, mirroring how RHEL/SUSE/Photon already parameterize their repo files.

What issues does this PR fix or reference?

Fixes #2123

… on Debian/Ubuntu

The Debian/Ubuntu repo functions downloaded a salt.sources template that
hardcodes packages.broadcom.com/artifactory in its URIs line. Only the
GPG key fetch used $_REPO_URL, so -R had no effect on which apt repo
packages actually came from. Add a sed rewrite of the URIs line to
$_REPO_URL, mirroring how RHEL/SUSE/Photon already parameterize their
repo files.

Fixes saltstack#2123
@twangboy twangboy self-assigned this Aug 3, 2026
The new test_debian_repo_functions_rewrite_custom_repo_url replays the
script's sed commands via "bash -c", which broke on non-GNU targets:
BSD sed on macOS parses "-i" differently, and on Windows runners
"bash" resolves to the WSL launcher stub with no distro installed.
Detect GNU sed through the same bash -c path the test uses and skip
otherwise, instead of failing on environments the fix doesn't target.
…ip/bootstrap

systemd's default tmpfiles.d rule wipes /tmp during early boot
(systemd-tmpfiles-setup.service). docker exec was running pip install
immediately after docker start, racing that wipe and intermittently
deleting pip's /tmp/pip-*-tracker-* scratch dirs mid-install, causing
"No such file or directory" failures unrelated to the actual bootstrap
logic. Poll systemctl is-system-running until the container settles
before running any exec commands.
"--systemd --unit rescue.target" was silently broken: --systemd isn't a
real systemd flag, and space-separated --unit rescue.target doesn't
parse as --unit=rescue.target. Containers were actually booting their
full default target (multi-user/graphical, network-online, getty,
etc.) instead of the intended minimal rescue mode.

On Debian 11 that full boot pulls in NetworkManager-wait-online.service,
which times out after its fixed 90s TimeoutStartSec since the
container's network never satisfies NetworkManager's online check -
exactly matching the 83-89s "starting" stalls seen in CI.

Fix the flag to --unit=rescue.target so containers boot minimally for
every distro, accept "maintenance" (its correct terminal state) in the
wait condition, and drop the timeout back to 30s now that real
convergence is ~2s.
@twangboy
twangboy merged commit 67a900e into saltstack:develop Aug 3, 2026
122 checks passed
@twangboy
twangboy deleted the fix/2123/develop branch August 3, 2026 21:23
@hackery

hackery commented Aug 4, 2026

Copy link
Copy Markdown

Awesome turnaround, tyvm.

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.

Custom respository URL not working for Debian/Ubuntu

2 participants