Skip to content

fix: use dpkg for local deb installs#8285

Merged
awesomenix merged 1 commit intomainfrom
nishp/regression/aptmark
Apr 12, 2026
Merged

fix: use dpkg for local deb installs#8285
awesomenix merged 1 commit intomainfrom
nishp/regression/aptmark

Conversation

@awesomenix
Copy link
Copy Markdown
Contributor

Ubuntu CSE was staging kubelet and kubectl debs under /opt/.../downloads, but installDebPackageFromFile still used apt-get install on the local deb path. In practice apt continued consulting PMC, refetched the packages, and overlapped with the background apt-mark walinuxagent hold flow, which inflated the installKubeletKubectlFromPkg latency in Ubuntu 22.04.

Switch the fast path to a single noninteractive dpkg --force-confdef --force-confold -i of the staged deb so the hotfix uses the cached local artifact directly. Keep the existing apt-get -f install fallback unchanged so dependency repair behavior stays the same if dpkg fails.

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

Updates the Ubuntu CSE helper used for installing locally-staged .deb artifacts so kubelet/kubectl installation can use cached packages directly (reducing unnecessary apt repository interaction and lock contention during provisioning).

Changes:

  • Switch installDebPackageFromFile fast path from apt-get install <local.deb> to dpkg -i <local.deb>.
  • Preserve the existing apt-get -f install fallback behavior for dependency repair if dpkg fails.
  • Improve variable scoping/quoting for the .deb file path.

Comment thread parts/linux/cloud-init/artifacts/ubuntu/cse_helpers_ubuntu.sh Outdated
Ubuntu CSE was staging kubelet and kubectl debs under /opt/.../downloads, but installDebPackageFromFile still used apt-get install on the local deb path. In practice apt continued consulting PMC, refetched the packages, and overlapped with the background apt-mark walinuxagent hold flow, which inflated the installKubeletKubectlFromPkg latency in Ubuntu 22.04.

Switch the fast path to a single noninteractive dpkg --force-confdef --force-confold -i of the staged deb so the hotfix uses the cached local artifact directly. Keep the existing apt-get -f install fallback unchanged so dependency repair behavior stays the same if dpkg fails.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@awesomenix awesomenix force-pushed the nishp/regression/aptmark branch from 7bb4eb8 to 7ed7c69 Compare April 12, 2026 01:27
Copilot AI review requested due to automatic review settings April 12, 2026 01:27
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 1 out of 1 changed files in this pull request and generated no new comments.

Comment thread parts/linux/cloud-init/artifacts/ubuntu/cse_helpers_ubuntu.sh
@awesomenix awesomenix merged commit cbbe1e8 into main Apr 12, 2026
35 checks passed
@awesomenix awesomenix deleted the nishp/regression/aptmark branch April 12, 2026 02:53
timmy-wright pushed a commit that referenced this pull request Apr 13, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fseldow pushed a commit that referenced this pull request Apr 21, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants